/* ====== GAMES PAGE ====== */
/* Основной контейнер */
        body.page-games .games-container {
            padding: 30px 5%;
            min-height: calc(100vh - 200px);
        }

        body.page-games .games-title {
            font-size: 2rem;
            color: var(--text-primary);
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(0, 90, 156, 0.3);
        }

        body.page-games .games-title i {
            background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 2rem;
        }

        /* Секция игр */
        body.page-games .games-section {
            margin-bottom: 40px;
        }

        body.page-games .section-subtitle {
            font-size: 1.5rem;
            color: var(--text-primary);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        body.page-games .section-subtitle i {
            color: var(--accent-gold);
            font-size: 1.6rem;
        }

        /* Матрица игр */
        body.page-games .games-matrix {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
            overflow: visible;
            position: relative;
        }

        body.page-games .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;
            height: 100%;
            min-height: 372px;
            display: flex;
            flex-direction: column;
            z-index: 1;
            will-change: transform;
        }

/* Кафедральные инженерные кейсы */
body.page-games .case-department {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(88, 199, 255, 0.42);
    border-radius: 999px;
    background: rgba(0, 128, 201, 0.14);
    color: #8cddff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.page-games .case-source-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 14px;
}

body.page-games .case-department-modal {
    margin-bottom: 0;
}

body.page-games .case-department-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

body.page-games .task-question-text {
    white-space: pre-line;
}

body.page-games .case-task-figure {
    margin: 18px 0 2px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(88, 199, 255, 0.24);
    border-radius: 12px;
    background: #fff;
}

body.page-games .case-task-figure img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

body.page-games .case-task-figure figcaption {
    margin-top: 8px;
    color: #34495e;
    font-size: 0.82rem;
    text-align: center;
}

body.page-games .case-answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

body.page-games .case-answer-input.is-invalid {
    border-color: #ff6574;
    box-shadow: 0 0 0 3px rgba(255, 101, 116, 0.14);
}

