:root {
    --bg-main: #141414;
    --bg-card: #1f1f1f;
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --nav-width: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* === LAYOUT ENGINE === */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar-nav {
    width: var(--nav-width);
    background: #000;
    padding: 30px;
    position: fixed;
    height: 100vh;
    border-right: 1px solid #222;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.content-stream {
    flex: 1;
    margin-left: var(--nav-width); /* Offset for fixed sidebar */
    display: flex;
    flex-direction: column; /* Pushes footer down */
    min-height: 100vh;
    background: var(--bg-main);
}

/* === SIDEBAR === */
.logo-area {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 50px;
    letter-spacing: -1px;
}

.menu-list a {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 0;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
}
.menu-list a:hover, .menu-list a.active { color: #fff; }
.menu-list i { margin-right: 15px; width: 24px; }

/* === HERO SECTION === */
.hero-cinematic {
    height: 65vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    background: linear-gradient(to top, var(--bg-main), transparent);
    width: 100%;
    padding: 0 50px 40px 50px;
}

.badge-new {
    background: #e50914;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.hero-overlay h1 {
    font-size: 3.5rem;
    margin: 10px 0;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-overlay p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #ddd;
}

.btn-play-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 15px;
    transition: 0.2s;
}
.btn-play-primary:hover { background: #ddd; }

.btn-info {
    background: rgba(109, 109, 110, 0.7);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-info:hover { background: rgba(109, 109, 110, 0.9); }

/* === GAME CARDS (UPGRADED) === */
.media-row { padding: 40px 50px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.row-title { font-size: 1.4rem; color: #fff; }
.see-all { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 600; }

.scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

.media-card {
    min-width: 200px;
    width: 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-card:hover { transform: translateY(-5px); }

.card-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #333;
}

.media-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: opacity 0.3s;
}

/* Hover Effect: Darken image & Show Play Button */
.play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; justify-content: center; align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-overlay i {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
    transform: scale(0.8);
    transition: transform 0.3s;
}

.media-card:hover .play-overlay { opacity: 1; }
.media-card:hover .play-overlay i { transform: scale(1); }

.card-info { margin-top: 10px; }
.card-info h3 { font-size: 1rem; margin-bottom: 5px; color: #eee; }
.rating { color: #46d369; font-weight: 700; font-size: 0.85rem; }
.genre { float: right; color: var(--text-secondary); font-size: 0.8rem; border: 1px solid #444; padding: 0 5px; border-radius: 3px; }

/* === FEATURES SECTION === */
.features-area {
    padding: 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    background: linear-gradient(to bottom, var(--bg-main), #111);
}

.feature-box {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #252525;
    text-align: center;
    transition: 0.3s;
}
.feature-box:hover { border-color: var(--accent); }

.feat-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; }
.feature-box h4 { margin-bottom: 10px; color: #fff; }
.feature-box p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* === FAQ SECTION === */
.faq-area { padding: 0 50px 60px 50px; max-width: 900px; }

.accordion details {
    background: #1a1a1a;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.accordion summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    list-style: none; /* Hide default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: 1.2rem; color: var(--accent); }
.accordion details[open] summary::after { content: '-'; }

.accordion p {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    border-top: 1px solid #333;
    margin-top: 10px;
    padding-top: 10px;
}

/* === FOOTER (FIXED) === */
.stream-footer {
    background: #000;
    padding: 60px 50px;
    margin-top: auto; /* Pushes to bottom */
    border-top: 1px solid #222;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 20px;
    font-weight: 800;
}

.disclaimer-highlight {
    background: #111;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 30px;
    display: inline-block;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a { color: #666; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.copyright { color: #444; font-size: 0.75rem; }

/* === MOBILE & RESPONSIVE === */
.mobile-tab-bar { display: none; }
.hidden { display: none !important; }

/* Modal Styles from before */
.modal-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
}
.modal-glass {
    background: #1e1e1e; padding: 40px; border-radius: 12px;
    text-align: center; border: 1px solid #333; position: relative;
    box-shadow: 0 0 30px rgba(0,212,255,0.1); width: 90%; max-width: 400px;
}
.wheel-wrapper {
    width: 250px; height: 250px; margin: 20px auto;
    border-radius: 50%; border: 4px solid #fff; background: #333;
    overflow: hidden; position: relative;
}
.the-wheel {
    width: 100%; height: 100%;
    background: conic-gradient(#ff3b30 0deg 60deg, #007aff 60deg 120deg, #34c759 120deg 180deg, #ffcc00 180deg 240deg, #af52de 240deg 300deg, #5856d6 300deg 360deg);
    border-radius: 50%;
    transition: transform 4s ease-out;
}
.pointer-arrow { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 30px; z-index: 10; }
.close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Age Gate & Cookie */
.full-cover { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 5000; display: flex; justify-content: center; align-items: center; }
.center-box { text-align: center; padding: 20px; }
.center-box h1 { font-size: 4rem; color: var(--accent); margin-bottom: 15px; }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #222; padding: 10px 20px; border-radius: 30px; display: flex; gap: 15px; align-items: center; z-index: 3000; border: 1px solid #444; width: max-content;}
#cookie-ok { background: var(--accent); border: none; padding: 5px 15px; border-radius: 20px; font-weight: bold; cursor: pointer; }


@media (max-width: 768px) {
    .app-shell { display: block; } /* Disable flex on mobile */
    .sidebar-nav { display: none; }
    .content-stream { margin-left: 0; padding-bottom: 80px; /* Space for mobile nav */ }
    
    .mobile-tab-bar {
        display: flex; justify-content: space-around; align-items: center;
        position: fixed; bottom: 0; width: 100%; height: 60px;
        background: rgba(15,15,15,0.95); border-top: 1px solid #333;
        backdrop-filter: blur(10px); z-index: 100;
    }
    .tab-item { color: #666; font-size: 1.4rem; }
    .tab-item.active { color: #fff; }

    .hero-cinematic { height: 55vh; }
    .hero-overlay { padding: 20px; text-align: center; align-items: center; display: flex; flex-direction: column; justify-content: flex-end; }
    .hero-overlay h1 { font-size: 2.2rem; }
    .hero-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }
    .btn-play-primary, .btn-info { width: 100%; margin: 0; justify-content: center; }
    
    .media-row, .features-area, .faq-area, .stream-footer { padding-left: 20px; padding-right: 20px; }
    .stream-footer { padding-bottom: 90px; } /* Footer needs extra space on mobile so it doesn't hide behind nav */
}

/* === GAME LORE SECTION === */
.game-lore-section {
    padding: 20px 50px 60px 50px;
    background: #141414;
}

.section-subtitle {
    color: #666;
    margin-top: -15px;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* 2 columns on desktop */
    gap: 30px;
}

.lore-card {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    transition: 0.3s;
}

.lore-card:hover {
    border-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.lore-visual {
    width: 120px;
    min-width: 120px; /* Fixed width for image */
    background-size: cover;
    background-position: center;
    border-right: 1px solid #252525;
}

.lore-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lore-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 8px;
    display: inline-block;
}

/* Tag Colors */
.tag-cyber { color: #ff00ff; }
.tag-gold { color: #ffd700; }
.tag-speed { color: #00d4ff; }
.tag-myth { color: #bfbfbf; }

.lore-content h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
}

.lore-text {
    font-size: 0.85rem;
    color: #a3a3a3;
    line-height: 1.5;
    margin-bottom: 15px;
}

.lore-text strong { color: #ccc; }

.lore-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: #666;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.lore-meta i { margin-right: 5px; color: #444; }

/* Mobile adaptation for Lore Section */
@media (max-width: 768px) {
    .game-lore-section { padding: 20px; }
    
    .lore-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }

    .lore-card {
        flex-direction: column; /* Image on top, text below */
    }

    .lore-visual {
        width: 100%;
        height: 150px;
        border-right: none;
        border-bottom: 1px solid #252525;
    }
}

/* === NEON PLINKO GAME === */
.game-container-glass {
    background: #121212;
    padding: 20px;
    border-radius: 16px;
    width: 95%;
    max-width: 400px;
    border: 1px solid #333;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.game-header h3 { color: var(--accent); margin: 0; }
.close-game-btn { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* The Board */
.plinko-board {
    width: 320px;
    height: 300px;
    position: relative;
    background: radial-gradient(circle at center, #1a1a1a, #000);
    border: 2px solid #333;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

/* Pins (Dots) */
.pin {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

/* The Falling Ball */
.plinko-ball {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
    z-index: 10;
    transition: top 0.3s linear, left 0.3s ease-in-out;
}

/* Bottom Buckets */
.plinko-buckets {
    display: flex;
    width: 320px;
    gap: 2px;
}

.bucket {
    flex: 1;
    background: #222;
    color: #888;
    text-align: center;
    padding: 10px 0;
    font-size: 0.8rem;
    font-weight: bold;
    border-top: 2px solid var(--accent);
    border-radius: 0 0 5px 5px;
    transition: 0.2s;
}

.bucket.active {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

.game-controls {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

.score-display {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
}

#game-status-text {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
    min-height: 20px;
}

/* === DYNAMIC GAME THEMES === */
:root {
    --game-ball-color: #fff;       /* Default color */
    --game-ball-glow: #fff;        /* Default glow */
    --game-board-bg: #111;         /* Default bg */
}

/* Применяем переменные к доске */
.plinko-board {
    background: var(--game-board-bg) !important; /* Force override */
    transition: background 0.5s ease;
}

/* Применяем переменные к шарику */
.plinko-ball {
    background: var(--game-ball-color) !important;
    box-shadow: 0 0 10px var(--game-ball-glow), 0 0 20px var(--game-ball-glow) !important;
}

/* Shapes (Формы шарика) */
.shape-circle {
    border-radius: 50%;
}

.shape-square {
    border-radius: 2px; /* Чуть скругленный куб */
}

.shape-diamond {
    border-radius: 1px;
    transform: rotate(45deg) translate(-50%, -50%); /* Ромб */
    transform-origin: center;
}

/* Разные фоны для доски */
.bg-cyber {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a0b1a 100%), 
                repeating-linear-gradient(0deg, transparent, transparent 19px, #330033 20px),
                repeating-linear-gradient(90deg, transparent, transparent 19px, #330033 20px) !important;
    background-size: 100% 100%, 20px 20px, 20px 20px !important;
}

.bg-gold {
    background: radial-gradient(circle at top, #2a0a0a, #000) !important;
    border-color: #d4af37 !important;
}

.bg-neon {
    background: linear-gradient(to bottom, #00111a, #000) !important;
}

.bg-gods {
    background: linear-gradient(to bottom, #1a2a3a, #050505) !important;
}