@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bg: #0c0c0c;
    --fg: #cbcbcb;
    --fg-rgb: 203, 203, 203;
    /* Для rgba фильтров */
    --bg-rgb: 12, 12, 12;
    --surface-bg: #111;
    --surface-hover: #151515;
    --border-light: rgba(203, 203, 203, 0.2);
    --text-muted: #888;
    --text-sub: #aaa;
}

[data-theme="light"] {
    --bg: #f0f2f5;
    --fg: #0c0c0c;
    --fg-rgb: 12, 12, 12;
    --bg-rgb: 240, 242, 245;
    --surface-bg: #ffffff;
    --surface-hover: #f5f5f5;
    --border-light: rgba(12, 12, 12, 0.2);
    --text-muted: #65676b;
    --text-sub: #333;
}

html {
    scroll-behavior: smooth;
}

/* --- КАСТОМНЫЙ СКРОЛЛБАР --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-bg);
    border: 1px solid var(--border-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--fg);
}

/* --- КАСТОМНОЕ ВЫДЕЛЕНИЕ ТЕКСТА --- */
::selection {
    background: var(--fg);
    color: var(--bg);
}

::-moz-selection {
    background: var(--fg);
    color: var(--bg);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input,
button,
textarea,
select {
    font-family: inherit;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Exo 2', 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    overflow-x: hidden;
    padding-bottom: 10rem;
    /* Добавляем отступ снизу, чтобы плеер не перекрывал футер */
    zoom: 0.9;
}

/* Чистая "журнальная" навигация */
.editorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.2s forwards;
    background: rgba(var(--bg-rgb), 0.8);
    backdrop-filter: blur(10px);
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.editorial-nav.nav-hidden {
    top: -120px;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: -1px;
    text-transform: lowercase;
}

.logo span {
    font-size: 2rem;
    vertical-align: top;
}

/* Бургер-кнопка (скрыта на ПК) */
.burger-menu {
    display: none;
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    z-index: 200;
    position: relative;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 3rem;
}

/* Переключатель темы */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block !important;
}

.nav-menu {
    display: flex;
    gap: 3rem;
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.nav-menu span,
.nav-menu a {
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.nav-menu span:hover,
.nav-menu a:hover {
    color: var(--fg);
    text-shadow: 0 0 10px rgba(var(--fg-rgb), 0.5);
}

.nav-auth-container {
    display: flex;
    align-items: center;
}

/* Кнопка логина с WOW-эффектом */
.cyber-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--fg-rgb), 0.05);
    color: var(--fg);
    border: 1px solid var(--border-light);
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
}

.cyber-login-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--fg);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-login-btn:hover {
    background: rgba(var(--fg-rgb), 0.1);
    border-color: rgba(var(--fg-rgb), 0.6);
    box-shadow: 0 0 20px rgba(var(--fg-rgb), 0.15);
    transform: translateY(-2px);
}

.cyber-login-btn:hover::before {
    width: 100%;
}

.cyber-login-btn:active {
    transform: translateY(0);
}

/* Мини-профиль в навигации */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    margin-left: 2rem;
}

.nav-profile:hover {
    opacity: 0.7;
}

.nav-mini-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--fg);
    object-fit: cover;
}

.nav-mini-name {
    font-size: 0.8rem;
    font-weight: bold;
}

/* Выпадающее меню профиля */
.profile-wrapper {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--fg);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    z-index: 200;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    animation: fadeUp 0.2s ease-out forwards;
}

.dropdown-item {
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: var(--fg);
    color: var(--bg);
}

.dropdown-item.logout {
    border-top: 1px solid var(--border-light);
    color: #ff4a4a;
}

.dropdown-item.logout:hover {
    background: #ff4a4a;
    color: var(--bg);
}

/* Основной холст */
.editorial-canvas {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Огромная фоновая типографика */
.bg-typography {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    opacity: 0;
    animation: fadeIn 2s ease-out 1.5s forwards;
}

.rules-bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 115vw;
    min-height: 115vh;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    pointer-events: none;
    object-fit: cover;
    max-width: none;
}

.bg-word-left {
    font-size: 18vh;
    /* Масштабируем по высоте экрана, чтобы слово DESIRE не обрезалось */
    font-weight: 900;
    color: rgba(var(--fg-rgb), 0.03);
    writing-mode: vertical-rl;
    /* Правильный вертикальный текст */
    transform: rotate(180deg);
    margin: 0;
}

.bg-word-right {
    font-size: 40vw;
    /* Немного уменьшили для баланса */
    font-weight: 900;
    color: rgba(var(--fg-rgb), 0.03);
    margin-right: -5vw;
}