@media (max-width: 640px) {
    body.page-games .case-answer-grid {
        grid-template-columns: 1fr;
    }

    body.page-games .case-task-figure {
        margin-inline: -8px;
        padding: 6px;
    }
}

        body.page-games .game-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: var(--shadow-heavy);
            border-color: var(--secondary-blue);
            z-index: 5;
        }

        body.page-games .game-image {
            height: 164px;
            width: 100%;
            background: var(--gradient-dark);
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        body.page-games .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-games .game-cover {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            object-position: center;
            transition: var(--transition-smooth);
        }

        body.page-games .game-card[data-game-id="pong"] .game-cover,
        body.page-games .game-card[data-game-id="traffic-racer"] .game-cover {
            object-fit: contain;
            padding: 8px;
            background: #050d18;
        }

        body.page-games .game-cover-fallback {
            position: relative;
            width: 100%;
            height: 100%;
            display: grid;
            align-items: center;
            justify-items: center;
            padding: 22px 18px 18px;
            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-games .game-cover-grid,
        body.page-games .game-cover-lines {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: -1;
        }

        body.page-games .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: 24px 24px;
            opacity: 0.2;
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000 44%, rgba(0, 0, 0, 0.2));
        }

        body.page-games .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-games .game-cover-fallback i {
            color: rgba(255, 255, 255, 0.86);
            font-size: clamp(3.4rem, 5vw, 4.8rem);
            filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
        }

        body.page-games .game-cover-fallback strong {
            display: none;
        }

        body.page-games .game-card:hover .game-cover {
            transform: scale(1.06);
            filter: saturate(1.12) contrast(1.04);
        }

        body.page-games .game-image i {
            font-size: 4rem;
            color: rgba(255, 255, 255, 0.9);
            transition: var(--transition-smooth);
            filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
        }

        body.page-games .game-card:hover .game-image i {
            transform: scale(1.2) rotate(5deg);
            color: white;
            filter: drop-shadow(0 0 30px rgba(255,255,255,0.6));
        }

        body.page-games .game-content {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        body.page-games .game-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
            min-height: 1.35em;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        body.page-games .game-description {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 12px;
            line-height: 1.5;
            flex: 1;
            min-height: 4.05em;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }

        body.page-games .game-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            margin-top: auto;
        }

        body.page-games .game-xp {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--accent-gold);
            font-weight: 600;
            font-size: 1rem;
        }

        body.page-games .game-play-btn {
            background: var(--primary-blue);
            color: var(--white);
            border: none;
            padding: 8px 20px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-smooth);
        }

        body.page-games .game-play-btn:hover {
            background: var(--secondary-blue);
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(0, 90, 156, 0.5);
        }

        body.page-games .game-play-btn.completed {
            background: var(--accent-green);
        }

        /* Стили для задач */
        body.page-games .task-card {
            min-height: 480px;
            background: linear-gradient(145deg, #1a2f3f, #0f2636);
            border-left: 4px solid var(--accent-red);
        }

        body.page-games .case-card {
            min-height: 480px;
            border-left-color: #58c7ff;
        }

        body.page-games .task-preview {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 10px;
            margin: 12px 0;
            font-family: 'Consolas', monospace;
            font-size: 0.85rem;
            color: #7fffda;
            border: 1px solid var(--primary-blue);
        }

        body.page-games .task-preview code {
            color: #ffd166;
        }

        body.page-games .task-hint {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* Статистика */
        body.page-games .games-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        body.page-games .stat-card {
            background: var(--bg-card);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            border: 1px solid rgba(0, 90, 156, 0.2);
            transition: transform 0.3s ease;
        }

        body.page-games .stat-card:hover {
            transform: translateY(-5px);
            border-color: var(--secondary-blue);
        }

        body.page-games .stat-number {
            font-size: 2.2rem;
            font-weight: bold;
            background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 5px;
        }

        body.page-games .stat-label {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Поиск и фильтры */
        body.page-games .search-container {
            position: relative;
            margin-bottom: 16px;
            border-radius: 16px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(88, 199, 255, 0.08));
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 45px rgba(2, 10, 20, 0.2);
            backdrop-filter: blur(18px);
        }

        body.page-games .search-icon {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.68);
            pointer-events: none;
        }

        body.page-games .search-box {
            width: 100%;
            padding: 14px 18px 14px 50px;
            background: transparent;
            border: 0;
            border-radius: 16px;
            color: var(--text-primary);
            font-size: 0.95rem;
            transition: all 0.3s;
        }

        body.page-games .search-box::placeholder {
            color: rgba(255, 255, 255, 0.56);
        }

        body.page-games .search-box:focus {
            outline: none;
            box-shadow: inset 0 0 0 1px rgba(88, 199, 255, 0.32), 0 0 28px rgba(88, 199, 255, 0.12);
        }

        body.page-games .filters-container {
            display: flex;
            align-items: stretch;
            gap: 14px 18px;
            margin-bottom: 25px;
            flex-wrap: wrap;
            padding: 14px;
        }

        body.page-games .filter-group {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        body.page-games .filter-group-label {
            color: var(--accent-gold);
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        body.page-games .filter-btn {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.08);
            border: 0;
            border-radius: 10px;
            color: var(--text-secondary);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.9rem;
            white-space: nowrap;
        }

        body.page-games .filter-btn.active {
            background: linear-gradient(135deg, rgba(0, 90, 156, 0.92), rgba(49, 160, 152, 0.88));
            color: white;
            box-shadow: 0 8px 18px rgba(0, 90, 156, 0.24);
        }

        body.page-games .filter-btn:hover {
            transform: translateY(-2px);
            background: rgba(255, 255, 255, 0.13);
            color: var(--text-primary);
        }

        /* Игровое поле - УЛУЧШЕННЫЙ ДИЗАЙН */
        body.page-games .game-canvas-container {
            background: linear-gradient(145deg, #0a1420, #030812);
            border-radius: 16px;
            padding: 20px;
            margin: 20px 0;
            border: 2px solid var(--primary-blue);
            position: relative;
            min-height: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 0 50px rgba(0, 90, 156, 0.2);
        }

        body.page-games .game-screen {
            display: flex;
            flex-direction: column;
            gap: 12px;
            align-items: center;
            width: 100%;
        }

        body.page-games .game-screen .game-canvas-container {
            width: min(100%, 720px);
        }

        body.page-games .game-canvas-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 30% 50%, rgba(0, 200, 255, 0.1) 0%, transparent 70%);
            pointer-events: none;
            z-index: 1;
        }

        body.page-games #tetrisCanvas,
body.page-games #flappyCanvas,
body.page-games #snakeCanvas,
body.page-games #pongCanvas,
body.page-games #memoryCanvas {
            background: #0a1420;
            border: 2px solid var(--primary-blue);
            border-radius: 8px;
            max-width: 100%;
            height: auto;
            box-shadow: 0 0 30px rgba(0, 90, 156, 0.3);
            position: relative;
            z-index: 2;
        }

        body.page-games .game-help {
            color: var(--text-secondary);
            text-align: center;
            margin-top: 6px;
            font-size: 0.92rem;
            line-height: 1.5;
            max-width: 720px;
            width: 100%;
            padding: 0 10px;
        }

        body.page-games .game-help kbd {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-bottom-color: rgba(255, 255, 255, 0.35);
            border-radius: 6px;
            color: var(--text-primary);
            padding: 2px 7px;
            font-size: 0.82rem;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        }

        body.page-games .game-info {
            display: flex;
            justify-content: space-between;
            width: 100%;
            margin-top: 15px;
            color: var(--text-primary);
            font-size: 1.1rem;
            padding: 10px 20px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            border: 1px solid rgba(0, 90, 156, 0.3);
            z-index: 2;
        }

        body.page-games .game-score {
            color: var(--accent-gold);
            font-weight: 600;
        }

        body.page-games .game-controls {
            display: flex;
            gap: 10px;
            margin: 20px 0;
            flex-wrap: wrap;
            justify-content: center;
            z-index: 2;
        }

        body.page-games .game-btn {
            padding: 10px 25px;
            background: var(--primary-blue);
            color: white;
            border: none;
            border-radius: 30px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            min-width: 120px;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        body.page-games .game-btn:hover {
            background: var(--secondary-blue);
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 90, 156, 0.4);
        }

        body.page-games .game-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        body.page-games .game-btn.danger {
            background: var(--accent-red);
        }

        body.page-games .game-btn.danger:hover {
            background: #ff4d4d;
        }

        /* Пустое состояние */
        body.page-games .empty-games {
            text-align: center;
            padding: 50px 20px;
            background: var(--bg-card);
            border-radius: 12px;
            border: 2px dashed rgba(0, 90, 156, 0.3);
            grid-column: 1 / -1;
        }

        body.page-games .empty-games i {
            font-size: 4rem;
            color: var(--primary-blue);
            margin-bottom: 15px;
            opacity: 0.5;
        }

        body.page-games .empty-games h3 {
            font-size: 1.5rem;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        body.page-games .empty-games p {
            color: var(--text-secondary);
            font-size: 1rem;
        }

        /* Модальное окно - УЛУЧШЕННЫЙ ДИЗАЙН */
        body.page-games .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            padding: clamp(10px, 2vh, 20px);
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
            animation: fadeIn 0.3s ease;
        }

        body.page-games #gameModal.game-modal-play {
            padding: 0;
            background: rgba(0, 0, 0, 0.94);
            overflow: hidden;
        }

        body.page-games:has(#gameModal.game-modal-play) .support-dock {
            display: none;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        body.page-games .modal-content {
            background: var(--bg-card);
            border-radius: 24px;
            width: 95%;
            max-width: 900px;
            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.4);
            position: relative;
            animation: slideUp 0.3s ease;
        }
 
        @keyframes slideUp {
            from { transform: translateY(50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        body.page-games .modal-close {
            position: absolute;
            top: 15px;
            right: 25px;
            background: transparent;
            border: none;
            font-size: 2rem;
            color: var(--text-secondary);
            cursor: pointer;
            z-index: 10;
            transition: color 0.3s;
            width: 34px;
            height: 34px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0;
            box-shadow: none;
            line-height: 1;
        }

        body.page-games .modal-close:hover {
            color: var(--accent-red);
            background: transparent;
        }

        body.page-games .modal-header {
            padding: 25px 30px 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.page-games .modal-title {
            font-size: 1.6rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        body.page-games .modal-body {
            padding: 25px 30px;
        }

        body.page-games #gameModal.game-modal-play .modal-content.external-mode {
            max-width: none;
            width: 100vw;
            height: 100dvh;
            max-height: 100dvh;
            display: grid;
            grid-template-rows: minmax(0, 1fr);
            overflow: hidden;
            border: 0;
            border-radius: 0;
            box-shadow: none;
            background:
                radial-gradient(900px 520px at 50% 15%, rgba(0, 143, 224, 0.18), transparent 66%),
                linear-gradient(180deg, #050b13 0%, #02070d 100%);
        }

        body.page-games #gameModal.game-modal-play .modal-close {
            top: clamp(10px, 1.4vw, 18px);
            right: clamp(10px, 1.4vw, 18px);
            z-index: 40;
            width: 34px;
            height: 34px;
            font-size: 1.8rem;
            background: transparent;
            border: 0;
            border-radius: 0;
            backdrop-filter: none;
            box-shadow: none;
        }

        body.page-games #gameModal.game-modal-play .modal-header {
            position: absolute;
            width: 1px;
            height: 1px;
            min-height: 0;
            padding: 0;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            border: 0;
        }

        body.page-games #gameModal.game-modal-play .modal-title {
            font-size: 1rem;
        }

        body.page-games #gameModal.game-modal-play .modal-content.external-mode .modal-body {
            padding: 0;
            height: 100%;
            min-height: 0;
            overflow: hidden;
        }

        body.page-games .external-game-shell {
            position: relative;
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            height: 100%;
            min-height: 0;
            background: #02070d;
        }

        body.page-games .external-game-toolbar {
            position: relative;
            z-index: 24;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 12px;
            min-height: 58px;
            padding: 8px 66px 8px clamp(12px, 1.4vw, 18px);
            border-bottom: 1px solid rgba(90, 176, 245, 0.2);
            background: rgba(4, 12, 22, 0.92);
            backdrop-filter: blur(12px);
            pointer-events: none;
        }

        body.page-games .external-game-mini-title {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text-primary);
        }

        body.page-games .external-game-mini-title span {
            width: 36px;
            height: 36px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 10px;
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
        }

        body.page-games .external-game-mini-title i {
            color: #fff;
            font-size: 1.1rem;
        }

        body.page-games .external-game-mini-title strong {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: clamp(0.98rem, 1.25vw, 1.12rem);
            line-height: 1.1;
        }

        body.page-games .external-game-frame-wrap {
            position: relative;
            border-radius: 0;
            border: 0;
            overflow: hidden;
            background: #02070d;
            box-shadow: none;
            min-height: 0;
            height: 100%;
            contain: layout paint;
        }

        body.page-games .external-game-frame {
            width: 100%;
            height: 100%;
            border: none;
            display: block;
            background: #000;
            opacity: 0;
            transition: opacity 0.28s ease;
        }

        body.page-games .external-game-shell.is-loaded .external-game-frame {
            opacity: 1;
        }

        body.page-games .external-game-loader {
            position: absolute;
            inset: 0;
            z-index: 18;
            display: grid;
            place-items: center;
            padding: 24px;
            background:
                radial-gradient(540px 360px at 50% 42%, rgba(0, 143, 224, 0.24), transparent 72%),
                linear-gradient(180deg, rgba(5, 12, 22, 0.98), rgba(2, 7, 13, 0.98));
            transition: opacity 0.28s ease, visibility 0.28s ease;
        }

        body.page-games .external-game-shell.is-loaded .external-game-loader {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        body.page-games .external-game-loader-card {
            width: min(360px, 100%);
            display: grid;
            justify-items: center;
            gap: 14px;
            text-align: center;
            color: var(--text-primary);
        }

        body.page-games .external-game-loader-icon {
            width: clamp(82px, 10vw, 118px);
            height: clamp(82px, 10vw, 118px);
            display: grid;
            place-items: center;
            border-radius: 26px;
            box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
        }

        body.page-games .external-game-loader-icon i {
            color: #fff;
            font-size: clamp(2.2rem, 4.2vw, 3.6rem);
            filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.24));
        }

        body.page-games .external-game-loader-card strong {
            font-size: clamp(1.25rem, 2.6vw, 2rem);
            line-height: 1.1;
            text-transform: uppercase;
        }

        body.page-games .external-game-loader-card span {
            color: var(--text-secondary);
            font-size: 0.95rem;
        }

        body.page-games .external-game-loader-bar {
            width: min(220px, 72vw);
            height: 5px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.09);
        }

        body.page-games .external-game-loader-bar i {
            display: block;
            width: 42%;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #45b8ff, #9ee7ff);
            animation: gameLoaderMove 1.05s ease-in-out infinite;
        }

        @keyframes gameLoaderMove {
            0% { transform: translateX(-110%); }
            100% { transform: translateX(260%); }
        }

        body.page-games .task-card-full {
            background: rgba(0, 0, 0, 0.28);
            border: 1px solid rgba(0, 200, 255, 0.25);
            border-radius: 14px;
            padding: 18px;
            margin-bottom: 16px;
        }

        body.page-games .task-card-full h3 {
            color: #00c8ff;
            margin-bottom: 12px;
            font-size: 1.15rem;
        }

        body.page-games .task-card-full p {
            color: var(--text-primary);
            line-height: 1.6;
        }

        body.page-games .task-hint-card {
            background: rgba(0, 90, 156, 0.2);
            border: 1px solid rgba(0, 200, 255, 0.3);
            border-radius: 10px;
            padding: 14px;
            margin-bottom: 18px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Формы авторизации */
        body.page-games .form-group {
            margin-bottom: 18px;
        }

        body.page-games .form-label {
            display: block;
            margin-bottom: 6px;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        body.page-games .form-input,
body.page-games .form-select {
            width: 100%;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.95rem;
        }

        body.page-games .form-input:focus,
body.page-games .form-select:focus {
            outline: none;
            border-color: var(--primary-blue);
            background: rgba(0, 90, 156, 0.1);
        }

        body.page-games .form-actions {
            display: flex;
            gap: 12px;
            margin-top: 25px;
        }

        body.page-games .btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            flex: 1;
            font-size: 0.95rem;
            transition: all 0.3s;
        }

        body.page-games .btn-primary {
            background: var(--primary-blue);
            color: white;
        }

        body.page-games .btn-primary:hover {
            background: var(--secondary-blue);
        }

        body.page-games .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-secondary);
        }

        body.page-games .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        /* Уведомления */
        body.page-games .notification {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: var(--gradient-blue);
            color: white;
            padding: 12px 20px;
            border-radius: 10px;
            box-shadow: var(--shadow-heavy);
            display: none;
            align-items: center;
            gap: 10px;
            z-index: 3000;
            animation: slideInRight 0.3s ease;
        }

        @keyframes slideInRight {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        body.page-games .notification.error {
            background: linear-gradient(135deg, #e63946, #ff6b6b);
        }

        /* Футер */



        /* Адаптивность */
        @media (max-width: 768px) {
            body.page-games .header {
                padding: 0 15px;
            }

            body.page-games .logo-text {
                font-size: 1rem;
            }

            body.page-games .xp-badge span:not(.fa-star) {
                display: none;
            }

            body.page-games .games-stats {
                grid-template-columns: repeat(2, 1fr);
            }

            body.page-games .games-matrix {
                grid-template-columns: 1fr;
            }

            body.page-games .modal-content {
                width: 95%;
            }

            body.page-games .modal-body {
                padding: 20px;
            }

            body.page-games #gameModal.game-modal-play .modal-content.external-mode {
                width: 100vw;
                max-width: none;
                height: 100dvh;
                max-height: 100dvh;
                border-radius: 0;
            }

            body.page-games #gameModal.game-modal-play .modal-content.external-mode .modal-body {
                padding: 0;
            }

            body.page-games #gameModal.game-modal-play .modal-header {
                min-height: 0;
                padding: 0;
            }

            body.page-games .external-game-toolbar {
                min-height: 54px;
                padding: 7px 58px 7px 8px;
            }

            body.page-games .external-game-mini-title {
                gap: 8px;
            }

            body.page-games .external-game-mini-title span {
                width: 34px;
                height: 34px;
                border-radius: 9px;
            }

            body.page-games .external-game-mini-title strong {
                font-size: 0.9rem;
            }

        }

        @media (max-width: 480px) {
            body.page-games .games-stats {
                grid-template-columns: 1fr;
            }

            body.page-games .filters-container {
                justify-content: flex-start;
                padding: 12px;
            }

            body.page-games .filter-group {
                width: 100%;
                padding-right: 0;
                padding-bottom: 10px;
                border-right: 0;
                border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            }

            body.page-games .filter-group:last-child {
                padding-bottom: 0;
                border-bottom: 0;
            }

            body.page-games .filter-group-label {
                width: 100%;
            }

            body.page-games .filter-btn {
                flex: 1 1 calc(50% - 8px);
                padding: 7px 10px;
                font-size: 0.85rem;
                text-align: center;
            }
        }

