/* ====== ПЕРЕМЕННЫЕ (общие для всех страниц) ====== */
:root {
    --brand-red-500: #f44336; /* Ярко-красный */
    --brand-red-600: #dc2626; /* Основной красный */
    --brand-red-700: #b91c1c; /* Темно-красный */
    --brand-green-500: #22c55e; /* Ярко-зеленый */
    --brand-green-600: #16a34a; /* Основной зеленый */
    --brand-green-700: #15803d; /* Темно-зеленый */
    --text-white: #ffffff; /* Белый шрифт */
    --text-grey-dark: #888888; /* Темно-серый шрифт */
    --text-grey-light: #cccccc; /* Светло-серый шрифт */
    --surface-black: #000000; /* Черный фон */
    --surface-grey-dark: #111317; /* Темно-серый для фоновых элементов */
    --surface-grey-light: #3b3f46; /* Светло-серый для активных элементов */
    --background-opacity: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */
    --shadow-text-brand: 2px 2px 4px rgba(0, 0, 0, 1.0); /* Непрозрачная тень брендового текста */
    --shadow-text-basic: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Полупрозрачная тень обычного текста */
    --shadow-filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)); /* Тень объекта */
    --topbar-height: 2.5rem; /* Высота топбара */
    --font-size-navigation: clamp(1.2rem, 1.0rem + 1.0vw, 1.5rem); /* Навигация и кнопки */
    --font-size-h1: clamp(1.9rem, 1.1rem + 3.5vw, 3.0rem); /* Основной заголовок */
    --font-size-section-title: clamp(1.5rem, 0.9rem + 2.7vw, 2.3rem); /* Заголовок формы */
    --font-size-switch-link: clamp(1.5rem, 0.7rem + 2.2vw, 1.9rem); /* Переключение формы */
    --font-size-checkbox: clamp(0.9rem, 0.5rem + 1.6vw, 1.1rem); /* Строка чекбокса */
    --font-size-rating-title: clamp(1.2rem, 0.7rem + 2.2vw, 1.4rem); /* Оценка игроков */
    --font-size-text: clamp(1.0rem, 0.6rem + 1.8vw, 1.1rem); /* Цитаты игроков */
    --font-size-news-title: clamp(1.2rem, 0.7rem + 2.2vw, 1.6rem); /* Название новости */
    --font-size-news-date: clamp(0.9rem, 0.5rem + 1.6vw, 1.0rem); /* Дата новости */
    --font-size-footer: clamp(0.75rem, 0.4rem + 1.3vw, 1.0rem); /* Футер */
    --font-size-cookies: clamp(0.75rem, 0.4rem + 1.3vw, 1.0rem); /* Плашка кукис */
    --font-size-toast: clamp(0.75rem, 0.4rem + 1.3vw, 1.0rem); /* Плашка тоста */
    --spacing-horizontal-form-auth: clamp(1.5rem, 4vw, 2.0rem); /* Форма авторизации по бокам */
    --spacing-top-h1: clamp(3.8rem, 2.1rem + 7.0vw, 6.0rem); /* Основной заголовок сверху */
    --spacing-top-widget-basic: clamp(2.5rem, 1.4rem + 4.6vw, 4.0rem); /* Базовый виджет сверху */
    --spacing-top-widget-rating: clamp(5.0rem, 2.8rem + 9.2vw, 8.0rem); /* Виджет рейтинга сверху */
    --spacing-horizontal-content: clamp(1.5rem, 4vw, 3.0rem); /* Текст контента по бокам */
    --spacing-top-section: clamp(1.0rem, 3vw, 2.0rem); /* Внутренние вертикальные отступы секции */
    --spacing-padding-table: clamp(0.5rem, 1vw, 1.0rem); /* Внутренние отступы таблицы */
    --font-size-404: clamp(9.5rem, 5.5rem + 17.5vw, 15.0rem); /* 404 */
}

