/* Skill Tree */
.skills-main,
.skill-topic-main {
    min-height: 100vh;
}

.skills-hero,
.skill-topic-hero {
    padding: 170px 0 70px;
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.14), transparent 32%),
        radial-gradient(circle at 85% 70%, rgba(6, 182, 212, 0.13), transparent 30%);
}

.skills-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
    gap: 50px;
    align-items: center;
}

.skills-hero h1 {
    max-width: 820px;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
    margin-bottom: 22px;
}

.skills-hero p {
    max-width: 720px;
    color: var(--gray);
    font-size: 19px;
}

.skills-overview-card {
    padding: 26px;
    color: white;
    background: linear-gradient(145deg, #172554, #1d4ed8 60%, #0891b2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(30, 64, 175, 0.28);
}

.skills-overview-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.skills-overview-top > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 30px;
    background: rgba(255, 255, 255, 0.13);
}

.skills-overview-top div {
    display: flex;
    flex-direction: column;
}

.skills-overview-top small {
    opacity: 0.75;
}

.skills-overview-top strong {
    font-size: 32px;
    line-height: 1.1;
}

.skills-overview-card .skill-progress-track {
    margin: 20px 0 10px;
    background: rgba(255, 255, 255, 0.2);
}

.skills-overview-card .skill-progress-track > div {
    background: linear-gradient(90deg, #67e8f9, #ffffff);
}

.skills-overview-card p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.skills-content,
.skill-topic-content {
    padding: 54px 0 100px;
}

.skill-subject-tabs {
    display: flex;
    gap: 12px;
    padding: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.skill-subject-tabs a {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    color: var(--gray);
    text-decoration: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.skill-subject-tabs a:hover {
    color: var(--primary);
    background: #eff6ff;
}

.skill-subject-tabs a.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.skill-subject-tabs small {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.12);
}

.skill-subject-tabs a.active small {
    background: rgba(255, 255, 255, 0.18);
}

.skill-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin: 22px 0 38px;
    color: var(--gray);
    font-size: 13px;
    font-weight: 600;
}

.skill-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.skill-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}