/* Экспонат (3D модель) */
.center-exhibit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 80vw;
    /* Сделали контейнер шире */
    height: 85vh;
    /* И выше */
    z-index: 10;
    opacity: 0;
    animation: fadeUpScale 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

model-viewer {
    width: 100%;
    height: 100%;
    outline: none;
}

/* Плавающие элементы микро-интерфейса */
.float-elem {
    position: absolute;
    z-index: 20;
    opacity: 0;
    /* Изначально скрыты для анимации */
}

/* Левый верхний угол */
.top-left {
    top: 25%;
    left: 4rem;
    animation: fadeUp 1s ease-out 0.8s forwards;
}

.top-left h2 {
    font-size: 1rem;
    margin: 0;
}

.top-left p {
    font-size: 0.65rem;
    margin-top: 5px;
    letter-spacing: 1px;
    color: #888;
}

.icon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-icon {
    width: 20px;
    height: 20px;
    border: 1px solid var(--fg);
    border-radius: 50%;
}

.micro-text {
    font-size: 0.5rem;
    letter-spacing: 2px;
}

/* Точка слева */
.mid-left {
    top: 50%;
    left: 4rem;
    animation: fadeUp 1s ease-out 1s forwards;
}

.dot {
    width: 5px;
    height: 5px;
    background: var(--fg);
    border-radius: 50%;
}

/* Левый нижний угол (Авторизация) */
.bottom-left {
    bottom: 4rem;
    left: 4rem;
    animation: fadeUp 1s ease-out 1.2s forwards;
}

.fine-print {
    font-size: 0.55rem;
    line-height: 1.6;
    letter-spacing: 1px;
    color: #777;
}

/* Правый центр */
.mid-right {
    top: 45%;
    right: 15%;
    animation: fadeUp 1s ease-out 1.4s forwards;
}

.status-title {
    font-size: 0.6rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.green-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 5px;
}

.line-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.circle-outline {
    width: 15px;
    height: 15px;
    border: 1px solid var(--fg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-outline::after {
    content: "";
    width: 5px;
    height: 5px;
    background: var(--fg);
    border-radius: 50%;
}

.line {
    width: 50px;
    height: 1px;
    background: var(--fg);
}

.line.short {
    width: 20px;
}

.number {
    font-weight: bold;
    font-size: 0.8rem;
}

/* Правый низ */
.bottom-right {
    bottom: 8rem;
    right: 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2rem;
    animation: fadeUp 1s ease-out 1.6s forwards;
}

.right-align {
    text-align: right;
}

.vertical-date {
    writing-mode: vertical-rl;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v-line {
    width: 1px;
    height: 30px;
    background: var(--fg);
}

.scroll-arrow {
    border: 1px solid var(--fg);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    background: var(--fg);
    color: var(--bg);
}

/* Ключевые кадры для анимаций (Красивый заход) */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUpScale {
    from {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -45%) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Утилиты */
.text-muted {
    color: var(--text-muted);
}

/* --- СЕКЦИЯ ВЕРИФИКАЦИИ --- */
.verification-section {
    width: 100%;
    min-height: 100vh;
    background: var(--bg);
    padding: 8rem 5% 4rem 5%;
    border-top: 2px solid var(--border-light);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.verif-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    width: 100%;
    align-items: center;
}

.verif-left {
    display: flex;
    flex-direction: column;
}

.verif-title {
    font-size: 5.7rem;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 0.85;
    margin-bottom: 2.5rem;
    color: var(--fg);
    text-transform: uppercase;
}

.verif-box {
    background: rgba(var(--fg-rgb), 0.03);
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.verif-box-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--fg);
    text-transform: none;
}

.verif-box p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-sub);
    text-transform: none;
    /* Текст читаемый, без CapsLock */
    position: relative;
    z-index: 2;
}

.highlight-role {
    background: rgba(var(--fg-rgb), 0.1);
    color: var(--fg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
}

.highlight-role.warning {
    background: rgba(255, 74, 74, 0.15);
    color: #ff4a4a;
}

.verif-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    color: rgba(var(--fg-rgb), 0.04);
    transform: rotate(-15deg);
    z-index: 1;
    pointer-events: none;
}

.verif-footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: none;
    margin-top: 1.5rem;
}

/* Супер-кнопка для входа на сервер */
.cyber-join-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    /* Делаем отступ снизу, чтобы текст под ней не прилипал */
    padding: 1.2rem 2.5rem;
    color: var(--bg);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    overflow: hidden;
    transition: color 0.4s ease;
    z-index: 1;
    width: fit-content;
}

.cyber-join-btn .btn-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--fg);
    z-index: -1;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-join-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--fg);
    z-index: -2;
}

.cyber-join-btn:hover {
    color: var(--fg);
}