/* ШРИФТЫ */
@font-face {
    font-family: 'Roadkill';
    src: url('https://cdn.quarantine-game.ru/fonts/Roadkill_Heavy_Regular.woff2') format('woff2'),
    url('https://cdn.quarantine-game.ru/fonts/Roadkill_Heavy_Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Roadkill Fallback';
    size-adjust: 79%;
    descent-override: 50%;
    src: local('system-ui');
}

/* СТРАНИЦА */
html,
body {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--surface-black);
    font-size: 1.0rem;
    font-family: system-ui;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ЗАГРУЗКА ФОНА */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
}
.background-overlay.loaded {
    animation: fadeIn 1.0s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* СТИЛИЗАЦИЯ ПОЛОСЫ ПРОКРУТКИ */
html {
    scrollbar-width: auto;
    scrollbar-color: var(--surface-grey-light) var(--surface-grey-dark);
}
::-webkit-scrollbar {
    width: auto;
}
::-webkit-scrollbar-thumb {
    background: var(--surface-grey-light);
}
::-webkit-scrollbar-track {
    background: var(--surface-grey-dark);
}

/* ОТКЛЮЧЕНИЕ МИГАНИЯ ПРИ ТАПЕ */
button,
.button,
a,
input[type="checkbox"] {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* КЛАСС НЕВИДИМОСТИ */
.hidden {
    display: none !important;
}

/* ====== СЛОЙ СТРАНИЦЫ ====== */
/* НАВИГАЦИЯ */
.navigation {
    display: flex;
    align-items: center;
    position: fixed;
    gap: 1.5rem;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    padding: 0 1.0rem;
    background: var(--surface-black);
    z-index: 2;
}

/* Кнопки навигации */
.navigation a {
    font-family: 'Roadkill', 'Roadkill Fallback';
    font-size: var(--font-size-navigation);
    color: var(--text-white);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.navigation a:hover {
    color: var(--brand-red-600);
}
.navigation a:active {
    color: var(--brand-red-700);
}

/* Кнопка поддержки */
.navigation .support-link {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.5rem;
    text-transform: uppercase;
    transition: all 0.2s;
}
.telegram-icon-nav {
    height: 25px;
    width: 25px;
}

/* MAIN (документ) */
main {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    gap: 2.0rem;
}

.rules-title, .policy-title, .agreement-title {
    font-family: 'Roadkill', 'Roadkill Fallback';
    font-size: var(--font-size-h1);
    color: var(--text-white);
    text-shadow: var(--shadow-text-brand);
    margin-top: var(--spacing-top-h1);
    text-align: center;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: 400;
}

/* Панель текста */
.rules-content, .policy-content, .agreement-content {
    background: var(--background-opacity);
    box-shadow: 0 10px 30px var(--background-opacity);
    border: 1px solid var(--surface-grey-light);
    border-radius: 1.0rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: min(1002px, calc(100vw));
    box-sizing: border-box;
    padding: var(--spacing-horizontal-content);
    font-size: var(--font-size-text);
    color: var(--text-white);
    text-shadow: var(--shadow-text-basic);
}

/* Описание документа */
.highlight-box {
    background-color: var(--surface-black);
    border-left: 4px solid var(--brand-red-600);
    padding: 1.0rem;
    border-radius: 0 1.0rem 1.0rem 0;
}

/* Секция текста */
.rules-section, .policy-section, .agreement-section {
    padding: var(--spacing-top-section) 0;
    border-bottom: 1px solid var(--surface-grey-light);
}
.rules-section:nth-last-child(2), .policy-section:nth-last-child(2), .agreement-section:nth-last-child(2) {
    border-bottom: none;
}

/* Заголовок секции */
.rules-section h2, .policy-section h2, .agreement-section h2 {
    font-family: 'Roadkill', 'Roadkill Fallback';
    font-size: var(--font-size-section-title);
    color: var(--brand-red-600);
    text-shadow: var(--shadow-text-brand);
    margin: 0;
    font-weight: 400;
    text-transform: uppercase;
}

/* Текст секции */
.rules-section p, .policy-section p, .agreement-section p {
    margin-top: 1.0rem;
    margin-bottom: 0;
}
.rules-section ul, .policy-section ul, .agreement-section ul {
    padding-left: 2.0rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}
.rules-section li, .policy-section li, .agreement-section li {
    margin-bottom: 0.5rem;
}

/* Ссылка */
a.link {
    color: var(--brand-red-600);
    text-decoration: none;
    transition: all 0.2s;
}
a.link:hover {
    color: var(--brand-red-500);
}
a.link:active {
    color: var(--brand-red-700);
}

/* ФУТЕР */
footer {
    background: var(--surface-black);
    box-shadow: 0 -2px 10px var(--background-opacity);
    padding: 0 1.0rem;
    margin-top: var(--spacing-top-widget-basic);
    position: relative;
}

.footer-info {
    padding: 1.0rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

/* Реквизиты */
.footer-company {
    color: var(--text-grey-dark);
    font-size: var(--font-size-footer);
    display: flex;
}

/* Ссылки */
.footer-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.footer-menu a {
    color: var(--text-grey-dark);
    text-decoration: underline dashed;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.15em;
    font-size: var(--font-size-footer);
    transition: all 0.2s;
    white-space: nowrap;
}
.footer-menu a:hover {
    color: var(--brand-red-600);
}
.footer-menu a:active {
    color: var(--brand-red-700);
}

/* Иконки */
.footer-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.marking_icon {
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
}

/* Разделитель */
.footer-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    width: clamp(250px, 50%, 1000px);
    margin: 0 auto;
}

/* Копирайт */
.footer-copyright {
    padding: 1.5rem 0;
    display: block;
    color: var(--text-grey-dark);
    font-size: var(--font-size-footer);
    text-align: center;
}

/* ===== СЛОЙ КУКИС ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background-opacity);
    backdrop-filter: blur(10px);
    color: var(--text-white);
    padding: 1.0rem 1.0rem;
    box-shadow: 0 -2px 10px var(--background-opacity);
    z-index: 3;
    font-size: var(--font-size-cookies);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cookie-consent.show {
    display: flex;
}

/* Текст кукис */
.cookie-consent p {
    margin: 0;
    flex: 1;
}
.cookie-consent a {
    color: var(--text-white);
    text-decoration: underline dashed;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.15em;
    transition: all 0.2s;
}
.cookie-consent a:hover {
    color: var(--brand-red-600);
}
.cookie-consent a:active {
    color: var(--brand-red-700);
}

/* Кнопка кукис */
.cookie-consent button {
    background: linear-gradient(to bottom, var(--brand-red-500), var(--brand-red-600), var(--brand-red-700));
    color: var(--text-white);
    text-shadow: var(--shadow-text-brand);
    width: 100px;
    height: 35px;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.4);
}
.cookie-consent button:hover {
    filter: brightness(1.1);
}
.cookie-consent button:active {
    filter: brightness(0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
