/*
 * NEXUS SWEEP NL - Full Suite
 * Version: 1.3.0
 * Includes: Core, Games Demo, Fixed Mobile Menu
 */

:root {
    --color-onyx: #0b0c0e;
    --color-surface: #141619;
    --color-border: #262a2f;
    --color-gold: #c5a47e;
    --color-gold-muted: #a38968;
    --color-white: #ffffff;
    --color-text-low: #80868d;
    
    --f-serif: 'Playfair Display', serif;
    --f-sans: 'Inter', sans-serif;
    
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.4);
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Base & Reset --- */
*, *::before, *::after { box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background-color: var(--color-onyx);
    color: var(--color-white);
    font-family: var(--f-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.o-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
.c-heading-xl { font-family: var(--f-serif); font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.1; margin: 0 0 1.5rem; }
.c-heading-lg { font-family: var(--f-serif); font-size: 2.2rem; margin: 0 0 1.2rem; }
.u-text-gold { color: var(--color-gold); }

/* --- Header & Navigation --- */
.c-header {
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(11, 12, 14, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
}

.c-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.c-logo {
    text-decoration: none;
    color: var(--color-white);
    font-family: var(--f-serif);
    font-size: 1.7rem;
    font-weight: 800;
    z-index: 1001; /* Поверх меню */
}

/* Desktop Nav */
.c-nav { display: flex; gap: 32px; }
.c-nav__link {
    color: var(--color-text-low);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s var(--ease);
}
.c-nav__link:hover, .c-nav__link.is-active { color: var(--color-gold); }

/* --- Mobile Menu FIX --- */
.c-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    padding: 0;
}
.c-header__toggle-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: 0.4s var(--ease);
}

@media (max-width: 768px) {
    .c-header__toggle { display: flex; }
    
    .c-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-onyx);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        
        /* Скрытие меню по умолчанию */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.4s var(--ease);
        z-index: 2000;
    }

    .c-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .c-nav__link { font-size: 1.2rem; }

    /* Анимация гамбургера */
    .is-menu-open .c-header__toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .is-menu-open .c-header__toggle-bar:nth-child(2) { opacity: 0; }
    .is-menu-open .c-header__toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    body.is-locked { overflow: hidden; }
}

/* --- Common UI --- */
.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    background: var(--color-gold);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    border: none;
    cursor: pointer;
}
.c-btn:hover { background: var(--color-white); transform: translateY(-2px); }
.c-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Game Grid --- */
.c-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}
.c-game-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: 0.4s;
}
.c-game-card:hover { border-color: var(--color-gold); }
.c-game-card__thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.c-game-card__body { padding: 24px; }
.c-game-card__title { margin: 0 0 8px; font-family: var(--f-serif); font-size: 1.4rem; }
.c-game-card__cat { color: var(--color-text-low); font-size: 0.75rem; text-transform: uppercase; margin-bottom: 15px; }

/* --- Game Modal & Demos --- */
.c-modal {
    position: fixed; inset: 0; z-index: 30000;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.c-modal.is-active { display: flex; }
.c-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); }
.c-modal__content {
    position: relative; width: 100%; max-width: 500px;
    background: var(--color-surface); border: 1px solid var(--color-border);
    padding: 50px 30px; border-radius: 4px; text-align: center;
}
.c-modal__close {
    position: absolute; top: 15px; right: 20px; background: none; border: none;
    color: var(--color-text-low); font-size: 2rem; cursor: pointer;
}

.game-title { font-family: var(--f-serif); font-size: 1.8rem; color: var(--color-gold); margin-bottom: 25px; letter-spacing: 2px; }
.status-msg { margin: 20px 0; min-height: 24px; font-weight: 600; color: var(--color-gold); font-size: 0.9rem; }

/* Slot Styles */
.slots-reels { display: flex; gap: 15px; justify-content: center; background: #08090a; padding: 20px; border-radius: 8px; margin-bottom: 30px; }
.slots-reel {
    width: 80px; height: 110px; background: #1a1d21; border: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--color-gold);
}

/* Blackjack Styles */
.bj-table {
    background: radial-gradient(circle, #1a3d2f 0%, #0d2119 100%);
    border: 8px solid #2c2419; border-radius: 80px 80px 10px 10px;
    padding: 30px 10px; margin-bottom: 30px;
}
.bj-hand { display: flex; gap: 8px; justify-content: center; min-height: 80px; }
.card {
    width: 45px; height: 68px; background: #fff; color: #000; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* Plinko Styles */
.plinko-board { width: 100%; max-width: 300px; height: 280px; background: #08090a; margin: 0 auto 30px; position: relative; overflow: hidden; }
.plinko-ball { width: 12px; height: 12px; background: var(--color-gold); border-radius: 50%; position: absolute; top: -15px; left: 50%; box-shadow: 0 0 10px var(--color-gold); }
.plinko-peg { width: 4px; height: 4px; background: #3a3f45; border-radius: 50%; position: absolute; }

/* --- Legal & Footer --- */
.c-legal { padding: 160px 0 80px; max-width: 850px; }
.c-legal__content h2 { color: var(--color-gold); margin-top: 2.5rem; font-family: var(--f-serif); }
.c-legal__content p { margin-bottom: 1.5rem; color: #b0b5bc; }

.c-age-gate {
    position: fixed; inset: 0; background: #0b0c0e; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.c-age-gate__box { background: var(--color-surface); border: 1px solid var(--color-border); padding: 60px; text-align: center; max-width: 500px; }

.c-footer { background: #08090a; padding: 80px 0 40px; border-top: 1px solid var(--color-border); }
.c-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.c-footer__link { display: block; color: var(--color-text-low); text-decoration: none; margin-bottom: 12px; font-size: 0.9rem; }
.c-footer__link:hover { color: var(--color-gold); }