:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --secondary: #0EA5E9;
    --secondary-dark: #0284C7;
    --accent: #06B6D4;
    --accent-dark: #0891B2;
    --dark: #0F172A;
    --dark-bg: #020617;
    --light: #F0F9FF;
    --light-blue: #E0F2FE;
    --gray: #64748B;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(37, 99, 235, 0.2);
    --gradient: linear-gradient(135deg, #2563EB 0%, #0EA5E9 50%, #06B6D4 100%);
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);
    --gradient-secondary: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    --gradient-blue: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
    --shadow-blue: 0 10px 30px rgba(37, 99, 235, 0.15);
    --shadow-blue-strong: 0 15px 40px rgba(37, 99, 235, 0.25);
    --wave-pattern: repeating-linear-gradient(
        45deg,
        rgba(37, 99, 235, 0.03) 0px,
        rgba(37, 99, 235, 0.03) 2px,
        transparent 2px,
        transparent 8px
    );
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, #FFFFFF 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Волновой текстурный фон */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--wave-pattern);
    pointer-events: none;
    z-index: -2;
}

/* Синий градиентный фон */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.05), transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.05), transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 60px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    z-index: 1000;
    padding: 12px 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    top: 10px;
    width: 95%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.logo span {
    background: none;
    color: var(--primary);
}

.logo::after {
    content: '💧';
    position: absolute;
    right: -30px;
    top: -5px;
    font-size: 22px;
    background: none;
    animation: dropBounce 2s ease infinite;
}

@keyframes dropBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-5px) rotate(10deg); opacity: 1; }
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.nav a:hover::before {
    width: 100%;
}

.nav a:hover {
    color: var(--primary);
}

.btn-login {
    background: var(--gradient-primary);
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-blue-strong);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Hero 3D блок с плавающей карточкой */
.hero-3d {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: white;
    border-radius: 32px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1), 0 0 0 1px rgba(37, 99, 235, 0.1);
    animation: float 3s ease-in-out infinite;
    max-width: 320px;
    width: 100%;
    transition: all 0.3s ease;
}

.floating-card:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.progress-container {
    background: #E2E8F0;
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
}

/* Subjects Section */
.subjects {
    padding: 100px 0;
    background: transparent;
}

.section-title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-title .gradient-text {
    display: inline-block;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 60px;
    font-size: 18px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.subject-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 28px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.subject-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-blue);
}

.subject-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
}

.subject-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--dark);
}

.subject-card p {
    color: var(--gray);
}

/* Formats Section */
.formats {
    padding: 100px 0;
    background: var(--light-blue);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.format-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 28px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.format-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-blue);
}

.format-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.format-card h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--dark);
}

.format-card p {
    color: var(--gray);
}

.format-card ul {
    margin-top: 20px;
    list-style: none;
}

.format-card ul li {
    margin-bottom: 8px;
    color: var(--gray);
}

/* Game Block */
.game-block {
    padding: 100px 0;
    background: transparent;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 48px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.game-container:hover {
    box-shadow: var(--shadow-blue);
}

.quiz-question {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--dark);
}

.quiz-options {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.quiz-option {
    background: var(--light-blue);
    padding: 16px;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--dark);
}

.quiz-option:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(10px);
}

.quiz-score {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 20px;
}

.quiz-reset-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--gradient);
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.game-page .game-main {
    padding-top: 120px;
}

.game-hero {
    padding: 56px 0 32px;
}

.game-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
}

