
/* --- КНОПКА АДМИНА (БАЗОВЫЕ НАСТРОЙКИ + ПК) --- */
#open-admin-btn {
    display: none; /* <--- СКРЫТО ПО УМОЛЧАНИЮ ДЛЯ ВСЕХ */
    
    position: absolute;
    top: 25px;       /* На уровне даты */
    right: 10px;     /* В правом углу (справа от даты) */
    z-index: 1000;
    
    background: #333;
    color: gold;
    border: 1px solid gold;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    text-transform: uppercase;
}
#open-admin-btn:hover {
    background: gold;
    color: black;
}

/* МАГИЯ: Если JS добавит класс .admin-mode на body, кнопка появится */
body.admin-mode #open-admin-btn {
    display: block !important;
}

/* --- ПАНЕЛЬ АДМИНА (ФИНАЛЬНАЯ ВЕРСИЯ) --- */
#admin-panel {
    display: none !important; /* Скрыто по умолчанию */
    
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Черный фон */
    z-index: 99999;
    
    /* Включаем прокрутку, если кнопок много */
    overflow-y: auto; 
    
    /* Центровка */
    display: flex;
    align-items: center; 
    justify-content: center;
    flex-direction: column;
}

#admin-panel.active {
    display: flex !important; /* Показываем при открытии */
}

/* КНОПКА ЗАКРЫТЬ (ЧТОБЫ БЫЛА ВИДНА ВСЕГДА) */
#admin-close-btn {
    display: block !important;
    background: red !important;
    color: white !important;
    border: 2px solid white !important;
    padding: 15px !important;
    width: 100% !important;
    font-weight: bold !important;
    margin-top: 20px !important;
    cursor: pointer !important;
}