.cyber-join-btn:hover .btn-bg {
    width: 0%;
}

.cyber-join-btn .btn-icon {
    display: flex;
    transition: transform 0.3s ease;
}

.cyber-join-btn:hover .btn-icon {
    transform: translateX(12px);
}

.btn-deco {
    position: absolute;
    bottom: 4px;
    left: 6px;
    font-size: 0.45rem;
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--bg);
    transition: color 0.4s ease;
}

.cyber-join-btn:hover .btn-deco {
    color: var(--fg);
}

.verif-right {
    display: flex;
    justify-content: center;
}

.vc-panel {
    background: var(--surface-bg);
    border: 1px solid rgba(var(--fg-rgb), 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.vc-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--fg);
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.vc-line {
    width: 50px;
    height: 2px;
    background: var(--text-muted);
    margin-right: 10px;
}

.vc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vc-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: bold;
    transition: all 0.3s ease;
}

.vc-item.active {
    background: rgba(var(--fg-rgb), 0.05);
    color: var(--fg);
}

.vc-icon {
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.vc-name {
    font-size: 1.2rem;
    flex-grow: 1;
}

.vc-slots-pill {
    background: transparent;
    font-family: monospace;
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    letter-spacing: 2px;
}

.vc-item.active .vc-slots-pill {
    background: var(--bg);
}

.vc-current {
    color: var(--fg);
}

/* Участники в голосовых каналах */
.vc-users {
    padding-left: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: -0.2rem;
    margin-bottom: 0.5rem;
}

.vc-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.vc-user:hover {
    background: rgba(var(--fg-rgb), 0.05);
}

.vc-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.vc-user-name {
    font-size: 0.95rem;
    color: var(--text-sub);
    font-weight: 500;
    text-transform: none;
}

/* --- DISCORD PROFILE POPUP (LIGHT THEME) --- */
.discord-profile-popup {
    position: absolute;
    top: 50%;
    right: calc(100% + 15px);
    /* Открываем карточку влево, а не вправо */
    left: auto;
    transform: translateY(-50%);
    width: 330px;
    background: #e3e4e6;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-transform: none;
    color: #313338;
    cursor: default;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.discord-profile-popup:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.discord-profile-popup.hidden {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(10px);
    /* Изменяем направление выезда анимации */
}

.dp-banner {
    height: 120px;
    background-image: url('https://i.pinimg.com/originals/0f/1b/a3/0f1ba3323de4711a314119a80205c0bf.gif');
    background-size: cover;
    background-position: center;
    position: relative;
}

.dp-header-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.dp-action-btn {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.dp-action-btn svg {
    width: 14px;
    height: 14px;
}

.dp-avatar-wrapper {
    position: absolute;
    top: 76px;
    left: 16px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #e3e4e6;
    padding: 6px;
}

.dp-avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.dp-status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: #23a559;
    border-radius: 50%;
    border: 4px solid #e3e4e6;
}

.dp-body {
    padding: 50px 16px 16px 16px;
    background: #e3e4e6;
}

.dp-display-name {
    font-size: 22px;
    font-weight: 600;
    color: #313338;
    margin: 0;
    letter-spacing: -0.5px;
    font-family: Georgia, 'Times New Roman', serif;
}

.dp-username {
    font-size: 14px;
    color: #5c5e66;
    margin-top: 2px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dp-badges {
    font-size: 11px;
    background: #d4d6d9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #313338;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dp-mutual {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5c5e66;
    margin-bottom: 16px;
}

.dp-mutual-avatars {
    display: flex;
}

.dp-mutual-avatars img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e3e4e6;
    margin-left: -8px;
}

.dp-mutual-avatars img:first-child {
    margin-left: 0;
}

.dp-section {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-about-title {
    font-size: 12px;
    font-weight: 700;
    color: #5c5e66;
    margin: 0;
}

.dp-about-box {
    background: #4e5058;
    height: 20px;
    width: 140px;
    border-radius: 4px;
}

.dp-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.dp-role {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #c8cacd;
    padding: 4px 6px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #313338;
}

.dp-role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dp-role-close {
    color: #80848e;
    cursor: pointer;
    margin-left: 2px;
}

.dp-role-add {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #c8cacd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c5e66;
    cursor: pointer;
}

.dp-message-box {
    position: relative;
}

.dp-message-box input {
    width: 100%;
    background: #cfd1d5;
    border: none;
    padding: 12px 36px 12px 12px;
    border-radius: 8px;
    color: #313338;
    font-size: 14px;
    outline: none;
}

.dp-message-box input::placeholder {
    color: #6a6c72;
}

.dp-msg-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #4e5058;
    cursor: pointer;
}

/* Скрываем старые стили */
.hidden {
    display: none !important;
}

/* --- АНИМАЦИИ ПРИ СКРОЛЛЕ (REVEAL) --- */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки для эффекта каскадного появления */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Пауза всех анимаций сайта, пока идет загрузка (хотя прелоадера больше нет, класс booting можно оставить для других целей или удалить) */
body.booting * {
    animation-play-state: paused !important;
}

/* --- СЕКЦИЯ МАФИИ --- */
.mafia-section {
    width: 100%;
    min-height: 80vh;
    background: var(--bg);
    padding: 8rem 5% 4rem 5%;
    border-top: 2px solid var(--border-light);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mafia-container {
    max-width: 1200px;
    width: 100%;
    z-index: 10;
}

.mafia-header {
    text-align: center;
    margin-bottom: 4rem;
}

.mafia-title {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--fg);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.text-red {
    color: #ff3333;
    text-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
}

.mafia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mafia-card {
    background: rgba(var(--fg-rgb), 0.02);
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Кровавая анимация обводки */
.mafia-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ff3333;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
    box-shadow: 0 0 15px #ff3333;
}

.mafia-card:hover {
    border-color: rgba(255, 51, 51, 0.3);
    background: rgba(255, 51, 51, 0.02);
    transform: translateY(-5px);
}

.mafia-card:hover::before {
    transform: scaleY(1);
}

.mafia-icon {
    margin-bottom: 1.5rem;
}

.mafia-icon svg {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.6));
}

.mafia-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    color: var(--fg);
    font-weight: 900;
}