.game-energy-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.game-energy-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.game-energy-bar {
    height: 10px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.game-energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.game-energy-card p {
    margin: 10px 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.game-energy-card small {
    color: var(--gray);
}

.game-controls {
    padding: 14px 0 20px;
}

.game-controls-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.game-controls-grid label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.game-controls-grid select {
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    background: white;
    padding: 10px 12px;
    font-size: 15px;
}

.game-roadmap {
    padding: 56px 0 30px;
}

.roadmap-track {
    display: grid;
    gap: 14px;
    max-width: 920px;
    margin: 0 auto;
}

.roadmap-node {
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    background: white;
    text-align: left;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.roadmap-node-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f59e0b 0%, #f97316 100%);
    border: 3px solid #fbbf24;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}

.roadmap-node-content {
    display: grid;
    gap: 4px;
}

.roadmap-node-mobile-label {
    display: none;
}

.roadmap-node strong {
    font-size: 20px;
    line-height: 1.3;
    color: #0f172a;
}

.roadmap-node span {
    color: #334155;
    font-size: 15px;
    font-weight: 600;
}

.roadmap-node small {
    color: #475569;
    font-size: 14px;
    line-height: 1.35;
}

.roadmap-node:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

@media (min-width: 769px) {
    .roadmap-node-content small:last-child {
        margin-top: 2px;
        color: #1e40af;
        font-weight: 700;
    }
}

.roadmap-node-completed {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfeff 0%, #ffffff 100%);
}

.roadmap-node-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.roadmap-node-bonus .roadmap-node-icon {
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
}

.roadmap-node-locked {
    opacity: 0.58;
    cursor: not-allowed;
}

.roadmap-node-locked .roadmap-node-icon {
    filter: grayscale(1);
    background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 100%);
    border-color: #d1d5db;
    box-shadow: none;
}

.game-page .quiz-option {
    border: none;
    text-align: left;
    font-size: 16px;
}

.game-answer-input {
    width: 100%;
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    margin-bottom: 12px;
}

.game-page-playing .header,
.game-page-playing .footer,
.game-page-playing #gameMapView {
    display: none;
}

.game-play-mode {
    min-height: 100vh;
    padding: 40px 0;
}

.game-play-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.game-play-header h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.game-play-header p {
    color: #334155;
    font-weight: 600;
}

.lesson-progress {
    margin-bottom: 14px;
}

.lesson-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #334155;
    font-weight: 700;
    margin-bottom: 6px;
}

.lesson-progress-bar {
    height: 10px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.lesson-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #06b6d4);
    transition: width 0.25s ease;
}

.game-mode-quiz {
    margin: 0;
}

.quiz-feedback {
    min-height: 24px;
    margin: 8px 0 14px;
    font-weight: 700;
    color: #334155;
}

.quiz-feedback.ok {
    color: #15803d;
}

.quiz-feedback.error {
    color: #b91c1c;
}

.answer-correct {
    animation: answerPulse 0.32s ease;
}

.answer-wrong {
    animation: answerShake 0.3s ease;
}

@keyframes answerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes answerShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 960px) {
    .game-hero-grid {
        grid-template-columns: 1fr;
    }

    .game-controls-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .game-controls-grid {
        grid-template-columns: 1fr;
    }

    .game-roadmap .section-title,
    .game-roadmap .section-subtitle {
        text-align: left;
    }

    .roadmap-track {
        position: relative;
        display: grid;
        gap: 18px;
        max-width: 320px;
        margin: 0 auto;
        padding: 8px 0;
    }

    .roadmap-track::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 10px;
        bottom: 10px;
        width: 4px;
        transform: translateX(-50%);
        border-radius: 999px;
        background: linear-gradient(180deg, #fde68a 0%, #fed7aa 100%);
    }

    .roadmap-node {
        width: 94px;
        min-height: 128px;
        border-radius: 999px;
        grid-template-columns: 1fr;
        justify-items: center;
        align-items: center;
        padding: 8px;
        border: none;
        background: transparent;
        box-shadow: none;
        position: relative;
        z-index: 1;
    }

    .roadmap-node:nth-child(odd) {
        margin-left: 14px;
    }

    .roadmap-node:nth-child(even) {
        margin-left: auto;
        margin-right: 14px;
    }

    .roadmap-node-icon {
        width: 78px;
        height: 78px;
        border-width: 4px;
        font-size: 30px;
    }

    .roadmap-node-content {
        display: none;
    }

    .roadmap-node-mobile-label {
        display: block;
        margin-top: 6px;
        max-width: 130px;
        text-align: center;
        font-size: 12px;
        line-height: 1.25;
        color: #334155;
        font-weight: 600;
    }

    .roadmap-node-completed .roadmap-node-icon {
        background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
        border-color: #6ee7b7;
    }

    .roadmap-node-current .roadmap-node-icon {
        box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.25);
    }

    .game-play-header h2 {
        font-size: 22px;
    }
}

/* Teachers */
.teachers {
    padding: 100px 0;
    background: var(--light-blue);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.teacher-card {
    text-align: center;
    padding: 30px;
    border-radius: 32px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-blue);
    border-color: var(--primary);
}

.teacher-avatar {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.teacher-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--dark);
}

.teacher-card p {
    color: var(--primary);
    margin-bottom: 8px;
}