body { background-color: #121212; color: #ffffff; font-family: 'Arial', sans-serif; margin: 0; padding: 0px; display: flex; justify-content: center; min-height: 100vh; box-sizing: border-box; overflow-x: hidden; }
*, *:before, *:after { box-sizing: inherit; }
.hidden { display: none !important; }

/* ВИДЕО */
#video-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index: 999; display: flex; align-items: center; justify-content: center; }
#video-overlay video { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }

/* ЗАСТАВКА ТУРА */
#tour-intro-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 4000; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.5s; }
.tour-intro-content h1 { font-size: 8em; color: gold; text-transform: uppercase; text-shadow: 0 0 50px red; animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes zoomIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* КОНТЕЙНЕР */
.main-container { width: 100%; max-width: 1000px; background: #1e1e1e; padding: 15px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }

/* ШАПКА */
header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid #444; padding-bottom: 15px; flex-wrap: wrap; gap: 20px; }
.left-panel, .right-panel { width: 30%; min-width: 200px; }
.center-panel { width: 30%; min-width: 200px; text-align: center;}
.info-box { font-size: 1.1em; margin-bottom: 10px; color: #aaa; }
.info-box .value { color: #fff; font-weight: bold; margin-left: 10px; }
.info-row { display: flex; gap: 15px; margin-top: 10px; }
.game-info { background: #333; padding: 10px 15px; border-radius: 5px; text-align: center; flex-grow: 1; }
.value-big { font-size: 1.5em; color: gold; font-weight: bold; }
/* --- ДОБАВИТЬ ЭТО ПОСЛЕ СТРОКИ С .left-panel, .right-panel --- */

.right-panel {
    display: flex;            /* Включаем Flexbox */
    flex-direction: column;   /* Говорим элементам вставать в столбик */
    justify-content: flex-start; 
    height: 100%;             /* Растягиваем на всю высоту шапки */
    min-height: 170px;        /* Минимальная высота, чтобы ничего не скакало */
}

/* Это класс для таблицы победителей */
.winners-section {
    margin-top: auto;         /* ГЛАВНОЕ: Это "пружина", которая толкает блок в самый низ */
    width: 100%;              /* На всякий случай */
}

/* ТАБЛИЦА ПОБЕДИТЕЛЕЙ */
.winners-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.winner-cell { background: #000; border: 1px solid #444; height: 30px; width: 100%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: gold; font-size: 0.9em; }


/* КНОПКИ */
.admin-controls { margin-bottom: 20px; padding: 10px; background: #333; display: flex; flex-wrap: wrap; gap: 10px; border-radius: 5px;}
button { padding: 10px 20px; cursor: pointer; color: white; border: none; border-radius: 5px; flex-grow: 1; font-weight: bold; text-transform: uppercase; }
button:hover { opacity: 0.8; }

/* ИГРОВОЕ ПОЛЕ */
.board-header, .game-row { display: grid; grid-template-columns: 40px 1fr 120px; padding: 10px 5px; align-items: center; gap: 10px; }
.board-header { font-weight: bold; color: #888; border-bottom: 1px solid #333; font-size: 0.9em; }
.game-row { border-bottom: 1px solid #2a2a2a; height: 70px; }
.row-num { font-size: 1.5em; font-weight: bold; text-align: center; color: #555; }
.row-result { font-size: 1em; color: #4cd137; font-weight: bold; text-align: right; }

/* 3D КУБИКИ */
.dice-wrapper { display: flex; gap: 15px; justify-content: flex-start; padding-left: 10px; }
.scene { width: 40px; height: 40px; perspective: 400px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transform: translateZ(-20px); transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cube__face { position: absolute; width: 40px; height: 40px; border: 1px solid #ccc; background: #fdfdfd; box-shadow: inset 0 0 5px rgba(0,0,0,0.1); border-radius: 6px; display: flex; padding: 4px; }
.dot { display: block; width: 8px; height: 8px; background-color: black; border-radius: 50%; align-self: center; box-shadow: inset 1px 1px 2px rgba(255,255,255,0.5); }
.cube__face--1 { justify-content: center; align-items: center; transform: rotateY(0deg) translateZ(20px); }
.cube__face--2 { justify-content: space-between; transform: rotateY(90deg) translateZ(20px); } .cube__face--2 .dot:nth-child(2) { align-self: flex-end; } .cube__face--2 .dot:nth-child(1) { align-self: flex-start; }
.cube__face--3 { justify-content: space-between; transform: rotateY(180deg) translateZ(20px); } .cube__face--3 .dot:nth-child(1) { align-self: flex-start; } .cube__face--3 .dot:nth-child(2) { align-self: center; } .cube__face--3 .dot:nth-child(3) { align-self: flex-end; }
.cube__face--4 { display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between; transform: rotateY(-90deg) translateZ(20px); }
.cube__face--5 { display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between; transform: rotateX(90deg) translateZ(20px); }
.cube__face--6 { display: flex; flex-wrap: wrap; justify-content: space-between; align-content: space-between; transform: rotateX(-90deg) translateZ(20px); }
.column { display: flex; flex-direction: column; justify-content: space-between; height: 100%; } .column-center { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.cube.is-spinning { animation: spinCube 0.2s infinite linear; }
@keyframes spinCube { 0% { transform: translateZ(-20px) rotateX(0deg) rotateY(0deg); } 100% { transform: translateZ(-20px) rotateX(360deg) rotateY(360deg); } }

/* ЭКРАН АВТОРИЗАЦИИ */
#auth-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #121212; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.auth-container { background: #1e1e1e; padding: 30px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.8); width: 350px; text-align: center; border: 1px solid #333; }
.auth-container input { width: 100%; padding: 10px; margin-bottom: 10px; background: #333; border: 1px solid #555; color: white; border-radius: 5px; font-size: 1em; }
.auth-container button { width: 100%; padding: 12px; border: none; font-weight: bold; cursor: pointer; border-radius: 5px; margin-top: 10px; }
.switch-auth { margin-top: 15px; color: #aaa; cursor: pointer; text-decoration: underline; font-size: 0.9em; }

/* ОКНО ПРОФИЛЯ */
#profile-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 2500; display: flex; align-items: center; justify-content: center; }
.profile-container { background: #1e1e1e; padding: 25px; border-radius: 10px; width: 400px; text-align: center; border: 1px solid #444; box-shadow: 0 0 30px black; }
.checks-list { background: #121212; height: 150px; overflow-y: auto; border: 1px solid #333; padding: 10px; margin-top: 10px; text-align: left; }
.check-item { display: flex; justify-content: space-between; border-bottom: 1px solid #333; padding: 5px 0; color: #ccc; }
.check-item span.used { color: #4cd137; font-size: 0.8em; }

/* ПОДСВЕТКА ПОБЕДИТЕЛЯ (НОВОЕ) */
.winner-row-highlight {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0.1) 100%);
    border: 2px solid gold; box-shadow: 0 0 20px gold;
    transform: scale(1.02); transition: all 0.5s ease; z-index: 10;
}
.winner-row-highlight .row-num { color: gold; text-shadow: 0 0 10px orange; }
.winner-row-highlight .row-result { color: #fff !important; text-shadow: 0 0 10px gold; font-size: 1.2em; }

@media (max-width: 768px) {
    header { flex-direction: column; align-items: center; }
    .left-panel, .right-panel, .center-panel { width: 100%; }
    .board-header, .game-row { grid-template-columns: 35px 1fr 90px; gap: 5px; }
    .scene, .cube, .cube__face { width: 30px; height: 30px; }
    .dot { width: 6px; height: 6px; }
    .cube__face--1 { transform: rotateY(0deg) translateZ(15px); } .cube__face--2 { transform: rotateY(90deg) translateZ(15px); }
    .cube__face--3 { transform: rotateY(180deg) translateZ(15px); } .cube__face--4 { transform: rotateY(-90deg) translateZ(15px); }
    .cube__face--5 { transform: rotateX(90deg) translateZ(15px); } .cube__face--6 { transform: rotateX(-90deg) translateZ(15px); }
    .cube { transform: translateZ(-15px); }
    @keyframes spinCube { 0% { transform: translateZ(-15px) rotateX(0deg) rotateY(0deg); } 100% { transform: translateZ(-15px) rotateX(360deg) rotateY(360deg); } }
}
/* БЛОК ПОЛЬЗОВАТЕЛЯ В ШАПКЕ */
/* БЛОК ПОЛЬЗОВАТЕЛЯ В ШАПКЕ (Уменьшенный) */
.user-header-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px; /* Меньше расстояние */
    background: #333;
    padding: 4px 10px; /* Меньше отступы */
    border-radius: 15px;
    border: 1px solid #555;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9em; /* Чуть меньше шрифт */
}
.user-header-block:hover { background: #444; border-color: gold; }
.user-name { font-weight: bold; color: gold; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-icon { font-size: 1em; } /* Иконка поменьше */

/* ОБНОВЛЕННЫЙ ПРОФИЛЬ */
.profile-info { margin-bottom: 20px; border-bottom: 1px solid #444; padding-bottom: 15px; }
.p-name { font-size: 1.5em; font-weight: bold; color: white; margin: 0; }
.p-email { font-size: 0.9em; color: #888; margin: 5px 0 0 0; }

/* СМЕНА ПАРОЛЯ */
.security-section { margin-bottom: 20px; text-align: left; }
.pass-toggle-btn { background: none; border: none; color: #4466ff; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.9em; }
.pass-toggle-btn:hover { color: #6688ff; }

.pass-form { background: #222; padding: 10px; border-radius: 5px; margin-top: 10px; border: 1px solid #444; display: flex; flex-direction: column; gap: 8px; }
.pass-form input { background: #111; border: 1px solid #555; color: white; padding: 8px; border-radius: 3px; }
.winner-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Красим саму цифру */
.winner-slot span {
    color: white !important; /* Принудительно белый */
    font-size: 10px;
    margin-bottom: 2px;      /* Небольшой отступ до ячейки */
    opacity: 0.8;            /* Чуть приглушим, чтобы не резало глаз (по желанию) */
}
/* --- АДАПТИВ ДЛЯ ТЕЛЕФОНОВ (ширина меньше 768px) --- */
@media (max-width: 768px) {

    /* 1. Делаем контейнер на всю ширину */
    .main-container {
        width: 100%;
        padding: 0px;
        box-sizing: border-box;
    }

    /* 2. Блок ввода чека и кнопки "ИГРАТЬ" */
    /* Сейчас они в ряд (flex-direction: row). Меняем на колонку. */
    .input-container-class { /* Замени на класс обертки инпута и кнопки */
        flex-direction: column;
        gap: 10px; /* Отступ между инпутом и кнопкой */
    }

    /* Растягиваем инпут и кнопку на всю ширину экрана */
    .input-container-class input,
    .input-container-class button {
        width: 100% !important;
        height: 50px; /* Делаем повыше, чтобы удобно нажимать пальцем */
        font-size: 18px;
    }

    /* 3. Уменьшаем огромные шрифты заголовков */
    h1, .round-title { /* Там где написано РАУНД 1 */
        font-size: 2rem !important; /* Уменьшаем размер */
        line-height: 1.2;
    }
    
    .current-stage-text { /* ТЕСТОВОЕ ШОУ */
        font-size: 1rem;
    }

    /* 4. Таблица победителей */
    .winners-table {
        overflow-x: auto; /* Добавляем прокрутку только таблице, если не влезает */
        display: block;
        width: 100%;
    }

    /* 5. Скрываем лишние отступы у body */
    body {
        padding: 0;
        align-items: flex-start; /* Чтобы контент начинался сверху, а не по центру */
    }
}
.admin-label { width: 100%; text-align: center; color: #888; font-size: 0.9em; margin-bottom: 5px; }
.admin-row { display: flex; gap: 10px; width: 100%; margin-bottom: 5px; }
.admin-select { flex-grow: 1; padding: 10px; background: #222; color: white; border: 1px solid #555; }
.btn-start { background: green; flex-grow: 1; color: white; border: none; cursor: pointer; }
.btn-pause { background: orange; color: black; flex-grow: 1; border: none; cursor: pointer; }
.btn-video { background: #444; color: white; flex-grow: 1; border: none; cursor: pointer; }
.btn-reset { background: darkred; color: white; flex-grow: 1; border: none; cursor: pointer; }

/* Стили для панели редактирования */
.edit-panel-box { background: #2a2a2a; padding: 10px; border: 1px dashed #555; display: flex; flex-direction: column; gap: 10px; }
.edit-row { display: flex; align-items: center; gap: 10px; width: 100%; border-bottom: 1px solid #444; padding-bottom: 10px; }
.edit-label { font-size: 0.8em; color: #aaa; width: 100px; }
.edit-sublabel { font-size: 0.8em; color: gold; margin-bottom: 5px; }
.btn-save { background: #4466ff; color: white; border: none; padding: 5px 10px; cursor: pointer; }
.btn-import { background: purple; color: white; border: none; padding: 8px 15px; cursor: pointer; }
#import-text { width: 100%; height: 100px; background: #111; color: white; border: 1px solid #444; padding: 5px; box-sizing: border-box; }

/* Стили для создания шоу */
.create-show-box { margin-top: 15px; border-top: 1px solid #444; padding-top: 10px; width: 100%; }
.create-show-row { display: flex; gap: 5px; flex-wrap: wrap; }
#new-camp-name { flex-grow: 2; padding: 5px; }
.auto-label { color: white; font-size: 0.8em; display: flex; align-items: center; gap: 5px; }


/* ========================================= */
/* ВВОД ЧЕКА И БИЛЕТ (Общие стили) */
/* ========================================= */
.input-row {
    display: flex; 
    gap: 10px;
}
#check-code {
    padding: 10px; 
    flex-grow: 1; 
    border-radius: 5px; 
    border: none;
    font-size: 16px;
}
#check-input-section button {
    background: gold; 
    color: black; 
    font-weight: bold; 
    width: auto;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 0 20px;
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ (ИСПРАВЛЕННАЯ: ЦЕНТР + СКРЫТИЕ ПОДСКАЗКИ) --- */

.my-ticket-box { 
    margin: 5px 0 !important;
    padding: 10px !important;    /* Чуть больше воздуха, чтобы текст не лип */
    min-height: auto; 
    border: 1px solid gold;
    width: 100%;
    box-sizing: border-box;
    
    /* МАГИЯ ВЫРАВНИВАНИЯ: */
    display: flex;
    flex-direction: column;      /* Элементы друг под другом */
    align-items: center;         /* Центрируем по горизонтали */
    justify-content: center;     /* Центрируем по вертикали */
    text-align: center;          /* Страховка для текста */
}

.ticket-number { 
    font-size: 20px; 
    color: gold; 
    margin: 0; 
    line-height: 1.1;
    width: 100%;                 /* Растягиваем строку на всю ширину */
    text-align: center;          /* Центрируем текст внутри строки */
}

.ticket-hint { 
    display: none;              /* <--- ПО УМОЛЧАНИЮ СКРЫТО! JS сам включит когда надо */
    font-size: 11px;
    color: #ccc;
    margin-top: 5px;
    line-height: 1.2;
    text-align: center;
}

/* Победное окно */
/* 1. ФОН (Оверлей) - Затемняет экран и центрирует карточку */
#win-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Темный фон */
    z-index: 9999;
    
    /* Магия центровки */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. КАРТОЧКА (Контент) - Золотая рамка и фон */
#win-modal .modal-content {
    background: #111;        /* Черный фон карточки */
    border: 2px solid gold;  /* Золотая рамка */
    padding: 30px;
    border-radius: 15px;     /* Скругленные углы */
    text-align: center;      /* Текст по центру */
    
    /* Размеры карточки */
    width: 350px;
    max-width: 90%;
    
    /* Тени для красоты */
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
    
    /* Исправление растягивания */
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* 3. ТЕКСТЫ */
.win-title {
    color: gold;
    font-size: 2em;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.win-subtitle {
    color: white;
    font-size: 1.2em;
    margin: 10px 0;
}

.win-desc {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* 4. КНОПКА */
.win-btn {
    background: gold;
    color: black;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 10px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    width: auto; /* Не дает растягиваться */
}

.win-btn:hover {
    transform: scale(1.05);
    background: #ffd700;
}

/* Класс для скрытия */
.hidden { display: none !important; }
/* 1. ВОССТАНОВЛЕНИЕ ДИЗАЙНА НА ПК */
/* (Добавь эти стили, чтобы вернуть цвета и размеры) */
/* ========================================= */

.show-status {
    color: gold;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 0 10px orange;
    margin-bottom: 5px;
    text-align: center;
}

.stage-label {
    color: #888; 
    font-size: 0.8em; 
    margin-bottom: 5px;
    text-align: center;
}

.round-title {
    color: red;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,0,0,0.5);
    line-height: 1;
    text-align: center;
}

/* ========================================= */
/* МОБИЛЬНАЯ ВЕРСИЯ (ПРАВОЕ ВЫРАВНИВАНИЕ + 22px) */
/* ========================================= */
@media (max-width: 768px) {

    /* 1. КАРКАС (ОБЫЧНЫЙ САЙТ - СКРОЛЛИТСЯ ВСЁ) */
    .main-container {
        padding: 0 !important;
        width: 100%;
        min-height: 100vh;       /* Минимум на один экран */
        height: auto !important; /* Но может расти вниз бесконечно */
        
        overflow-y: auto !important; /* <--- ВКЛЮЧАЕМ ПРОКРУТКУ ВСЕЙ СТРАНИЦЫ */
        overflow-x: hidden;      /* Запрещаем прокрутку вбок */
        
        display: flex;
        flex-direction: column;
        background: #121212;
        position: relative;
    }

    /* 2. ШАПКА */
    header {
        display: block !important; position: relative; width: 100%; height: 160px;
        background: #1a1a1a; border-bottom: 2px solid gold; flex-shrink: 0; box-sizing: border-box;
    }

    /* --- ВРЕМЯ И ДАТА (ОПУСТИЛИ НА 2px) --- */
    /* Было top: 5px -> стало top: 7px */
    .left-panel .info-box {
        position: absolute; top: 7px; left: 14px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        z-index: 20; min-width: 50px;
    }
    .right-panel .info-box {
        position: absolute; top: 7px; right: 15px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        z-index: 20; min-width: 60px;
    }
    
    /* ЭТОТ БЛОК ОТВЕЧАЕТ ТОЛЬКО ЗА СЛОВА "ВРЕМЯ" И "ДАТА" */
.info-box .label {
    display: block !important;
    font-size: 10px !important;
    color: #888;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    letter-spacing: 1px;
    
    /* === НАСТРОЙКИ ДВИЖЕНИЯ СЛОВА === */
    position: relative; /* Включает режим ручного перемещения */
    
    top: -2px;   /* ВВЕРХ/ВНИЗ. */
                 /* Поставь -5px, чтобы поднять слово ВЫШЕ. */
                 /* Поставь 5px, чтобы опустить слово НИЖЕ (ближе к цифрам). */
    
    left: 6px;   /* ЛЕВО/ПРАВО. */
                 /* Поставь -2px, чтобы подвинуть слово ВЛЕВО. */
                 /* Поставь 2px, чтобы подвинуть слово ВПРАВО. */
                 
    margin-bottom: 2px; /* Отступ от слова до цифр снизу */
}
    #clock, #date {
        font-family: 'Arial', sans-serif !important;
        font-size: 15px !important; color: white !important; font-weight: bold; line-height: 1; text-align: center;
    }

    /* --- ТУР --- */
    .game-info {
        position: absolute; top: 47px; /* Тоже опустил чуть ниже, раз время опустилось */
        left: 15px; min-width: 50px;
        background: #000; border: 1px solid #444; border-radius: 4px; padding: 4px 10px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    .game-info .label { display: block !important; font-size: 18px !important; color: white; margin: 0; text-transform: uppercase; }
    #tour-number { font-size: 26px !important; color: gold; font-weight: bold; line-height: 1; }

    /* --- КНОПКА ЛК --- */
    #user-header-display {
        position: absolute; top: 0; left: 50%; transform: translateX(-50%);
        display: flex !important; flex-direction: row-reverse; align-items: center;
        padding: 6px 15px 8px 15px;
        background: #222; border: 1px solid gold; border-top: none; border-radius: 0 0 10px 10px;
        z-index: 100; gap: 6px;
    }
    #header-username { display: none; }
    .user-icon { font-size: 14px !important; color: gold; margin: 0; }
    #user-header-display::after {
        content: "Личный кабинет"; font-size: 12px; color: white; font-weight: bold; white-space: nowrap;
    }

    /* --- РАУНД 1 --- */
    .center-panel { position: static; margin: 0; padding: 0; }
    .show-status { display: none; }
    .stage-label { display: none; }
    .round-title {
        position: absolute; top: 55px; left: 50%; transform: translateX(-50%);
        font-size: 22px !important; color: red; font-weight: bold;
        text-shadow: 0 0 10px rgba(255,0,0,0.5); white-space: nowrap; line-height: 1; z-index: 10;
    }


    /* --- ПОБЕДИТЕЛИ (ПРАВОЕ ВЫРАВНИВАНИЕ) --- */
    .winners-section {
        position: absolute;
        bottom: 10px;
        right: 10px; /* <--- ОТСТУП СПРАВА 5px */
        left: auto; /* Отменяем левое прижатие */
        width: auto; /* Ширина по контенту */
        
        display: flex !important;
        flex-direction: column;
        align-items: flex-end; /* Выравниваем всё вправо */
    }

    /* НАДПИСЬ "НОМЕРА ПОБЕДИТЕЛЕЙ" */
    .winners-section .label { 
        display: block !important;
        font-size: 0 !important; /* Скрываем старый текст */
        margin-bottom: 20px; /* Отступ до цифр нумерации */
        text-align: right;
    }
    
    /* НАДПИСЬ "НОМЕРА ПОБЕДИТЕЛЕЙ" */
    .winners-section .label::after {
        content: "НОМЕРА ПОБЕДИТЕЛЕЙ ТУРОВ";
        font-size: 12px;
        color: white;
        font-weight: bold;
        display: block;
        white-space: nowrap;
        
        /* === РУЧНОЕ УПРАВЛЕНИЕ ПОЗИЦИЕЙ === */
        position: relative; /* Обязательно для движения */
        
        top: -0px;    /* ВВЕРХ / ВНИЗ */
                     /* -5px поднимет надпись выше */
                     /* 5px опустит надпись ниже (ближе к ячейкам) */

        right: 25px;  /* ВЛЕВО / ВПРАВО */
                     /* 10px сдвинет надпись ВЛЕВО */
                     /* -10px сдвинет надпись ВПРАВО */
    }

    /* ЯЧЕЙКИ (22px) */
    .winners-grid > div, .winner-cell {
        position: relative;
        width: 22px !important;  /* <--- УВЕЛИЧИЛ +2px */
        height: 22px !important; /* <--- УВЕЛИЧИЛ +2px */
        background-color: #333;
        border: 1px solid #555;
        border-radius: 3px;
        box-sizing: border-box;
        color: transparent !important; font-size: 0 !important;
        display: flex; align-items: center; justify-content: center;
    }

    /* Скрываем мусор внутри */
    .winners-grid > div > *, .winner-cell > * { display: none !important; }

    /* БЕЛЫЕ ЦИФРЫ СВЕРХУ (1-10) */
    .winners-grid > div::before, .winner-cell::before {
        position: absolute; top: -15px; /* Чуть выше, так как ячейки выросли */
        left: 50%; transform: translateX(-50%);
        color: gold; font-size: 10px; font-weight: bold; font-family: monospace; pointer-events: none;
    }
    /* Нумерация 1-10 */
    .winners-grid > div:nth-child(1)::before { content: "1"; }
    .winners-grid > div:nth-child(2)::before { content: "2"; }
    .winners-grid > div:nth-child(3)::before { content: "3"; }
    .winners-grid > div:nth-child(4)::before { content: "4"; }
    .winners-grid > div:nth-child(5)::before { content: "5"; }
    .winners-grid > div:nth-child(6)::before { content: "6"; }
    .winners-grid > div:nth-child(7)::before { content: "7"; }
    .winners-grid > div:nth-child(8)::before { content: "8"; }
    .winners-grid > div:nth-child(9)::before { content: "9"; }
    .winners-grid > div:nth-child(10)::before { content: "10"; }
    .winners-grid > div:nth-child(n+11)::before { content: ""; }

    /* ЕСЛИ ПОБЕДИТЕЛЬ (ЗОЛОТОЙ) - ПОКАЗЫВАЕМ СОДЕРЖИМОЕ */
    .winners-grid > div[style*="gold"], .winner-cell.active, .winners-grid > div[style*="rgb(255, 215, 0)"] {
        background-color: gold !important; border-color: white !important;
        color: black !important; font-size: 10px !important; font-weight: bold !important; text-shadow: none !important;
    }
    .winners-grid > div[style*="gold"] > *, .winners-grid > div[style*="rgb(255, 215, 0)"] > *, .winner-cell.active > * {
        display: block !important; color: black !important; font-size: 10px !important;
        margin: 0 !important; padding: 0 !important; background: transparent !important; border: none !important; width: auto !important; height: auto !important;
    }


    /* --- ОСТАЛЬНОЕ (ТАБЛИЦА) --- */
    #check-input-section h3 { display: none; }
    .input-row { display: flex; gap: 5px; height: 40px; padding: 5px; width: 100%; box-sizing: border-box; }
    #check-code { flex-grow: 1; font-size: 16px; padding: 5px; }
    #check-input-section button { width: auto; padding: 0 20px; font-weight: bold; }
    
/* КОНТЕЙНЕР ТАБЛИЦЫ (БЕЗ ВНУТРЕННЕГО СКРОЛЛА) */
    .game-board { 
        flex-grow: 0;            /* Не пытаемся заполнять экран */
        height: auto !important; /* Высота равна количеству кубиков */
        overflow: visible !important; /* Убираем внутренние рамки */
        
        padding: 0 5px 50px 5px; /* Небольшой отступ снизу для красоты */
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ШАПКА ТАБЛИЦЫ (# ... КОМБИНАЦИЯ ... РЕЗУЛЬТАТ) */
    .board-header { 
        font-size: 10px; 
        padding: 4px 0; 
        display: flex; 
        align-items: center; 
        justify-content: flex-start; /* Прижимаем всё влево */
        color: white !important; /* ВСЕ СЛОВА БЕЛЫЕ */
        font-weight: bold;
    }
    
    /* Настройка ширины колонок шапки */
    .board-header > span:nth-child(1) { 
        width: 30px; /* Ширина под колонку # */
        text-align: center; 
    }
    .board-header > span:nth-child(2) { 
        padding-left: 0px; /* "КОМБИНАЦИЯ" сразу за решеткой */
    }
    .board-header > span:last-child { 
        margin-left: auto; /* "РЕЗУЛЬТАТ" улетает вправо */
        padding-right: 5px;
    }

    /* СТРОКИ С КУБИКАМИ */
    #rows-container > div, .row-item { 
        display: flex; 
        align-items: center; 
        justify-content: flex-start; /* Прижимаем всё влево (убираем дырку) */
        height: 38px !important; 
        border-bottom: 1px solid #ffffff; 
        padding-right: 5px; 
    }
    
    /* НУМЕРАЦИЯ (0, 1, 2...) - БЕЛАЯ */
    #rows-container > div > :first-child, .row-item > :first-child {
        width: 15px !important; /* Фиксированная ширина (совпадает с #) */
        text-align: center;
        color: white !important; /* ЦИФРЫ БЕЛЫЕ */
        font-weight: bold;
        flex-shrink: 0;
    }

    /* КУБИКИ */
    img, .dice-icon { 
        width: 22px !important; 
        height: 22px !important; 
        margin: 0 1px; 
    }
    
    /* ТЕКСТ РЕЗУЛЬТАТА (справа) */
    .result-text { 
        font-size: 11px !important; 
        color: #aaa; 
        text-align: right; 
        min-width: 60px; 
        margin-left: auto; /* Пружинка: толкает текст в самый правый край */
    }
    /* --- КНОПКА АДМИНА (НАСТРОЙКА ДЛЯ ТЕЛЕФОНА) --- */
    #open-admin-btn {
        /* Отменяем позицию ПК */
        right: auto !important; 
        
        /* Ставим на уровень "РАУНД 1" */
        top: 55px !important;  
        
        /* Центруем относительно экрана... */
        left: 50% !important; 
        /* ...и сдвигаем вправо на 80px (чтобы встать сбоку от текста РАУНД) */
        margin-left: 80px !important; 
        
        /* Делаем поменьше */
        padding: 2px 6px !important;
        font-size: 10px !important;
        background: #222 !important;
        border-color: #555 !important;
        color: #888 !important; 
    }
    }
    /* ================================================== */
/* ВСТАВИТЬ В КОНЕЦ STYLE.CSS (ЖЕЛЕЗНАЯ ЗАЩИТА)      */
/* ================================================== */

/* 1. Скрываем кнопку от всех по умолчанию */
#open-admin-btn {
    display: none !important;
}

/* 2. Показываем кнопку ТОЛЬКО если на body есть класс admin-mode */
body.admin-mode #open-admin-btn {
    display: block !important;
    /* На всякий случай дублируем позицию */
    position: absolute; 
    z-index: 9999;
}
    /* ================================================== */
/* ЗАЩИТА АДМИНА: СКРЫВАЕМ СМЕНУ ПАРОЛЯ ЧЕРЕЗ CSS    */
/* ================================================== */

/* Как только на странице включается режим админа — кнопка исчезает */
body.admin-mode .pass-toggle-btn {
    display: none !important;
}

/* Также на всякий случай скроем саму форму, если она вдруг открыта */
body.admin-mode .pass-form {
    display: none !important;
}
/* ЯДЕРНЫЙ ВАРИАНТ ДЛЯ БЕГУЩЕЙ СТРОКИ */
.ticker-wrap {
    position: relative;
    width: 100%;
    height: 30px;        /* 1. Возвращаем нормальную высоту, чтобы текст влез */
    background: #000;
    border-top: 2px solid #333;
    border-bottom: 2px solid gold;
    overflow: hidden;
    
    display: block;
    
    /* 2. ТЯНЕМ ВВЕРХ! Меняй это число: -10px, -20px, -30px */
    margin-top: -20px;   
    margin-bottom: 15px;
}

.ticker {
    /* Вырываем элемент из потока - он больше не занимает места, а летит сверху */
    position: absolute; 
    top: 0;
    left: 0;
    
    /* Растягиваем на всю высоту родителя */
    width: 100%;
    height: 100%;
    
    /* Центрируем текст внутри */
    line-height: 28px; /* Чуть меньше 30px, чтобы учесть границы, если надо */
    display: block;
    
    /* Стили текста */
    white-space: nowrap;
    color: gold;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Анимация */
    padding-left: 100%;
    box-sizing: content-box; /* Важно для padding-left: 100% */
    animation: ticker 25s linear infinite;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}
/* === ЭФФЕКТ НЕАКТИВНОСТИ (БЛЮР) === */
.interface-blurred {
    opacity: 0.3;          /* Полупрозрачность */
    filter: blur(2px);     /* Размытие */
    pointer-events: none;  /* Чтобы нельзя было кликнуть */
    transition: 0.5s;      /* Плавная анимация */
}

/* === ЭКРАН ОЖИДАНИЯ (ЗАГЛУШКА) === */
#waiting-screen {
    width: 100%;
    min-height: 400px;

    /* --- ФОНОВАЯ КАРТИНКА --- */
    /* Затемнение + Картинка (файл bg-waiting.jpg должен лежать рядом с index.html) */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('bg-waiting.png');
    background-size: cover;       /* Заполнить весь блок без дыр */
    background-position: center;  /* Центрировать самое важное */
    background-repeat: no-repeat;
    /* ------------------------ */

    border: 2px solid gold;       /* Сделал рамку золотой (была пунктирная) */
    border-radius: 10px;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* Добавил тень тексту, чтобы лучше читался на фото */
.waiting-content h1 { 
    color: white; 
    font-size: 1.8em; 
    margin-bottom: 10px; 
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); 
}

/* Сделал цвет чуть светлее (#ccc вместо #888), чтобы было видно на темном фоне */
.waiting-sub { 
    color: #ccc; 
    margin-bottom: 30px; 
}

.next-show-box {
    background: rgba(34, 34, 34, 0.9); /* Сделал подложку чуть прозрачной */
    padding: 15px 30px; 
    border-radius: 8px;
    border: 1px solid gold; 
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.next-show-title { 
    font-size: 1.4em; 
    font-weight: bold; 
    color: white; 
    margin-bottom: 5px; 
    text-transform: uppercase; 
}
/* ==========================================================================
   ТОЧЕЧНЫЙ РЕМОНТ (ВКЛЮЧАЕМ ЦИФРЫ И ЦВЕТА)
   ========================================================================== */

/* 1. Делаем маленькие цифры туров (1, 2, 3...) над ячейками ЗОЛОТЫМИ */
.winners-grid > div > div:first-child {
    color: gold !important;
    font-weight: bold !important;
    opacity: 1 !important;
    text-shadow: 0 0 2px black;
}

/* 2. ЧИНИМ НЕВИДИМЫЕ ЦИФРЫ ВНУТРИ ЯЧЕЕК */
/* Если ячейка стала золотой (победитель), мы принудительно показываем текст */
.winner-cell[style*="gold"], 
.winner-cell[style*="rgb(255, 215, 0)"] {
    color: black !important;       /* Цвет цифры черный */
    font-size: 14px !important;    /* Возвращаем нормальный размер шрифта */
    text-indent: 0 !important;     /* Убираем сдвиги, если были */
    
    /* Центруем цифру */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 3. Сдвигаем сетку на ПК влево на 10px (как ты просил ранее) */
@media (min-width: 769px) {
    .winners-section {
        transform: translateX(-30px);
    }
}
/* ==========================================================================
   РУЧНАЯ НАСТРОЙКА ТЕКСТА "ПОБЕДИТЕЛИ ТУРОВ" (ТОЛЬКО ПК)
   ========================================================================== */
@media (min-width: 769px) {
    .winners-section .label {
        position: relative; 
        
        /* 1. ДВИГАЕМ ВЛЕВО / ВПРАВО */
        /* Минус - влево, Плюс - вправо */
        left: -10px; 

        /* 2. ДВИГАЕМ ВВЕРХ / ВНИЗ */
        /* Минус - вверх, Плюс - вниз */
        top: -10px; 
        
        /* 3. ВЫРАВНИВАНИЕ ТЕКСТА (если нужно) */
        text-align: right; /* center, left или right */
    }
}
/* ОВЕРЛЕЙ УВЕДОМЛЕНИЙ */
#game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Почти черный фон */
    z-index: 9999; /* Поверх всего */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    transition: opacity 0.5s ease;
}

.overlay-content {
    background: #111;
    border: 2px solid gold;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    max-width: 90%;
    width: 400px;
}

#overlay-title {
    color: gold;
    font-size: 2em;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px #ff0000;
}

#overlay-message {
    color: white;
    font-size: 1.2em;
    margin-bottom: 20px;
    line-height: 1.5;
}

.overlay-numbers {
    color: #4cd137; /* Зеленый цвет для номеров */
    font-size: 1.5em;
    font-weight: bold;
    word-break: break-all;
}

/* Класс для скрытия (если у тебя его нет) */
.hidden {
    display: none !important;
}
/* ФИКС ДЛЯ БЕГУЩЕЙ СТРОКИ НА ТЕЛЕФОНЕ */
@media (max-width: 768px) {
    .ticker-move, .ticker-wrap .ticker {
        /* Заставляет блок быть шириной в ТЕКСТ, а не в ЭКРАН */
        width: max-content !important; 
        min-width: 100% !important;
    }
}