.mafia-card p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-sub);
    text-transform: none;
}

/* --- ПОДВАЛ САЙТА (ФУТЕР) --- */
.cyber-footer {
    width: 100%;
    padding: 2rem 5%;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
    position: relative;
}

.cyber-footer p {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.cyber-footer .footer-link {
    color: var(--fg);
    font-weight: bold;
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}

.cyber-footer .footer-link:hover {
    text-shadow: 0 0 10px rgba(var(--fg-rgb), 0.8);
}

/* --- АНИМАЦИЯ ПЕРЕХОДА МЕЖДУ СТРАНИЦАМИ --- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fg);
    /* Используем цвет текста для "шторки" */
    transform: translateY(100%);
    /* Начинает за пределами экрана снизу */
    z-index: 10001;
    /* Выше прелоадера и плеера */
    pointer-events: none;
    transition: transform 0.7s cubic-bezier(0.86, 0, 0.07, 1);
}

.page-transition.is-active {
    transform: translateY(0);
    /* Шторка закрывает экран */
    pointer-events: all;
}

.page-transition.is-leaving {
    transform: translateY(-100%);
    /* Шторка уходит вверх */
}

/* --- СЕКЦИЯ ПРАВИЛ --- */
.rules-section {
    width: 100%;
    min-height: 100vh;
    background: transparent;
    padding: 6rem 5% 4rem 5%;
    position: relative;
    display: block;
    overflow-x: hidden;
}

.rules-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.rules-header {
    text-align: center;
    margin-bottom: 2rem;
}

.rules-title {
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--fg);
    text-transform: uppercase;
}

.rule-category {
    background: rgba(var(--fg-rgb), 0.05);
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--fg);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-top: 2px solid rgba(var(--fg-rgb), 0.1);
}

.rule-box {
    background: rgba(var(--fg-rgb), 0.02);
    border: 1px solid rgba(var(--fg-rgb), 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.rule-box:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--fg-rgb), 0.2);
}

.rule-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.rule-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-sub);
    text-transform: none;
    margin-bottom: 1rem;
}

.rule-text b {
    color: var(--fg);
}

.rule-text code {
    background: rgba(var(--fg-rgb), 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.rule-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rule-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rule-meta-item .dot-red {
    width: 6px;
    height: 6px;
    background: #ff3333;
    border-radius: 50%;
}

.rule-meta-item .icon {
    display: flex;
    align-items: center;
}

.rule-meta-value {
    background: rgba(var(--fg-rgb), 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--fg);
    font-family: monospace;
    letter-spacing: 1px;
}

.rules-note-box {
    background: rgba(var(--fg-rgb), 0.03);
    border: 1px solid rgba(var(--fg-rgb), 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.rules-note-box h3 {
    font-size: 1.5rem;
    color: var(--fg);
    margin-bottom: 1rem;
}

.rules-note-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-sub);
    text-transform: none;
    margin-bottom: 1.5rem;
}

.term-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.term-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.term-name {
    background: rgba(var(--fg-rgb), 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: none;
    white-space: nowrap;
}

.term-desc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--text-sub);
    text-transform: none;
    padding-top: 0.1rem;
}