.teacher-card small {
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 60px 0 30px;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    color: #64748b;
}

/* Cursor */
.cursor-glow {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gradient-primary);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    transition: transform 0.1s;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
    opacity: 0.6;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    pointer-events: none;
    z-index: 10000;
    transition: 0.05s;
}

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .formats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nav {
        display: none;
    }
    
    .header {
        width: 95%;
        padding: 10px 20px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .hero-3d {
        margin-top: 40px;
    }
    
    .floating-card {
        max-width: 280px;
        padding: 20px;
    }
    
    .cursor-glow, .cursor-dot {
        display: none;
    }
}

/* Employment page */
.employment-page {
    background: linear-gradient(135deg, var(--light) 0%, #FFFFFF 100%);
}

.employment-header .container {
    gap: 24px;
}

.employment-logo {
    text-decoration: none;
}

.employment-hero {
    padding: 180px 0 90px;
    text-align: center;
}

.employment-hero h1 {
    font-size: 56px;
    line-height: 1.15;
    max-width: 980px;
    margin: 0 auto 20px;
}

.employment-hero p {
    font-size: 21px;
    color: var(--gray);
    max-width: 860px;
    margin: 0 auto;
}

.employment-section {
    padding: 80px 0;
}

.employment-steps-grid,
.who-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.employment-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 24px;
    padding: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.employment-card:hover,
.income-card:hover,
.split-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-blue);
    border-color: var(--primary);
}

.employment-step-label {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 14px;
    border-radius: 30px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.employment-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.employment-card p {
    color: var(--gray);
}

.employment-split {
    padding: 90px 0;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, rgba(14, 165, 233, 0.08) 100%);
}

.employment-split-container {
    max-width: 100%;
}

.split-cards {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.split-card {
    border-radius: 28px;
    padding: 36px 30px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: #ffffff;
    transition: all 0.35s ease;
}

.split-card-platform {
    background: linear-gradient(135deg, #eff6ff 0%, #e2e8f0 100%);
}

.split-card-teacher {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    color: white;
    border-color: rgba(14, 165, 233, 0.45);
}

.split-percent {
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 14px;
}

.split-card h3 {
    font-size: 30px;
    margin-bottom: 8px;
}

.split-card p {
    color: inherit;
    opacity: 0.9;
}

.lifetime-badge {
    margin: 18px auto 0;
    max-width: 460px;
    text-align: center;
    background: white;
    border: 1px dashed rgba(37, 99, 235, 0.4);
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.income-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.income-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.3s ease;
}

.income-card h3 {
    font-size: 24px;
    margin-bottom: 14px;
}

.income-card p {
    color: var(--gray);
    margin-bottom: 8px;
}

.income-example {
    margin-top: 14px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--dark) !important;
    font-weight: 500;
}

.employment-legal {
    background: rgba(224, 242, 254, 0.35);
}

.employment-list-card {
    max-width: 860px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.employment-list-card ul {
    list-style: none;
    display: grid;
    gap: 14px;
}

.employment-list-card li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
}

.employment-list-card i {
    color: var(--primary);
}

.employment-cta {
    background: rgba(224, 242, 254, 0.35);
}

.employment-form {
    max-width: 860px;
    margin: 26px auto 0;
    background: white;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-grid label {
    font-weight: 600;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-grid input {
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-grid input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.full-width {
    grid-column: 1 / -1;
}

.form-submit {
    width: 100%;
}

.form-note {
    margin-top: 12px;
    text-align: center;
    color: var(--gray);
}

.form-message {
    margin-top: 10px;
    min-height: 24px;
    font-weight: 600;
    text-align: center;
}

.form-message.error {
    color: #b91c1c;
}

.form-message.success {
    color: #15803d;
}

.employment-faq .faq-list {
    max-width: 860px;
    margin: 24px auto 0;
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 14px;
    background: white;
    padding: 16px 18px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    color: var(--gray);
    margin-top: 10px;
}

.employment-disclaimer {
    margin-top: 24px;
    font-size: 13px;
    text-align: center;
    color: var(--gray);
}

@media (max-width: 960px) {
    .employment-hero h1 {
        font-size: 44px;
    }

    .employment-steps-grid,
    .who-grid,
    .income-grid {
        grid-template-columns: 1fr;
    }

    .split-cards,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .employment-nav {
        display: none;
    }

    .employment-hero {
        padding-top: 140px;
    }

    .employment-hero h1 {
        font-size: 34px;
    }

    .employment-hero p {
        font-size: 18px;
    }

    .split-percent {
        font-size: 48px;
    }

    .split-card h3 {
        font-size: 25px;
    }

    .employment-form,
    .employment-card,
    .income-card,
    .split-card {
        padding: 22px;
    }
}

/* Auth pages */
.auth-page {
    padding: 160px 0 90px;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
}

.auth-card h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--gray);
    margin-bottom: 20px;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.auth-form input {
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
}

.auth-submit {
    margin-top: 8px;
}

.auth-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-footer-text {
    margin-top: 14px;
    color: var(--gray);
}

.dashboard-grid {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    background: rgba(37, 99, 235, 0.07);
    border-radius: 12px;
    padding: 10px 12px;
}

/* Cabinet & Mini App */
.cabinet-page .cabinet-main {
    padding: 140px 0 80px;
}

.cabinet-container {
    max-width: 920px;
}

.cabinet-card {
    max-width: 100%;
    padding: 32px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.miniapp-page .cabinet-main {
    padding-top: 24px;
    padding-bottom: 24px;
}

.miniapp-card {
    min-height: 70vh;
}

.cabinet-stats {
    display: grid;
    gap: 22px;
}

.cabinet-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.cabinet-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-blue);
}

.cabinet-eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.cabinet-name {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.cabinet-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cabinet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.cabinet-badge-level {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-dark);
}

.cabinet-badge-ok {
    background: rgba(14, 165, 233, 0.15);
    color: #0369a1;
}

.cabinet-badge-muted {
    background: #f1f5f9;
    color: var(--gray);
}

.cabinet-xp-ring {
    --progress: 0%;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary) 0% var(--progress),
        #e2e8f0 var(--progress) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.cabinet-xp-ring-inner {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cabinet-xp-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.cabinet-xp-label {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

.cabinet-xp-bar-wrap {
    display: grid;
    gap: 8px;
}

.cabinet-xp-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
}

.cabinet-xp-bar {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.cabinet-xp-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--gradient-primary);
    transition: width 0.6s ease;
}

