/* ====== INDEX PAGE ====== */
/* ====== ВИДЕО-СЕКЦИЯ ====== */
    body.page-index .hero-section {
        position: relative;
        width: 100%;
        height: 100vh;
        overflow: hidden;
    }

    body.page-index .hero-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    body.page-index .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg,
            rgba(10, 25, 41, 0.7) 0%,
            rgba(11, 24, 62, 0.8) 50%,
            rgba(3, 8, 18, 0.95) 100%);
        z-index: 2;
        pointer-events: none;
    }

    body.page-index .hero-content {
        position: relative;
        z-index: 3;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 14px var(--vm-top-inline-padding, 5%) 74px;
    }

    /* Верхняя панель */
    body.page-index .hero-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        animation: slideDown 1s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    body.page-index .logo {
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    body.page-index .logo:hover {
        transform: scale(1.02);
    }

    body.page-index .logo-icon {
        min-width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        box-shadow: none;
        transition: var(--transition-smooth);
    }

    body.page-index .site-logo-index {
        display: block;
        width: auto;
        height: 60px;
        object-fit: contain;
    }

    body.page-index .logo-icon:hover {
        transform: scale(1.03);
    }

    body.page-index .logo-text {
        font-size: clamp(1.08rem, 1.45vw, 1.3rem);
        font-weight: 700;
        color: var(--white);
        letter-spacing: 0.5px;
        text-shadow: 0 0 20px rgba(0, 150, 255, 0.7);
    }

    body.page-index .logo-subtext {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.9);
        margin-top: 3px;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }

    /* Кнопка рейтинга по центру - СЕРЕБРЯНАЯ */
    body.page-index .rating-center-btn {
        background: rgba(90, 90, 90, 0.6);
        backdrop-filter: blur(15px);
        border: 1.5px solid var(--silver-color);
        color: white;
        padding: 7px 18px;
        border-radius: 50px;
        font-size: 0.9rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        transition: var(--transition-smooth);
        letter-spacing: 0.6px;
        box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
    }

    body.page-index .rating-center-btn:hover {
        transform: translateY(-3px) scale(1.05);
        background: rgba(120, 120, 120, 0.9);
        border-color: white;
        box-shadow: 0 0 40px rgba(192, 192, 192, 0.6);
    }

    body.page-index .rating-center-btn i {
        font-size: 1.05rem;
        background: var(--silver);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    body.page-index .rating-users-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
        height: 22px;
        padding: 0 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.35);
        font-size: 0.8rem;
        font-weight: 700;
        line-height: 1;
    }

    body.page-index .rating-center-btn:hover i {
        transform: scale(1.2);
        color: white;
        -webkit-text-fill-color: white;
    }

    body.page-index .user-panel {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    body.page-index .xp-badge {
        background: linear-gradient(135deg, rgba(0, 90, 156, 0.9), rgba(0, 128, 201, 0.9));
        backdrop-filter: blur(10px);
        color: var(--white);
        padding: 7px 11px;
        border-radius: 20px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 0 20px rgba(0, 90, 156, 0.5);
        transition: var(--transition-smooth);
        font-size: 0.88rem;
    }

    body.page-index .xp-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 30px rgba(0, 90, 156, 0.8);
    }

    body.page-index .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--gradient-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-weight: bold;
        font-size: 1rem;
        cursor: pointer;
        border: 2px solid var(--secondary-blue);
        transition: var(--transition-smooth);
        box-shadow: 0 0 20px rgba(0, 128, 201, 0.5);
    }

    body.page-index .user-avatar:hover {
        transform: scale(1.1);
        border-color: var(--white);
        box-shadow: 0 0 30px rgba(0, 128, 201, 0.8);
    }

    /* Центральный заголовок */
    /* Меню внизу */
    body.page-index .hero-nav {
        animation: slideUp 1s ease-out 0.6s both;
        margin-bottom: 12px;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    body.page-index .nav-menu {
        display: flex;
        justify-content: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    body.page-index .nav-item {
        padding: 14px 26px;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(15px);
        border: 2px solid rgba(255, 255, 255, 0.15);
        border-radius: 44px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 600;
        font-size: 1.03rem;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        transition: var(--transition-smooth);
        text-decoration: none;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }

    body.page-index .nav-item:hover {
        background: rgba(0, 90, 156, 0.6);
        border-color: rgba(0, 200, 255, 0.6);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 0 50px rgba(0, 90, 156, 0.5);
        color: white;
    }

    body.page-index .nav-item i {
        font-size: 1.12rem;
        transition: var(--transition-smooth);
    }

    body.page-index .nav-item:hover i {
        transform: scale(1.2);
        color: var(--accent-gold);
    }

    body.page-index .nav-item .badge {
        background: var(--accent-gold);
        color: var(--navy-blue);
        padding: 3px 9px;
        border-radius: 30px;
        font-size: 0.76rem;
        font-weight: 700;
        margin-left: 5px;
    }

    /* Плавный переход к контенту */
    body.page-index .content-transition {
        position: relative;
        margin-top: -50px;
        z-index: 10;
    }

    body.page-index .content-transition::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 150px;
        background: linear-gradient(to bottom,
            rgba(10, 25, 41, 0) 0%,
            var(--bg-primary) 100%);
        pointer-events: none;
        z-index: 2;
    }

    /* ====== ОСНОВНОЙ КОНТЕНТ ====== */
    body.page-index .main-content {
        padding: 80px 5% 40px;
        background: var(--bg-primary);
        position: relative;
        z-index: 5;
        animation: fadeInContent 1.5s ease-out 0.8s both;
    }

    @keyframes fadeInContent {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    body.page-index .page {
        display: none;
    }

    body.page-index .page.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Шкала прогресса */
    body.page-index .progress-section {
        background: var(--bg-card);
        border-radius: 18px;
        padding: 22px;
        margin-bottom: 34px;
        box-shadow: var(--shadow);
        border: 1px solid rgba(0, 90, 156, 0.2);
        transition: var(--transition-smooth);
    }

    body.page-index .progress-section:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-heavy);
        border-color: var(--secondary-blue);
    }

    body.page-index .progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    body.page-index .progress-title {
        font-size: 1.2rem;
        color: var(--text-primary);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body.page-index .progress-title i {
        color: var(--primary-blue);
        font-size: 1.35rem;
    }

    body.page-index .progress-bar-container {
        background: rgba(255, 255, 255, 0.1);
        height: 12px;
        border-radius: 7px;
        overflow: hidden;
        margin-bottom: 12px;
    }

    body.page-index .progress-bar {
        height: 100%;
        background: var(--gradient-blue);
        width: 0%;
        transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    body.page-index .progress-bar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        animation: shimmer 2s infinite;
    }

    @keyframes shimmer {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(100%); }
    }

    body.page-index .progress-info {
        display: flex;
        justify-content: space-between;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    /* Заголовки секций */
    body.page-index .section-title {
        font-size: 1.85rem;
        color: var(--text-primary);
        margin-bottom: 24px;
        display: flex;
        align-items: center;
        gap: 14px;
        padding-bottom: 12px;
        border-bottom: 2px solid rgba(0, 90, 156, 0.3);
    }

    body.page-index .section-title i {
        background: var(--gradient-blue);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-size: 2rem;
    }

    /* Матрица игр */
    body.page-index .games-matrix {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 22px;
        margin-bottom: 38px;
    }

    body.page-index .game-card {
        background: var(--gradient-card);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow-light);
        transition: var(--transition-smooth);
        border: 1px solid rgba(0, 90, 156, 0.2);
        cursor: pointer;
        position: relative;
    }

    body.page-index .game-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: var(--shadow-heavy);
        border-color: var(--secondary-blue);
    }

    body.page-index .game-image {
        height: 150px;
        width: 100%;
        background: var(--gradient-dark);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.page-index .game-image::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18));
    }

    body.page-index .game-image i {
        font-size: 4rem;
        color: rgba(255, 255, 255, 0.9);
        transition: var(--transition-smooth);
    }

    body.page-index .game-cover {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center;
        transition: var(--transition-smooth);
    }

    body.page-index .game-card[data-game-id="pong"] .game-cover,
    body.page-index .game-card[data-game-id="traffic-racer"] .game-cover {
        object-fit: contain;
        padding: 8px;
        background: #050d18;
    }

    body.page-index .game-cover-fallback {
        position: relative;
        width: 100%;
        height: 100%;
        display: grid;
        align-items: center;
        justify-items: center;
        padding: 20px 16px 16px;
        overflow: hidden;
        isolation: isolate;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 34%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22));
    }

    body.page-index .game-cover-grid,
    body.page-index .game-cover-lines {
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: -1;
    }

    body.page-index .game-cover-grid {
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
        background-size: 22px 22px;
        opacity: 0.2;
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000 44%, rgba(0, 0, 0, 0.2));
    }

    body.page-index .game-cover-lines {
        background:
            linear-gradient(118deg, transparent 0 30%, rgba(255, 255, 255, 0.16) 30% 31%, transparent 31% 100%),
            linear-gradient(58deg, transparent 0 54%, rgba(255, 255, 255, 0.12) 54% 55%, transparent 55% 100%);
        opacity: 0.68;
    }

    body.page-index .game-cover-fallback i {
        color: rgba(255, 255, 255, 0.86);
        font-size: clamp(3.1rem, 4.8vw, 4.4rem);
        filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
    }

    body.page-index .game-cover-fallback strong {
        display: none;
    }

    body.page-index .game-card:hover .game-cover {
        transform: scale(1.06);
        filter: saturate(1.08) contrast(1.04);
    }

    body.page-index .game-card:hover .game-image i {
        transform: scale(1.2) rotate(5deg);
        color: white;
    }

    body.page-index .game-badge {
        position: absolute;
        top: 15px;
        right: 15px;
        background: var(--accent-teal);
        color: var(--white);
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    body.page-index .game-content {
        padding: 20px;
    }

    body.page-index .game-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 10px;
    }

    body.page-index .game-description {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin-bottom: 16px;
        line-height: 1.5;
    }

    body.page-index .game-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.page-index .game-xp {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--accent-gold);
        font-weight: 600;
        font-size: 1rem;
    }

    body.page-index .game-play-btn {
        background: var(--primary-blue);
        color: var(--white);
        border: none;
        padding: 9px 16px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition-smooth);
    }

    body.page-index .game-play-btn:hover {
        background: var(--secondary-blue);
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(0, 90, 156, 0.5);
    }

    /* Опросы и тесты */
    body.page-index .surveys-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
        margin-bottom: 38px;
    }

    body.page-index .materials-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 18px;
        margin-top: 24px;
        margin-bottom: 38px;
    }

    body.page-index .test-section {
        --test-accent: var(--secondary-blue);
        --test-accent-rgb: 0, 128, 201;
        padding: 0;
        border: 1px solid rgba(var(--test-accent-rgb), 0.24);
        border-left: 4px solid var(--test-accent);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(22, 43, 63, 0.9), rgba(12, 31, 49, 0.86));
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    }

    /* Цветовые акценты секций задаются классами, чтобы они не зависели от
       inline-стилей и сохранялись при строгой CSP. */
    body.page-index .test-section-oge {
        --test-accent: #2dd4bf;
        --test-accent-rgb: 45, 212, 191;
    }

    body.page-index .test-section-ege {
        --test-accent: #8b5cf6;
        --test-accent-rgb: 139, 92, 246;
    }

    body.page-index .test-section-admission {
        --test-accent: #f59e0b;
        --test-accent-rgb: 245, 158, 11;
    }

    body.page-index .test-section-prof {
        --test-accent: #38bdf8;
        --test-accent-rgb: 56, 189, 248;
    }

    body.page-index .test-section:first-child {
        border-top: 1px solid rgba(var(--test-accent-rgb), 0.24);
    }

    body.page-index .test-section[open] {
        border-color: rgba(var(--test-accent-rgb), 0.42);
        border-left-color: var(--test-accent);
        box-shadow: 0 20px 46px rgba(0, 0, 0, 0.26);
    }

    body.page-index .test-section:not([open]):hover {
        border-color: rgba(var(--test-accent-rgb), 0.44);
        transform: translateY(-2px);
    }

    body.page-index .test-section-head {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 0;
        padding: 18px 20px;
        cursor: pointer;
        list-style: none;
        user-select: none;
        transition: background 0.2s ease;
    }

    body.page-index .test-section-head::-webkit-details-marker {
        display: none;
    }

    body.page-index .test-section-head::after {
        content: '';
        position: absolute;
        right: 20px;
        bottom: 0;
        left: 20px;
        height: 1px;
        background: linear-gradient(90deg, rgba(var(--test-accent-rgb), 0.5), rgba(var(--test-accent-rgb), 0));
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    body.page-index .test-section[open] .test-section-head {
        background: rgba(var(--test-accent-rgb), 0.08);
    }

    body.page-index .test-section[open] .test-section-head::after {
        opacity: 1;
    }

    body.page-index .test-section:not([open]) .test-section-head:hover {
        background: rgba(var(--test-accent-rgb), 0.07);
    }

    body.page-index .test-section-head:focus-visible {
        outline: 2px solid rgba(var(--test-accent-rgb), 0.75);
        outline-offset: -5px;
    }

    body.page-index .test-section.is-animating {
        overflow: hidden;
    }

    body.page-index .test-section-body {
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.24s ease, transform 0.24s ease;
        will-change: opacity, transform;
    }

    body.page-index .test-section[open] .test-section-body {
        opacity: 1;
        transform: translateY(0);
    }

    body.page-index .test-section.is-opening .test-section-body,
    body.page-index .test-section.is-closing .test-section-body {
        opacity: 0;
        transform: translateY(-8px);
    }

    body.page-index .test-section-title-group {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 14px;
    }

    body.page-index .test-section-icon {
        flex: 0 0 auto;
        width: 50px;
        height: 50px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        background: rgba(var(--test-accent-rgb), 0.16);
        border: 1px solid rgba(var(--test-accent-rgb), 0.42);
        color: var(--test-accent);
        font-size: 1.2rem;
    }

    body.page-index .test-section-kicker {
        margin-bottom: 4px;
        color: var(--test-accent);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    body.page-index .test-section-title-group h3 {
        margin: 0;
        color: #eef7ff;
        font-size: 1.55rem;
        line-height: 1.12;
    }

    body.page-index .test-section-description {
        max-width: 880px;
        margin: 0 0 18px;
        padding: 18px 20px 0;
        color: #b8c8dd;
        line-height: 1.55;
        font-size: 0.98rem;
    }

    body.page-index .test-section-head-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body.page-index .test-section-progress {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: baseline;
        gap: 5px;
        padding: 9px 13px;
        border-radius: 999px;
        background: rgba(var(--test-accent-rgb), 0.12);
        border: 1px solid rgba(var(--test-accent-rgb), 0.34);
        color: #d7e6f7;
        font-weight: 700;
        white-space: nowrap;
    }

    body.page-index .test-section-progress strong {
        color: var(--test-accent);
        font-size: 1.1rem;
    }

    body.page-index .test-section-toggle {
        flex: 0 0 auto;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(var(--test-accent-rgb), 0.3);
        color: #eef7ff;
        font-size: 0.9rem;
        font-weight: 800;
        white-space: nowrap;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    body.page-index .test-section-toggle i {
        color: var(--test-accent);
        font-size: 0.82rem;
        transition: transform 0.2s ease;
    }

    body.page-index .test-section[open] .test-section-toggle {
        background: rgba(var(--test-accent-rgb), 0.18);
        border-color: rgba(var(--test-accent-rgb), 0.54);
        color: #ffffff;
    }

    body.page-index .test-section[open] .test-section-toggle i {
        transform: rotate(180deg);
    }

    body.page-index .test-section-toggle .when-open {
        display: none;
    }

    body.page-index .test-section[open] .test-section-toggle .when-closed {
        display: none;
    }

    body.page-index .test-section[open] .test-section-toggle .when-open {
        display: inline;
    }

    body.page-index .test-track {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 18px;
        padding: 0 20px 20px;
    }

    @media (prefers-reduced-motion: reduce) {
        body.page-index .test-section,
        body.page-index .test-section-body,
        body.page-index .test-section-toggle i {
            transition: none;
        }
    }

    body.page-index .test-empty-state {
        color: var(--text-secondary);
        margin: 0;
    }

    body.page-index .survey-card {
        background: var(--bg-card);
        border-radius: 14px;
        padding: 22px;
        box-shadow: var(--shadow-light);
        border-left: 3px solid var(--accent-teal);
        transition: var(--transition-smooth);
        position: relative;
        overflow: hidden;
    }

    body.page-index .test-card {
        border-left-color: var(--test-accent);
        background: linear-gradient(145deg, rgba(31, 52, 70, 0.98), rgba(18, 36, 55, 0.99));
        border-top: 0;
        border-right: 1px solid rgba(151, 190, 222, 0.1);
        border-bottom: 1px solid rgba(151, 190, 222, 0.1);
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    body.page-index .test-card::before {
        content: none;
    }

    body.page-index .test-card.is-completed {
        border-color: rgba(52, 211, 153, 0.42);
        border-left-color: #34d399;
        background: linear-gradient(145deg, rgba(25, 50, 48, 0.95), rgba(18, 37, 48, 0.98));
    }

    body.page-index .test-card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
    }

    body.page-index .test-card-icon {
        margin-bottom: 0;
        color: var(--test-accent);
        background: rgba(var(--test-accent-rgb), 0.14);
        border: 1px solid rgba(var(--test-accent-rgb), 0.28);
    }

    body.page-index .test-card-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 135px;
        min-height: 30px;
        padding: 5px 9px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        color: #b9c9dc;
        font-size: 0.75rem;
        font-weight: 800;
        line-height: 1.15;
        white-space: nowrap;
    }

    body.page-index .test-card-status.is-done {
        border-color: rgba(52, 211, 153, 0.42);
        background: rgba(52, 211, 153, 0.13);
        color: #8ff0c5;
    }

    body.page-index .test-card-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    body.page-index .test-card-tags span {
        display: inline-flex;
        align-items: center;
        min-height: 26px;
        padding: 4px 9px;
        border-radius: 999px;
        background: rgba(var(--test-accent-rgb), 0.12);
        color: var(--test-accent);
        font-size: 0.76rem;
        font-weight: 800;
        line-height: 1.15;
    }

    body.page-index .test-card .survey-title {
        color: #eef6ff;
    }

    body.page-index .test-card .survey-description {
        color: #b4c4d8;
        min-height: 4.4em;
    }

    body.page-index .test-card-meta {
        color: #a8bad0;
        margin-top: auto;
    }

    body.page-index .test-card-btn {
        justify-content: space-between;
        border: 1px solid rgba(var(--test-accent-rgb), 0.34);
        background: rgba(0, 112, 180, 0.7);
        box-shadow: none;
    }

    body.page-index .test-card-btn:hover {
        background: rgba(var(--test-accent-rgb), 0.34);
        border-color: rgba(var(--test-accent-rgb), 0.58);
    }

    body.page-index .test-card.is-completed .test-card-btn {
        border-color: rgba(52, 211, 153, 0.38);
        background: rgba(52, 211, 153, 0.15);
    }

    body.page-index .survey-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
        border-left-color: var(--secondary-blue);
    }

    body.page-index .test-card:hover {
        border-left-color: var(--test-accent);
    }

    body.page-index .survey-card.quick-test {
        border-left-color: var(--accent-gold);
        background: linear-gradient(145deg, #1a2a3a, #1d2e42);
        display: flex;
        flex-direction: column;
    }

    body.page-index .survey-card.survey-card-external {
        border-left-color: #58c7ff;
        display: flex;
        flex-direction: column;
    }

    body.page-index .survey-card.exam-material-card {
        border-left-color: #58c7ff;
        background: linear-gradient(145deg, #152638, #102032);
        min-height: 100%;
        display: flex;
        flex-direction: column;
    }

    body.page-index .exam-material-type {
        position: absolute;
        top: 16px;
        right: 16px;
        padding: 4px 9px;
        border-radius: 999px;
        border: 1px solid rgba(88, 199, 255, 0.32);
        background: rgba(88, 199, 255, 0.12);
        color: #aee8ff;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    body.page-index .exam-material-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
        gap: 10px;
        margin-top: auto;
    }

    body.page-index .exam-material-link {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid rgba(89, 194, 255, 0.35);
        background: linear-gradient(135deg, rgba(0, 112, 180, 0.92), rgba(0, 132, 201, 0.86));
        box-shadow: none;
        font-size: 0.88rem;
        line-height: 1.25;
        justify-content: space-between;
        text-align: left;
        gap: 10px;
    }

    body.page-index .exam-material-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0, 90, 156, 0.28);
    }

    body.page-index .exam-material-link-label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    body.page-index .exam-material-link i {
        flex: 0 0 auto;
        font-size: 0.9rem;
    }

    body.page-index .survey-card.quick-test::before {
        content: '⚡';
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 2rem;
        opacity: 0.1;
        transform: rotate(15deg);
    }

    body.page-index .survey-icon {
        width: 52px;
        height: 52px;
        background: rgba(0, 90, 156, 0.2);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 14px;
        color: var(--secondary-blue);
        font-size: 1.28rem;
        transition: var(--transition-smooth);
    }

    body.page-index .survey-card:hover .survey-icon {
        transform: scale(1.1);
        background: rgba(0, 90, 156, 0.3);
    }

    body.page-index .survey-title {
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 10px;
    }

    body.page-index .survey-description {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin-bottom: 16px;
        line-height: 1.5;
    }

    body.page-index .survey-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        font-size: 0.86rem;
        color: var(--text-secondary);
        flex-wrap: wrap;
        gap: 8px;
    }

    body.page-index .survey-reward {
        background: rgba(255, 209, 102, 0.15);
        color: var(--accent-gold);
        padding: 4px 12px;
        border-radius: 20px;
        font-weight: 600;
    }

    body.page-index .survey-btn {
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        background: var(--primary-blue);
        color: var(--white);
        border: none;
        border-radius: 10px;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition-smooth);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 0.94rem;
        line-height: 1.2;
        text-align: center;
    }

    body.page-index .survey-btn-link {
        text-decoration: none;
    }

    body.page-index .survey-card.quick-test .survey-btn-link,
    body.page-index .survey-card.survey-card-external .survey-btn-link {
        margin-top: auto;
        justify-content: space-between;
    }

    body.page-index .survey-card.quick-test .survey-btn-link i,
    body.page-index .survey-card.survey-card-external .survey-btn-link i {
        flex: 0 0 auto;
        font-size: 0.92rem;
    }

    body.page-index .survey-btn:hover {
        background: var(--secondary-blue);
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(0, 90, 156, 0.4);
    }

    /* Меню пользователя */
    body.page-index .user-menu {
        position: absolute;
        top: 100px;
        right: 5%;
        background: var(--bg-card);
        border-radius: 15px;
        box-shadow: var(--shadow-heavy);
        min-width: 250px;
        z-index: 1001;
        display: none;
        overflow: hidden;
        border: 1px solid rgba(0, 90, 156, 0.3);
    }

    body.page-index .user-menu.active {
        display: block;
    }

    body.page-index .user-menu-item {
        padding: 15px 20px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-primary);
        text-decoration: none;
        transition: background 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        cursor: pointer;
    }

    body.page-index .user-menu-item:hover {
        background: var(--bg-hover);
    }

    body.page-index .user-menu-item:last-child {
        border-bottom: none;
        color: var(--accent-red);
    }

    body.page-index .user-info {
        padding: 20px;
        background: rgba(0, 90, 156, 0.15);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.page-index .user-name {
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    body.page-index .user-email {
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

    /* Модальное окно */
    body.page-index .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: clamp(10px, 2vh, 20px);
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        z-index: 2000;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        animation: fadeIn 0.3s ease;
    }

    body.page-index .modal-content {
        background: var(--bg-card);
        border-radius: 20px;
        width: 90%;
        max-width: 500px;
        max-height: calc(100dvh - 2 * clamp(10px, 2vh, 20px));
        overflow-y: auto;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(0, 90, 156, 0.3);
        position: relative;
        animation: scaleIn 0.3s ease;
    }

    body.page-index .modal-content.large {
        width: min(96vw, 1180px);
        max-width: 1180px;
        max-height: calc(100dvh - 2 * clamp(10px, 2vh, 20px));
    }

    body.page-index #ratingModal .modal-content.large {
        width: min(86vw, 860px);
        max-width: 860px;
        max-height: calc(100dvh - 2 * clamp(12px, 2.4vh, 24px));
        border-radius: 18px;
    }

    body.page-index #ratingModal .modal-header {
        padding: 20px 22px 14px;
    }

    body.page-index #ratingModal .modal-title {
        font-size: 1.45rem;
    }

    body.page-index #ratingModal .modal-body {
        padding: 16px 22px 20px;
    }

    body.page-index #testModal .modal-content.large {
        width: min(96vw, 1240px);
        max-width: 1240px;
        height: calc(100dvh - 2 * clamp(10px, 2vh, 20px));
        max-height: calc(100dvh - 2 * clamp(10px, 2vh, 20px));
        display: flex;
        flex-direction: column;
    }

    body.page-index #testModal .modal-header {
        flex-shrink: 0;
    }

    body.page-index #testModal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    @keyframes scaleIn {
        from {
            opacity: 0;
            transform: scale(0.9);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    body.page-index .modal-close {
        position: absolute;
        top: 20px;
        right: 25px;
        background: transparent;
        border: none;
        font-size: 1.8rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: color 0.3s;
        z-index: 1;
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
        box-shadow: none;
        line-height: 1;
    }

    body.page-index .modal-close:hover {
        color: var(--accent-red);
        background: transparent;
    }

    body.page-index .modal-header {
        padding: 30px 30px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.page-index .modal-title {
        font-size: 1.8rem;
        color: var(--text-primary);
        font-weight: 600;
    }

    body.page-index .modal-body {
        padding: 30px;
    }

    /* Стили для вопросов теста */
    body.page-index .options-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 30px;
    }

    body.page-index .option-item {
        display: flex;
        align-items: center;
        padding: 15px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    body.page-index .option-item:hover {
        background: rgba(0, 90, 156, 0.2);
        border-color: var(--primary-blue);
    }

    body.page-index .option-item.selected {
        background: rgba(0, 90, 156, 0.3);
        border-color: var(--primary-blue);
    }

    body.page-index .option-item input[type="radio"] {
        margin-right: 15px;
        width: 20px;
        height: 20px;
        accent-color: var(--primary-blue);
    }

    body.page-index .test-intro {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    body.page-index .test-question-shell {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    body.page-index .test-progress-block {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    body.page-index .test-progress-head {
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    body.page-index .test-progress-line {
        height: 8px;
    }

    body.page-index .test-question-title {
        font-size: 1.25rem;
        margin: 0;
        line-height: 1.45;
    }

    body.page-index .test-answer-area {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding-right: 4px;
    }

    body.page-index .test-answer-area .options-container {
        margin-bottom: 0;
    }

    body.page-index .answer-input-wrap {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 4px;
    }

    body.page-index .answer-input-label {
        font-weight: 600;
        color: var(--text-primary);
    }

    body.page-index .answer-input {
        width: 100%;
        border: 1px solid rgba(100, 190, 255, 0.35);
        background: rgba(8, 24, 46, 0.65);
        color: var(--text-primary);
        border-radius: 12px;
        padding: 14px 16px;
        font-size: 1rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    body.page-index .answer-input::placeholder {
        color: var(--text-secondary);
    }

    body.page-index .answer-input:focus {
        outline: none;
        border-color: rgba(76, 190, 255, 0.8);
        box-shadow: 0 0 0 3px rgba(76, 190, 255, 0.15);
    }

    body.page-index .answer-input-hint {
        margin: 0;
        color: var(--text-secondary);
        font-size: 0.92rem;
    }

    body.page-index .test-nav-row {
        display: flex;
        justify-content: space-between;
        gap: 15px;
        margin-top: auto;
        padding-top: 4px;
    }

    body.page-index .test-intro ul {
        margin: 0;
        padding-left: 20px;
        color: var(--text-secondary);
        line-height: 1.5;
    }

    body.page-index .option-item.option-item-visual {
        align-items: flex-start;
        min-height: 112px;
    }

    body.page-index .option-content {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
    }

    body.page-index .option-image {
        width: 96px;
        height: 72px;
        object-fit: cover;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
    }

    body.page-index .option-main {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    body.page-index .faculty-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    body.page-index .faculty-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 28px;
        height: 22px;
        border-radius: 999px;
        background: rgba(0, 174, 255, 0.15);
        border: 1px solid rgba(73, 193, 255, 0.35);
        color: #9bdfff;
        font-size: 0.82rem;
        font-weight: 700;
        padding: 0 8px;
    }

    body.page-index .faculty-result-list {
        display: grid;
        gap: 10px;
        margin: 20px 0;
    }

    body.page-index .faculty-result-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        padding: 12px 14px;
    }

    /* Стили для рейтинга */
    body.page-index .rating-table {
        width: 100%;
        border-collapse: collapse;
        margin: 14px 0;
        font-size: 0.92rem;
    }

    body.page-index .rating-table th {
        text-align: left;
        padding: 10px 8px;
        color: var(--silver-color);
        font-weight: 600;
        border-bottom: 2px solid var(--primary-blue);
        font-size: 0.85rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    body.page-index .rating-table td {
        padding: 10px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
    }

    body.page-index .rating-table td:nth-child(1) {
        width: 60px;
        font-weight: 700;
    }

    body.page-index .rating-table td:nth-child(4) {
        font-weight: 700;
        color: #9fe0ff;
        white-space: nowrap;
    }

    body.page-index .rating-table tr:hover td {
        background: var(--bg-hover);
    }

    body.page-index .rating-table .top-1 td:first-child {
        color: var(--accent-gold);
        font-weight: 700;
    }

    body.page-index .rating-table .top-2 td:first-child {
        color: var(--text-primary);
        font-weight: 700;
    }

    body.page-index .rating-table .top-3 td:first-child {
        color: #cd7f32;
        font-weight: 700;
    }

    body.page-index .rating-table .current-user td {
        background: rgba(0, 90, 156, 0.3);
        color: var(--text-primary);
        font-weight: 600;
        border-left: 3px solid var(--accent-gold);
    }

    body.page-index .rating-stats {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 0 10px;
        padding: 8px 12px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        font-size: 0.88rem;
    }

    body.page-index .rating-stats strong {
        color: var(--text-primary);
    }

    body.page-index .user-rating-footer {
        background: var(--bg-secondary);
        border-radius: 15px;
        padding: 14px;
        margin-top: 12px;
        border: 1px solid var(--primary-blue);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    body.page-index .user-rating-info {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    body.page-index .user-rating-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: var(--gradient-blue);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 1rem;
        color: white;
    }

    body.page-index .user-rating-details h4 {
        color: var(--text-primary);
        margin-bottom: 5px;
    }

    body.page-index .user-rating-details p {
        color: var(--text-secondary);
        font-size: 0.84rem;
    }

    body.page-index .user-rating-place {
        text-align: center;
    }

    body.page-index .user-rating-place .place-number {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--silver-color);
        line-height: 1;
    }

    body.page-index .user-rating-place .place-text {
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

    body.page-index .rating-status-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 3px 8px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    body.page-index .rating-status-badge.gold {
        color: #ffe59c;
        background: rgba(255, 209, 102, 0.14);
        border-color: rgba(255, 209, 102, 0.46);
    }

    body.page-index .rating-status-badge.silver {
        color: #e7f0ff;
        background: rgba(208, 222, 245, 0.14);
        border-color: rgba(208, 222, 245, 0.42);
    }

    body.page-index .rating-status-badge.bronze {
        color: #ffd1a6;
        background: rgba(205, 127, 50, 0.16);
        border-color: rgba(205, 127, 50, 0.42);
    }

    body.page-index .rating-status-badge.current {
        color: #bff5ff;
        background: rgba(0, 128, 201, 0.18);
        border-color: rgba(91, 201, 255, 0.5);
    }

    body.page-index .rating-status-badge.neutral {
        color: #c8d6ec;
        background: rgba(255, 255, 255, 0.06);
    }

    body.page-index .form-group {
        margin-bottom: 25px;
    }

    body.page-index .rating-category-tabs {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin: 0 0 12px;
    }

    body.page-index .rating-category-tab {
        appearance: none;
        border: 1px solid rgba(93, 184, 255, 0.34);
        border-radius: 999px;
        min-width: 112px;
        padding: 9px 16px;
        background: linear-gradient(145deg, rgba(17, 51, 83, .92), rgba(8, 27, 49, .92));
        color: var(--text-secondary);
        font: inherit;
        font-size: 0.88rem;
        font-weight: 700;
        cursor: pointer;
        transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
    }

    body.page-index .rating-category-tab:hover,
    body.page-index .rating-category-tab.active {
        background: linear-gradient(135deg, #0078c8, #10b8ed);
        border-color: #49d7ff;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(0, 153, 224, .28);
    }

    body.page-index .form-label {
        display: block;
        margin-bottom: 10px;
        color: var(--text-secondary);
        font-size: 0.95rem;
        font-weight: 500;
    }

    body.page-index .form-input,
body.page-index .form-select {
        width: 100%;
        padding: 14px 18px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: var(--text-primary);
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    body.page-index .form-input:focus,
body.page-index .form-select:focus {
        outline: none;
        border-color: var(--primary-blue);
        background: rgba(0, 90, 156, 0.1);
        box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.2);
    }

    body.page-index .form-actions {
        display: flex;
        gap: 15px;
        margin-top: 35px;
    }

    body.page-index .btn {
        padding: 14px 25px;
        border-radius: 10px;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: all 0.3s ease;
        flex: 1;
        font-size: 1rem;
    }

    body.page-index .btn-primary {
        background: var(--primary-blue);
        color: var(--white);
    }

    body.page-index .btn-primary:hover {
        background: var(--secondary-blue);
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(0, 90, 156, 0.4);
    }

    body.page-index .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    body.page-index .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        color: var(--text-primary);
    }

    /* Уведомления */
    body.page-index .notification {
        position: fixed;
        bottom: 30px;
        right: 30px;
        background: var(--gradient-blue);
        color: var(--white);
        padding: 18px 25px;
        border-radius: 12px;
        box-shadow: var(--shadow-heavy);
        display: none;
        align-items: center;
        gap: 12px;
        z-index: 3000;
        animation: slideInRight 0.3s ease;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    body.page-index .notification.error {
        background: linear-gradient(135deg, #e63946, #ff6b6b);
    }

    /* ====== ФУТЕР ====== */






    /* ====== АДАПТИВНОСТЬ ====== */
    @media (max-width: 768px) {
        body.page-index .hero-header {
            flex-direction: column;
            gap: 20px;
            text-align: center;
        }

        body.page-index .user-panel {
            width: 100%;
            justify-content: center;
        }

        body.page-index .nav-item {
            padding: 12px 20px;
            font-size: 0.92rem;
        }

        body.page-index #ratingModal .modal-content.large {
            width: 94vw;
            max-width: 94vw;
        }

        body.page-index #ratingModal .modal-header {
            padding: 16px 16px 12px;
        }

        body.page-index #ratingModal .modal-body {
            padding: 12px 16px 16px;
        }

        body.page-index .rating-table th,
body.page-index .rating-table td {
            padding: 8px 6px;
            font-size: 0.8rem;
        }

        body.page-index .rating-stats {
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }

        body.page-index .games-matrix,
body.page-index .surveys-container,
body.page-index .materials-container {
            grid-template-columns: 1fr;
        }

        body.page-index .test-section-head {
            align-items: flex-start;
            flex-direction: column;
            padding: 16px;
        }

        body.page-index .test-section-head-actions {
            width: 100%;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
        }

        body.page-index .test-section-progress {
            width: auto;
            justify-content: center;
        }

        body.page-index .test-section-description {
            padding: 16px 16px 0;
        }

        body.page-index .test-track {
            grid-template-columns: 1fr;
            padding: 0 16px 16px;
        }

        body.page-index .section-title {
            font-size: 1.8rem;
        }


        body.page-index #testModal .modal-content.large {
            width: 98vw;
        }

        body.page-index .test-nav-row {
            flex-direction: column;
        }

        body.page-index .test-nav-row .btn {
            width: 100%;
        }

    }

    @media (max-width: 480px) {
        body.page-index .nav-item {
            width: 100%;
            justify-content: center;
        }

        body.page-index .logo-text {
            font-size: 1.02rem;
        }

        body.page-index .test-section-title-group {
            align-items: flex-start;
        }

        body.page-index .test-section-icon {
            width: 44px;
            height: 44px;
        }

        body.page-index .test-section-title-group h3 {
            font-size: 1.28rem;
        }

        body.page-index .test-section-head-actions {
            grid-template-columns: 1fr;
        }

        body.page-index .test-section-progress,
        body.page-index .test-section-toggle {
            width: 100%;
        }

        body.page-index .test-card {
            padding: 18px;
        }

    }

/* ====== RESTORED MAIN-PAGE LAYOUT (30.07.2026) ====== */
/* Подготовительные разделы снова идут длинными строками на всю ширину. */
body.page-index .surveys-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

body.page-index .test-section {
    width: 100%;
    min-width: 0;
}

/* Выделенная кнопка игры «Звёздное поступление». */
body.page-index .nav-item.spacepost-nav-item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #e2ecff;
    background: rgba(8, 16, 38, 0.96);
    border-color: rgba(147, 236, 255, 0.58);
    box-shadow: 0 0 0 1px rgba(147, 236, 255, 0.1) inset, 0 8px 18px rgba(1, 2, 10, 0.36);
}

body.page-index .nav-item.spacepost-nav-item::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(115deg, transparent 28%, rgba(147, 236, 255, 0.08) 50%, transparent 72%);
    transform: translateX(-125%);
    transition: transform 0.55s ease;
}

body.page-index .nav-item.spacepost-nav-item:hover {
    color: #ffffff;
    border-color: #93ecff;
    background: rgba(14, 27, 61, 0.98);
    box-shadow: 0 10px 24px rgba(1, 2, 10, 0.42), 0 0 0 1px rgba(147, 236, 255, 0.14) inset;
}

body.page-index .nav-item.spacepost-nav-item:hover::before {
    transform: translateX(125%);
}

body.page-index .spacepost-spark-icon {
    flex: 0 0 auto;
    display: inline-flex;
    width: 34px;
    height: 24px;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 5px rgba(147, 236, 255, 0.34));
}

body.page-index .spacepost-spark-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

body.page-index .spacepost-spark-icon path {
    fill: #fff0a5;
}

body.page-index .spacepost-spark-icon path:nth-child(2) {
    fill: #93ecff;
}

body.page-index .spacepost-spark-icon path:nth-child(3) {
    fill: #d5b9ff;
}

/* Меню остаётся только внутри первого экрана и больше не закрепляется снизу. */
body.page-index .hero-nav.is-floating {
    position: static;
    inset: auto;
    width: auto;
    padding: 0;
    margin-bottom: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
}

body.page-index.hero-nav-is-floating {
    padding-bottom: 0;
}