.skill-dot-not-started { background: #cbd5e1; }
.skill-dot-bronze { background: #eab308; }
.skill-dot-silver { background: #3b82f6; }
.skill-dot-gold { background: #a855f7; }
.skill-dot-master { background: #22c55e; }

.skill-tree-heading {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 0.75fr);
    gap: 30px;
    align-items: center;
    padding: 26px 30px;
    margin-bottom: 24px;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 24px;
}

.skill-tree-heading > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.skill-tree-heading > div > span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #eff6ff;
    font-size: 28px;
}

.skill-tree-heading small {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.skill-tree-heading h2 {
    font-size: 30px;
    line-height: 1.2;
}

.skill-tree-heading p {
    color: var(--gray);
}

.skill-tree {
    display: grid;
    gap: 24px;
}

.skill-branch {
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 28px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
}

.skill-branch-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.skill-branch-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--primary-dark);
    background: linear-gradient(145deg, #dbeafe, #cffafe);
    font-size: 25px;
    font-weight: 800;
}

.skill-branch-header h2 {
    font-size: 25px;
}

.skill-branch-header p {
    color: var(--gray);
    font-size: 14px;
}

.skill-node-path {
    position: relative;
    display: grid;
    gap: 28px;
    padding: 38px 8%;
}

.skill-node-path::before {
    content: '';
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 50%;
    width: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: linear-gradient(#bfdbfe, #67e8f9);
}

.skill-node-row {
    position: relative;
    display: flex;
    z-index: 1;
}

.skill-node-left { justify-content: flex-start; }
.skill-node-right { justify-content: flex-end; }

.skill-node {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    width: 47%;
    min-width: 420px;
    padding: 18px;
    color: var(--dark);
    text-decoration: none;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-node:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
}

.skill-node::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(6% + 18px);
    height: 3px;
    background: #bfdbfe;
}

.skill-node-left .skill-node::after { right: calc(-6% - 20px); }
.skill-node-right .skill-node::after { left: calc(-6% - 20px); }

.skill-node-level {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #f1f5f9;
    font-size: 26px;
}

.skill-node-copy {
    min-width: 0;
}

.skill-node-copy small {
    color: var(--gray);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-node-copy h3 {
    margin: 2px 0 4px;
    font-size: 18px;
}

.skill-node-copy p {
    overflow: hidden;
    color: var(--gray);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.skill-node-copy > div {
    display: flex;
    gap: 12px;
    margin-top: 9px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.skill-node > strong {
    color: var(--gray);
    font-size: 15px;
}

.skill-node-bronze { border-color: #eab308; }
.skill-node-silver { border-color: #3b82f6; }
.skill-node-gold { border-color: #a855f7; }
.skill-node-master { border-color: #22c55e; }

.skill-node-locked {
    filter: grayscale(0.55);
    opacity: 0.68;
}

.skill-empty {
    padding: 60px;
    color: var(--gray);
    text-align: center;
    background: white;
    border-radius: 24px;
}

.skill-topic-hero {
    padding-bottom: 50px;
}

.skill-topic-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 38px;
    align-items: center;
    padding: 34px;
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 30px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.skill-topic-breadcrumbs,
.skill-topic-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.skill-topic-breadcrumbs {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.skill-topic-copy h1 {
    margin: 12px 0 10px;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.1;
}

.skill-topic-copy > p {
    max-width: 760px;
    color: var(--gray);
    font-size: 17px;
}

.skill-topic-meta {
    margin-top: 20px;
}

.skill-topic-meta span {
    padding: 7px 12px;
    color: var(--primary-dark);
    background: #eff6ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.skill-mastery-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    text-align: center;
    background: linear-gradient(145deg, #f8fafc, #eff6ff);
    border: 1px solid #cbd5e1;
    border-radius: 24px;
}

.skill-mastery-emoji {
    font-size: 36px;
}

.skill-mastery-card small {
    margin-top: 4px;
    color: var(--gray);
}

.skill-mastery-card > strong {
    margin: 2px 0 14px;
    font-size: 25px;
}

.skill-mastery-card > p {
    margin-top: 8px;
    color: var(--gray);
    font-size: 12px;
}

.skill-progress-track {
    height: 10px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 999px;
}

.skill-progress-track > div {
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.skill-topic-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.skill-topic-tasks {
    min-width: 0;
}

.skill-lock-notice {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 28px;
    color: #854d0e;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 18px;
}

.skill-lock-notice > span {
    font-size: 27px;
}

.skill-lock-notice p {
    color: #a16207;
    font-size: 13px;
}

.mission-section-heading > p {
    color: var(--gray);
}

.skill-task-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.skill-task-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-task-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
}

.skill-task-complete {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.skill-task-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--primary);
    background: #dbeafe;
    border-radius: 14px;
    font-weight: 800;
}

.skill-task-complete .skill-task-number {
    color: #15803d;
    background: #dcfce7;
}

.skill-task-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-task-label strong {
    color: #15803d;
}

.skill-task-question {
    margin: 7px 0 14px;
    font-weight: 700;
}

.skill-answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.skill-answer-option {
    padding: 11px 13px;
    color: var(--dark);
    text-align: left;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.skill-answer-option:hover:not(:disabled) {
    color: var(--primary);
    background: #eff6ff;
    border-color: var(--primary);
}

.skill-answer-option:disabled,
.skill-answer-input-row input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.skill-answer-input-row {
    display: flex;
    gap: 10px;
}

.skill-answer-input-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font: inherit;
}

.skill-task-feedback {
    min-height: 20px;
    margin-top: 9px;
    color: var(--gray);
    font-size: 12px;
    font-weight: 700;
}

.skill-task-feedback-error { color: #dc2626; }
.skill-task-feedback-success { color: #15803d; }

.skill-test-heading {
    margin-top: 46px;
}

.skill-test-list .skill-task-card {
    border-color: rgba(168, 85, 247, 0.25);
    background: linear-gradient(145deg, #faf5ff, #ffffff 65%);
}

.skill-topic-sidebar {
    position: sticky;
    top: 115px;
    display: grid;
    gap: 16px;
}

.skill-rank-list {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    list-style: none;
}

.skill-rank-list li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    color: #94a3b8;
    border-bottom: 1px solid #f1f5f9;
}

.skill-rank-list li.reached {
    color: var(--dark);
}

.skill-rank-list span {
    font-weight: 800;
}

.skill-rank-list small {
    font-size: 11px;
}

.skill-related-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.skill-related-list a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 10px;
    color: var(--dark);
    text-decoration: none;
    background: #f8fafc;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.skill-related-list a:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.skill-related-list a > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: white;
    border-radius: 10px;
}

.skill-related-list div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.skill-related-list strong {
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.skill-related-list small {
    color: var(--gray);
    font-size: 10px;
}

.skill-related-list b {
    color: var(--primary);
}

@media (max-width: 1050px) {
    .header .nav {
        gap: 18px;
    }

    .skill-node {
        min-width: 380px;
    }

    .skill-topic-grid {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
}

@media (max-width: 900px) {
    .skills-hero-grid,
    .skill-tree-heading,
    .skill-topic-hero-card,
    .skill-topic-grid {
        grid-template-columns: 1fr;
    }

    .skill-topic-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skill-node-path {
        padding-inline: 28px;
    }

    .skill-node-path::before {
        left: 50px;
    }

    .skill-node-row,
    .skill-node-left,
    .skill-node-right {
        justify-content: flex-end;
    }

    .skill-node {
        width: calc(100% - 52px);
        min-width: 0;
    }

    .skill-node::after,
    .skill-node-left .skill-node::after,
    .skill-node-right .skill-node::after {
        right: auto;
        left: -30px;
        width: 30px;
    }
}

@media (max-width: 680px) {
    .skills-hero,
    .skill-topic-hero {
        padding-top: 135px;
    }

    .skills-content,
    .skill-topic-content {
        padding-top: 34px;
    }

    .skills-hero h1 {
        font-size: 38px;
    }

    .skill-tree-heading,
    .skill-branch-header,
    .skill-topic-hero-card {
        padding: 21px;
    }

    .skill-node-path {
        gap: 18px;
        padding: 26px 16px;
    }

    .skill-node-path::before,
    .skill-node::after {
        display: none;
    }

    .skill-node {
        width: 100%;
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 14px;
    }

    .skill-node-level {
        width: 48px;
        height: 48px;
    }

    .skill-node > strong {
        display: none;
    }

    .skill-node-copy p {
        white-space: normal;
    }

    .skill-topic-sidebar {
        grid-template-columns: 1fr;
    }

    .skill-answer-options {
        grid-template-columns: 1fr;
    }

    .skill-task-card {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 11px;
        padding: 15px;
    }

    .skill-task-number {
        width: 36px;
        height: 36px;
    }

    .skill-answer-input-row {
        flex-direction: column;
    }
}
: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;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-actions form {
    display: flex;
}

.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;
}

.task-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.task-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.task-hint-btn {
    margin-bottom: 12px;
}

.task-hint-panel {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.06);
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.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;
    }
}

/* Articles */
.articles {
    padding: 100px 0;
    background: transparent;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 28px;
    padding: 32px;
    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);
    cursor: pointer;
}

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

.article-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.article-date {
    font-size: 13px;
    color: var(--gray);
    white-space: nowrap;
}

.article-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.article-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--dark);
    line-height: 1.35;
}

.article-excerpt {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.article-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border: none;
    background: none;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: gap 0.3s ease;
}

.article-read-btn i {
    font-size: 13px;
    transition: transform 0.3s ease;
}

.article-card:hover .article-read-btn {
    gap: 14px;
}

.article-card:hover .article-read-btn i {
    transform: translateX(4px);
}

/* Article reading mode */
.article-reader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
    pointer-events: none;
}

.article-reader.is-open {
    pointer-events: auto;
}

.article-reader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.article-reader.is-open .article-reader-backdrop {
    opacity: 1;
}

.article-reader-panel {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: 92vh;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.article-reader.is-open .article-reader-panel {
    transform: translateY(0);
}

.article-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 16px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.article-reader-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.article-reader-close {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 50%;
    background: white;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.article-reader-close:hover {
    color: var(--dark);
    border-color: var(--primary);
    background: var(--light);
}

.article-reader-scroll {
    overflow-y: auto;
    padding: 28px 28px 48px;
    -webkit-overflow-scrolling: touch;
}

.article-reader-title {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark);
    margin-bottom: 28px;
}

.article-reader-content {
    font-size: 18px;
    line-height: 1.75;
    color: #334155;
}

.article-reader-content .article-lead {
    font-size: 20px;
    line-height: 1.7;
    color: var(--dark);
    margin-bottom: 28px;
}

.article-reader-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 32px 0 12px;
}

.article-reader-content p {
    margin-bottom: 18px;
}

.article-reader-content ul,
.article-reader-content ol {
    margin: 0 0 18px 24px;
}

.article-reader-content li {
    margin-bottom: 8px;
}

body.article-reader-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .article-reader {
        align-items: center;
        padding: 24px;
    }

    .article-reader-panel {
        max-height: 88vh;
        border-radius: 32px;
        transform: translateY(40px) scale(0.96);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                    opacity 0.35s ease;
    }

    .article-reader.is-open .article-reader-panel {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .article-card {
        padding: 24px;
    }

    .article-reader-header,
    .article-reader-scroll {
        padding-left: 20px;
        padding-right: 20px;
    }

    .article-reader-content {
        font-size: 17px;
    }
}

/* 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 {
        min-height: auto;
        padding: 145px 0 70px;
    }

    .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 14px;
    }

    .header .container {
        gap: 10px;
    }

    .header .logo {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 22px;
        line-height: 1;
    }

    .header .logo::after {
        display: none;
    }

    .header-actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    .header-actions .btn-login,
    .header-actions .btn-secondary {
        padding: 8px 14px;
        font-size: 14px;
        line-height: 1.35;
    }

    .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;
    }
}

/* Missions */
.missions-main,
.mission-detail-main {
    padding-top: 96px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 55%);
}

.missions-hero {
    padding: 72px 0 52px;
}

.missions-hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
    align-items: center;
}

.missions-hero h1 {
    margin: 18px 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
}

.missions-hero p {
    max-width: 720px;
    color: #475569;
    font-size: 19px;
    line-height: 1.7;
}

.missions-callout {
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 28px;
    background: linear-gradient(145deg, #fff7ed, #ffffff);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.missions-callout strong {
    font-size: 22px;
}

.missions-callout p {
    margin: 10px 0 20px;
    font-size: 15px;
}

.missions-callout a,
.mission-card-action,
.mission-back {
    text-decoration: none;
}

.missions-catalog {
    padding: 20px 0 90px;
}

.mission-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
}

.mission-filters label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.mission-filters select {
    padding: 12px 14px;
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    background: white;
    color: #0f172a;
    font: inherit;
}

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

.mission-card {
    display: grid;
    gap: 18px;
    padding: 26px;
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 26px;
    background: white;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mission-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 52px rgba(37, 99, 235, 0.14);
}

.mission-card-active {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 16px 44px rgba(37, 99, 235, 0.12);
}

.mission-card[hidden] {
    display: none;
}

.mission-card-top,
.mission-detail-badges,
.mission-meta,
.mission-rewards,
.mission-progress-label,
.mission-reward-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mission-card-top {
    justify-content: space-between;
}

.mission-emoji {
    display: inline-grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    font-size: 30px;
}

.mission-difficulty,
.mission-chip {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.mission-difficulty-easy { background: #dcfce7; color: #15803d; }
.mission-difficulty-medium { background: #dbeafe; color: #1d4ed8; }
.mission-difficulty-hard { background: #ffedd5; color: #c2410c; }
.mission-difficulty-expert { background: #f3e8ff; color: #7e22ce; }

.mission-card h2 {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 25px;
    line-height: 1.25;
}

.mission-card p {
    color: #64748b;
    line-height: 1.55;
}

.mission-meta {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.mission-meta span {
    padding: 7px 10px;
    border-radius: 9px;
    background: #f8fafc;
}

.mission-progress-block {
    display: grid;
    gap: 8px;
}

.mission-progress-label {
    justify-content: space-between;
    color: #64748b;
    font-size: 13px;
}

.mission-progress-label strong {
    color: #2563eb;
}

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

.mission-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    transition: width 0.35s ease;
}

.mission-rewards span {
    padding: 7px 10px;
    border-radius: 9px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

.mission-card-action {
    display: block;
    width: 100%;
    margin-top: auto;
    text-align: center;
}

.mission-empty {
    padding: 48px;
    text-align: center;
    color: #64748b;
}

.mission-detail-hero {
    padding: 44px 0 30px;
}

.mission-back {
    display: inline-flex;
    margin-bottom: 18px;
    color: #475569;
    font-weight: 700;
}

.mission-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
    gap: 28px;
    padding: 34px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 30px;
    background: white;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
}

.mission-detail-copy h1 {
    margin: 20px 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.mission-detail-copy > p {
    max-width: 760px;
    color: #475569;
    font-size: 17px;
    line-height: 1.65;
}

.mission-detail-meta {
    margin-top: 20px;
}

.mission-result-panel {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(145deg, #eff6ff, #f0fdfa);
}

.mission-result-panel > span {
    color: #475569;
    font-weight: 700;
}

.mission-result-panel > strong {
    color: #1d4ed8;
    font-size: 46px;
}

.mission-result-panel p,
.mission-result-panel small {
    color: #64748b;
}

.mission-detail-content {
    padding: 28px 0 90px;
}

.mission-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 28px;
    align-items: start;
}

.mission-section-heading span {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mission-section-heading h2 {
    margin: 8px 0 20px;
    font-size: 32px;
}

.mission-step-list {
    display: grid;
    gap: 14px;
}

.mission-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
}

.mission-step-index {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}

.mission-step-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.mission-step h3 {
    margin-bottom: 5px;
    color: #0f172a;
    font-size: 18px;
}

.mission-step p {
    margin-bottom: 8px;
    color: #64748b;
    line-height: 1.5;
}

.mission-step-copy span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.mission-step-action {
    flex: 0 0 auto;
    text-decoration: none;
}

.mission-step-completed {
    border-color: #86efac;
    background: #f0fdf4;
}

.mission-step-completed .mission-step-index {
    background: #22c55e;
    color: white;
}

.mission-sidebar {
    display: grid;
    gap: 16px;
}

.mission-info-panel,
.mission-mentor-panel {
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
}

.mission-info-panel h2 {
    margin-bottom: 16px;
    font-size: 18px;
}

.mission-reward-big {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
    color: #2563eb;
}

.mission-reward-big strong {
    font-size: 38px;
}

.mission-reward-big span {
    font-weight: 900;
}

.mission-reward-row {
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}

.mission-achievement,
.mission-mentor-panel {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mission-achievement {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #fffbeb;
}

.mission-achievement > span,
.mission-mentor-panel > span {
    font-size: 28px;
}

.mission-achievement div,
.mission-mentor-panel div {
    display: grid;
    gap: 4px;
}

.mission-achievement small,
.mission-mentor-panel p {
    color: #64748b;
    line-height: 1.45;
}

.mission-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mission-topics span {
    padding: 8px 10px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.mission-mentor-panel {
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(145deg, #faf5ff, #ffffff);
}

.mission-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    max-width: 360px;
    padding: 15px 18px;
    border-radius: 14px;
    background: #166534;
    color: white;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    font-weight: 700;
}

.mission-toast-error {
    background: #b91c1c;
}

.cabinet-active-mission {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 24px 0;
    padding: 20px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 20px;
    background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.cabinet-active-mission-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: white;
    font-size: 27px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.cabinet-active-mission-copy {
    display: grid;
    gap: 7px;
}

.cabinet-active-mission-copy > span,
.cabinet-active-mission-copy small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.cabinet-active-mission-copy h3 {
    font-size: 17px;
}

.mission-native-progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border: none;
    border-radius: 999px;
    background: #e2e8f0;
}

.mission-native-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e2e8f0;
}

.mission-native-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.mission-native-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.cabinet-active-mission > a {
    text-decoration: none;
}

@media (max-width: 900px) {
    .missions-hero-grid,
    .mission-detail-card,
    .mission-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .missions-main,
    .mission-detail-main {
        padding-top: 76px;
    }

    .missions-hero {
        padding-top: 44px;
    }

    .mission-grid,
    .mission-filters {
        grid-template-columns: 1fr;
    }

    .mission-detail-card {
        padding: 22px;
    }

    .mission-step-copy {
        align-items: flex-start;
        flex-direction: column;
    }

    .mission-step-action {
        width: 100%;
        text-align: center;
    }

    .cabinet-active-mission {
        grid-template-columns: auto 1fr;
    }

    .cabinet-active-mission > a {
        grid-column: 1 / -1;
        text-align: center;
    }
}

/* Interactive app demo */
.app-demo-section {
    padding: 90px 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 35%, rgba(14, 165, 233, 0.18), transparent 30%),
        linear-gradient(145deg, #f8fbff 0%, #eaf6ff 100%);
}

.app-demo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 72px;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
}

.app-demo-prompt h2 {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    font-size: clamp(52px, 7vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.app-demo-last-line {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--primary);
}

.app-demo-arrow {
    display: inline-flex;
    color: var(--primary);
    animation: appDemoArrow 1.8s ease-in-out infinite;
}

.app-demo-arrow svg {
    display: block;
}

@keyframes appDemoArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.app-demo-prompt > p {
    max-width: 620px;
    color: var(--gray);
    font-size: 18px;
}

.app-demo-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.app-demo-points span {
    padding: 8px 12px;
    color: var(--primary-dark);
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.app-demo-device {
    position: relative;
    width: 390px;
    height: 760px;
    padding: 12px;
    justify-self: center;
    background: #0f172a;
    border: 3px solid #1e293b;
    border-radius: 48px;
    box-shadow:
        0 45px 80px rgba(15, 23, 42, 0.26),
        inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.app-demo-speaker {
    position: absolute;
    top: 17px;
    left: 50%;
    width: 88px;
    height: 23px;
    z-index: 2;
    transform: translateX(-50%);
    background: #0f172a;
    border-radius: 0 0 14px 14px;
}

.app-demo-frame {
    display: block;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border: 0;
    border-radius: 35px;
}

/* Telegram Mini App */
.miniapp-page {
    min-height: 100vh;
    color: #182034;
    background: var(--tg-theme-bg-color, #f7f8fc);
}

.miniapp-page [hidden] {
    display: none !important;
}

.miniapp-page::before,
.miniapp-page::after {
    display: none;
}

.miniapp-shell {
    width: 100%;
    max-width: 560px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--tg-theme-bg-color, #f7f8fc);
}

.miniapp-app {
    min-height: 100vh;
    padding: 18px 18px 98px;
}

.miniapp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.miniapp-logo {
    color: #182034;
    text-decoration: none;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.miniapp-top-stats {
    display: flex;
    align-items: center;
    gap: 5px;
}

.miniapp-top-stats > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 10px;
    font-size: 11px;
}

.miniapp-top-stats b {
    font-size: 11px;
}

.miniapp-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.miniapp-greeting p {
    color: #8a91a3;
    font-size: 13px;
    font-weight: 600;
}

.miniapp-greeting h1 {
    font-size: 29px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.miniapp-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: linear-gradient(145deg, #2563eb, #0ea5e9);
    border-radius: 16px;
    font-size: 19px;
    font-weight: 900;
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.22);
}

.miniapp-level-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    padding: 15px 16px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 18px;
}

.miniapp-level-copy {
    display: flex;
    flex-direction: column;
}

.miniapp-level-copy span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.miniapp-level-copy strong {
    font-size: 14px;
}

.miniapp-level-percent {
    align-self: center;
    color: #596174;
    font-size: 13px;
    font-weight: 800;
}

.miniapp-level-track {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    background: #e9edf5;
    border-radius: 999px;
}

.miniapp-level-track > div {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: inherit;
    transition: width 0.45s ease;
}

.miniapp-focus-card {
    padding: 18px;
    margin-bottom: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 10%, rgba(103, 232, 249, 0.32), transparent 27%),
        linear-gradient(145deg, #172554 0%, #1d4ed8 65%, #0284c7 100%);
    border-radius: 24px;
    box-shadow: 0 18px 36px rgba(30, 64, 175, 0.2);
}

.miniapp-focus-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.miniapp-focus-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    font-size: 21px;
}

.miniapp-focus-head small,
.miniapp-section-title small {
    display: block;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.miniapp-focus-head h2 {
    font-size: 17px;
    line-height: 1.22;
}

.miniapp-focus-progress {
    margin: 17px 0;
}

.miniapp-focus-progress > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
}

.miniapp-focus-card .miniapp-level-track {
    background: rgba(255, 255, 255, 0.17);
}

.miniapp-focus-card .miniapp-level-track > div {
    background: #67e8f9;
}

.miniapp-today-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    color: #182034;
    background: #fff;
    border-radius: 17px;
}

.miniapp-today-task > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.miniapp-today-task span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.miniapp-today-task strong {
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.miniapp-today-task small {
    color: #8a91a3;
    font-size: 9px;
}

.miniapp-play-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 22px;
    transition: transform 0.2s ease;
}

.miniapp-play-button:active {
    transform: scale(0.92);
}

.miniapp-skill-preview,
.miniapp-practice {
    padding: 17px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 21px;
}

.miniapp-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.miniapp-section-title small {
    color: #8a91a3;
}

.miniapp-section-title h2 {
    font-size: 17px;
}

.miniapp-section-title a,
.miniapp-section-title button {
    color: var(--primary);
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.miniapp-skill-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.miniapp-skill-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 12px 6px;
    text-align: center;
    background: #f7f8fc;
    border: 1px solid #edf0f5;
    border-radius: 15px;
}

.miniapp-skill-node > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 7px;
    color: #fff;
    background: #cbd5e1;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
}

.miniapp-skill-node strong {
    overflow: hidden;
    width: 100%;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.miniapp-skill-node small {
    color: #8a91a3;
    font-size: 8px;
}

.miniapp-skill-master > span { background: #22c55e; }
.miniapp-skill-current {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.miniapp-skill-current > span { background: #3b82f6; }
.miniapp-skill-locked { opacity: 0.58; }

.miniapp-practice {
    position: relative;
    margin-bottom: 16px;
    scroll-margin-top: 16px;
}

.miniapp-close-task {
    width: 32px;
    height: 32px;
    color: #8a91a3;
    background: #f2f4f8;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
}

.miniapp-task-progress {
    height: 7px;
    overflow: hidden;
    background: #e9edf5;
    border-radius: 999px;
}

.miniapp-task-progress > div {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: inherit;
    transition: width 0.35s ease;
}

.miniapp-task-counter {
    display: block;
    margin-top: 5px;
    color: #8a91a3;
    text-align: right;
    font-size: 9px;
    font-weight: 700;
}

.miniapp-question {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 16px 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.miniapp-question small {
    color: #8a91a3;
    font-size: 11px;
    font-weight: 600;
}

.miniapp-finish-icon {
    font-size: 35px;
}

.miniapp-options {
    display: grid;
    gap: 8px;
}

.miniapp-option {
    width: 100%;
    padding: 12px 14px;
    color: #31394c;
    text-align: left;
    background: #f7f8fc;
    border: 1px solid #e4e8f0;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    transition: 0.18s ease;
}

.miniapp-option:active {
    transform: scale(0.98);
}

.miniapp-option.correct {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.miniapp-option.wrong {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.miniapp-answer-form {
    display: flex;
    gap: 8px;
}

.miniapp-answer-form input {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid #dbe0e9;
    border-radius: 12px;
    font: inherit;
}

.miniapp-answer-form button,
.miniapp-next-button {
    padding: 12px 15px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.miniapp-next-button {
    width: 100%;
    margin-top: 10px;
}

.miniapp-feedback {
    min-height: 18px;
    margin-top: 9px;
    font-size: 11px;
    font-weight: 700;
}

.miniapp-feedback-success { color: #15803d; }
.miniapp-feedback-error { color: #b91c1c; }

.miniapp-status {
    min-height: 18px;
    margin: 10px 0 0;
    color: #8a91a3;
    text-align: center;
    font-size: 9px;
}

.miniapp-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 560px;
    margin: 0 auto;
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e8ebf2;
    backdrop-filter: blur(16px);
}

.miniapp-nav a,
.miniapp-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #9aa1b1;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.miniapp-nav span {
    font-size: 18px;
    line-height: 1;
}

.miniapp-nav small {
    font-size: 8px;
    font-weight: 700;
}

.miniapp-nav a.active,
.miniapp-nav button.active {
    color: var(--primary);
}

.miniapp-view {
    animation: miniappViewIn 0.22s ease;
}

@keyframes miniappViewIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.miniapp-page-heading {
    margin: 8px 0 20px;
}

.miniapp-page-heading > small,
.miniapp-profile-hero > small {
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.miniapp-page-heading h1 {
    font-size: 30px;
    letter-spacing: -0.04em;
}

.miniapp-page-heading p {
    max-width: 390px;
    margin-top: 4px;
    color: #8a91a3;
    font-size: 12px;
}

.miniapp-mission-card {
    padding: 17px;
    margin-bottom: 11px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 20px;
}

.miniapp-mission-card.active {
    color: #fff;
    background: linear-gradient(145deg, #172554, #1d4ed8 70%, #0284c7);
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.18);
}

.miniapp-mission-head {
    display: flex;
    align-items: center;
    gap: 11px;
}

.miniapp-mission-head > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    background: #eff6ff;
    border-radius: 13px;
    font-size: 20px;
}

.miniapp-mission-card.active .miniapp-mission-head > span {
    background: rgba(255, 255, 255, 0.14);
}

.miniapp-mission-head small {
    color: #8a91a3;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.miniapp-mission-card.active .miniapp-mission-head small {
    color: rgba(255, 255, 255, 0.65);
}

.miniapp-mission-head h2 {
    font-size: 15px;
    line-height: 1.25;
}

.miniapp-mission-card > p {
    margin: 12px 0;
    color: #8a91a3;
    font-size: 11px;
}

.miniapp-mission-progress {
    height: 7px;
    margin: 16px 0 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.17);
    border-radius: 999px;
}

.miniapp-mission-progress span {
    display: block;
    height: 100%;
    background: #67e8f9;
    border-radius: inherit;
}

.miniapp-mission-meta {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
}

.miniapp-mission-card > button {
    width: 100%;
    padding: 11px;
    margin-top: 12px;
    color: var(--primary);
    background: #eff6ff;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
}

.miniapp-mission-card.active > button {
    color: #172554;
    background: #fff;
}

.miniapp-inline-notice {
    min-height: 20px;
    color: #15803d;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
}

.miniapp-skill-summary {
    padding: 17px;
    margin-bottom: 14px;
    background: linear-gradient(145deg, #eff6ff, #fff);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
}

.miniapp-skill-summary > div:first-child {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
}

.miniapp-skill-summary > div:first-child > span {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    background: #fff;
    border-radius: 13px;
    font-size: 20px;
}

.miniapp-skill-summary > div:first-child div {
    display: flex;
    flex-direction: column;
}

.miniapp-skill-summary small {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.miniapp-skill-summary strong {
    font-size: 16px;
}

.miniapp-skill-summary p {
    margin-top: 8px;
    color: #697386;
    font-size: 10px;
}

.miniapp-tree-section {
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 19px;
}

.miniapp-tree-section > h2 {
    margin-bottom: 11px;
    font-size: 15px;
}

.miniapp-tree-topic {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    margin-top: 7px;
    color: #31394c;
    text-align: left;
    background: #f7f8fc;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    transition: 0.18s ease;
}

.miniapp-tree-topic.selected,
.miniapp-tree-topic:active {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: scale(0.99);
}

.miniapp-tree-topic > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: #cbd5e1;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
}

.miniapp-tree-topic.master > span { background: #22c55e; }
.miniapp-tree-topic.current > span { background: #3b82f6; }
.miniapp-tree-topic.locked { opacity: 0.58; }

.miniapp-tree-topic > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.miniapp-tree-topic strong {
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.miniapp-tree-topic small {
    color: #8a91a3;
    font-size: 8px;
}

.miniapp-tree-topic b {
    color: #8a91a3;
    font-size: 9px;
}

.miniapp-profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 18px;
    margin-bottom: 14px;
    text-align: center;
    background: linear-gradient(145deg, #eff6ff, #fff);
    border: 1px solid #dbeafe;
    border-radius: 22px;
}

.miniapp-profile-avatar {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 11px;
    color: #fff;
    background: linear-gradient(145deg, #2563eb, #06b6d4);
    border: 4px solid #fff;
    border-radius: 22px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
    font-size: 27px;
    font-weight: 900;
}

.miniapp-profile-hero h1 {
    font-size: 23px;
}

.miniapp-profile-hero > span {
    margin-top: 4px;
    padding: 5px 10px;
    color: var(--primary);
    background: #dbeafe;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.miniapp-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 14px;
}

.miniapp-profile-grid article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 9px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 16px;
}

.miniapp-profile-grid article > span {
    grid-row: span 2;
    font-size: 22px;
}

.miniapp-profile-grid strong {
    font-size: 18px;
    line-height: 1.1;
}

.miniapp-profile-grid small {
    color: #8a91a3;
    font-size: 8px;
}

.miniapp-profile-achievements {
    padding: 16px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 19px;
}

.miniapp-profile-achievements > div:not(.miniapp-section-title) {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #f0f2f6;
}

.miniapp-profile-achievements > div > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: #fefce8;
    border-radius: 12px;
}

.miniapp-profile-achievements > div > div {
    display: flex;
    flex-direction: column;
}

.miniapp-profile-achievements strong {
    font-size: 11px;
}

.miniapp-profile-achievements small {
    color: #8a91a3;
    font-size: 8px;
}

.miniapp-reward {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    padding: 22px;
    color: #fff;
    text-align: center;
    background: rgba(15, 23, 42, 0.94);
    border-radius: 22px;
    transform: translate(-50%, -50%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
    animation: miniappReward 0.3s ease;
}

.miniapp-reward > span { font-size: 34px; }
.miniapp-reward > strong { font-size: 25px; }
.miniapp-reward > small { color: #cbd5e1; }

@keyframes miniappReward {
    from { opacity: 0; transform: translate(-50%, -44%) scale(0.88); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.miniapp-page .miniapp-loader {
    min-height: 100vh;
    justify-content: center;
    padding: 40px;
}

@media (max-width: 900px) {
    .app-demo {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .app-demo-prompt {
        text-align: center;
    }

    .app-demo-prompt h2,
    .app-demo-last-line,
    .app-demo-points {
        align-items: center;
        justify-content: center;
    }

    .app-demo-prompt > p {
        margin-inline: auto;
    }

    .app-demo-arrow {
        transform: rotate(90deg);
        animation: none;
    }
}

@media (max-width: 480px) {
    .app-demo-section {
        padding: 64px 0;
    }

    .app-demo-prompt h2 {
        font-size: 48px;
    }

    .app-demo-last-line {
        gap: 10px;
    }

    .app-demo-arrow svg {
        width: 46px;
        height: 46px;
    }

    .app-demo-device {
        width: min(390px, calc(100vw - 28px));
        height: 720px;
        border-radius: 42px;
    }

    .miniapp-app {
        padding-inline: 14px;
    }
}

/* Shared progress line chart */
.progress-line-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 22px;
}

.dashboard-progress-chart {
    margin-top: 14px;
}

.miniapp-progress-chart {
    padding: 16px;
    margin-bottom: 16px;
}

.progress-line-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.progress-line-heading small {
    display: block;
    margin-bottom: 2px;
    color: #8a91a3;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.progress-line-heading h2 {
    font-size: 19px;
    line-height: 1.2;
}

.progress-line-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.progress-line-metrics span {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

.progress-line-metrics .xp {
    color: #1d4ed8;
    background: #dbeafe;
}

.progress-line-metrics .tasks {
    color: #0e7490;
    background: #cffafe;
}

.progress-chart-canvas {
    width: 100%;
    min-height: 132px;
    margin-top: 10px;
}

.progress-chart-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.progress-chart-grid-line {
    stroke: #e8ebf2;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.progress-chart-xp-line,
.progress-chart-task-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.progress-chart-xp-line {
    stroke: #2563eb;
}

.progress-chart-task-line {
    stroke: #06b6d4;
}

.progress-chart-xp-line-area {
    fill: rgba(37, 99, 235, 0.07);
}

.progress-chart-task-line-area {
    fill: rgba(6, 182, 212, 0.04);
}

.progress-chart-xp-line-point {
    fill: #fff;
    stroke: #2563eb;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.progress-chart-task-line-point {
    fill: #fff;
    stroke: #06b6d4;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.progress-chart-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-top: -5px;
    color: #9aa1b1;
    font-size: 8px;
    text-align: center;
    text-transform: uppercase;
}

.progress-chart-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 10px;
    color: #697386;
    font-size: 9px;
    font-weight: 700;
}

.progress-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.progress-chart-legend i {
    width: 14px;
    height: 3px;
    border-radius: 999px;
}

.progress-chart-legend i.xp {
    background: #2563eb;
}

.progress-chart-legend i.tasks {
    background: #06b6d4;
}

@media (max-width: 480px) {
    .progress-line-heading {
        align-items: flex-start;
    }

    .progress-line-metrics {
        max-width: 120px;
    }

    .progress-chart-canvas {
        min-height: 118px;
    }
}