.cabinet-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cabinet-metric {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    background: white;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cabinet-metric:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

.cabinet-metric-icon {
    font-size: 26px;
    line-height: 1;
}

.cabinet-metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 4px;
}

.cabinet-metric-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
}

.cabinet-metric-value span {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
}

.cabinet-metric-value-sm {
    font-size: 16px;
}

.cabinet-metric-streak {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 70%);
}

.cabinet-metric-coins {
    background: linear-gradient(135deg, #fefce8 0%, #ffffff 70%);
}

.cabinet-metric-energy {
    grid-column: span 2;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 70%);
}

.cabinet-metric-body {
    flex: 1;
}

.cabinet-energy-bar {
    margin-top: 10px;
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.cabinet-energy-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    transition: width 0.5s ease;
}

.cabinet-spark {
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.25), transparent 70%);
    pointer-events: none;
}

.cabinet-details {
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
}

.cabinet-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--dark);
    list-style: none;
}

.cabinet-details summary::-webkit-details-marker {
    display: none;
}

.cabinet-details-grid {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.cabinet-details-grid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.cabinet-details-grid span {
    color: var(--gray);
}

.cabinet-telegram-cta {
    margin-top: 8px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.12));
    border: 1px dashed rgba(37, 99, 235, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cabinet-telegram-cta h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.cabinet-telegram-cta p {
    color: var(--gray);
    font-size: 14px;
    max-width: 420px;
}

.cabinet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.cabinet-actions .btn-secondary {
    text-decoration: none;
    text-align: center;
}

.miniapp-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 0;
    color: var(--gray);
}

.miniapp-loader-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.miniapp-status {
    text-align: center;
    min-height: 20px;
}

.tg-theme.miniapp-page {
    background: var(--tg-theme-bg-color, #f0f9ff);
}

@media (max-width: 768px) {
    .cabinet-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cabinet-avatar {
        margin: 0 auto;
    }

    .cabinet-badges {
        justify-content: center;
    }

    .cabinet-xp-ring {
        margin: 0 auto;
    }

    .cabinet-metrics {
        grid-template-columns: 1fr;
    }

    .cabinet-metric-energy {
        grid-column: span 1;
    }

    .cabinet-card {
        padding: 22px;
    }
}