/* ========================================
   NEXUS Gaming - Premium iGaming Provider
   Design System & Styles
   ======================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors */
    --color-bg: #0b0b0d;
    --color-bg-elevated: #111114;
    --color-bg-card: #161619;
    --color-bg-card-hover: #1a1a1e;
    
    --color-accent: #1fd1c1;
    --color-accent-light: #4de8db;
    --color-accent-dark: #16a89a;
    --color-accent-glow: rgba(31, 209, 193, 0.3);
    
    --color-text: #ffffff;
    --color-text-muted: #8a8a8f;
    --color-text-subtle: #5a5a5f;
    
    --color-border: #2a2a2e;
    --color-border-light: #3a3a3e;
    
    --color-success: #22c55e;
    --color-error: #ef4444;
    
    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
    
    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--color-accent-glow);
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
    font-weight: 500;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
}

h3 {
    font-size: var(--text-xl);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--color-text-muted);
}

/* Label Component */
.label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    padding: var(--space-1) var(--space-3);
    background: rgba(31, 209, 193, 0.1);
    border: 1px solid rgba(31, 209, 193, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: var(--color-accent-light);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    color: var(--color-text);
}

.btn-sm {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
}

.btn-lg {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-8);
}

.btn-full {
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    background: rgba(11, 11, 13, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--transition-base);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.logo:hover {
    color: var(--color-accent);
}

.logo-icon {
    color: var(--color-accent);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-list {
    display: flex;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 99;
    padding: var(--space-8);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.mobile-nav-link {
    font-size: var(--text-2xl);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(31, 209, 193, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(31, 209, 193, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 100%, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 560px;
}

.hero-content h1 {
    margin-bottom: var(--space-6);
}

.hero-text {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.hero-shape {
    width: 100%;
    max-width: 400px;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-shape {
        max-width: 280px;
    }
}

/* ========================================
   PAGE HERO (About, Contact)
   ======================================== */
.page-hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-24)) 0 var(--space-20);
    overflow: hidden;
}

.page-hero-compact {
    padding-bottom: var(--space-12);
}

.page-hero-content {
    max-width: 700px;
}

.page-hero-content h1 {
    margin-bottom: var(--space-6);
}

.page-hero-content p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: var(--space-24) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-16);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--color-text-muted);
}

/* ========================================
   FEATURED GAMES
   ======================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.game-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(31, 209, 193, 0.1);
}

.game-card-image {
    aspect-ratio: 16/10;
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-card-image svg {
    width: 64px;
    height: 64px;
    color: var(--color-accent);
    opacity: 0.5;
}

.game-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-bg-card) 0%, transparent 50%);
}

.game-card-content {
    padding: var(--space-5);
}

.game-card-content h3 {
    margin-bottom: var(--space-2);
    transition: color var(--transition-fast);
}

.game-card:hover .game-card-content h3 {
    color: var(--color-accent);
}

.game-card-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.game-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.meta-chip {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--color-text-subtle);
}

.game-card-btn {
    width: 100%;
}

@media (max-width: 992px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   FEATURES / WHY US
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-2px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 209, 193, 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-accent);
    margin-bottom: var(--space-6);
}

.feature-card h3 {
    margin-bottom: var(--space-3);
}

.feature-card p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-card {
    position: relative;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-elevated) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-16);
    text-align: center;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    margin-bottom: var(--space-4);
}

.cta-content p {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto var(--space-8);
}

.cta-decoration {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .cta-card {
        padding: var(--space-10);
    }
    
    .cta-decoration {
        display: none;
    }
}

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.about-content h2 {
    margin-bottom: var(--space-6);
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-decoration {
    width: 100%;
    max-width: 300px;
    animation: rotate 40s linear infinite reverse;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        order: -1;
    }
    
    .about-decoration {
        max-width: 200px;
    }
}

/* Mission Section */
.mission-card {
    background: linear-gradient(135deg, rgba(31, 209, 193, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(31, 209, 193, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.mission-card h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    margin-bottom: var(--space-6);
}

.mission-card p {
    color: var(--color-text-muted);
}

/* Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.value-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.value-number {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.1;
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
}

.value-card h3 {
    margin-bottom: var(--space-3);
    color: var(--color-accent);
}

.value-card p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    text-align: center;
}

.stat-item {
    padding: var(--space-8);
}

.stat-number {
    display: block;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-12);
}

.contact-info-centered {
    max-width: 500px;
    margin: 0 auto;
}

.contact-form-wrapper h2 {
    margin-bottom: var(--space-6);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
}

.required {
    color: var(--color-accent);
}

.form-group input,
.form-group textarea {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    font-size: var(--text-xs);
    color: var(--color-error);
    min-height: 1.2em;
}

/* Form Success */
.form-success {
    text-align: center;
    padding: var(--space-12) 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    color: var(--color-success);
}

.form-success h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.form-success p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

/* Contact Info */
.contact-info-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.contact-info-card h3 {
    margin-bottom: var(--space-3);
}

.contact-info-card > p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.contact-item {
    display: flex;
    gap: var(--space-4);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(31, 209, 193, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.contact-value {
    font-size: var(--text-sm);
    color: var(--color-text);
}

a.contact-value:hover {
    color: var(--color-accent);
}

.contact-cta {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
}

.office-hours {
    margin-top: var(--space-6);
}

.office-hours h4 {
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
    margin-bottom: var(--space-2);
}

.office-hours p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: -1;
    }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand .logo {
    margin-bottom: var(--space-3);
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
}

.footer-nav ul,
.footer-legal ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-nav a,
.footer-legal a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-legal a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
}

.age-notice {
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text);
}

/* Age Gate Modal */
.age-gate {
    background: var(--color-bg);
}

.age-gate-modal {
    text-align: center;
    max-width: 420px;
}

.age-gate-icon {
    width: 80px;
    height: 80px;
    background: rgba(31, 209, 193, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    color: var(--color-accent);
}

.age-gate-modal h2 {
    margin-bottom: var(--space-4);
}

.age-gate-modal > p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
}

.age-gate-form {
    text-align: left;
    margin-bottom: var(--space-6);
}

.age-gate-form label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
}

.dob-input {
    width: 100%;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text);
    font-size: var(--text-base);
}

.dob-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.dob-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.age-gate-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: var(--space-5) var(--space-6);
    z-index: 999;
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    flex: 1;
    min-width: 280px;
}

.cookie-actions {
    display: flex;
    gap: var(--space-3);
}

/* Cookie Preferences Modal */
.cookie-prefs-modal {
    max-width: 500px;
}

.cookie-prefs-modal h2 {
    margin-bottom: var(--space-2);
}

.cookie-prefs-modal > p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
}

.cookie-option-info h3 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.cookie-option-info p {
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: var(--color-text);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle input:checked + .toggle-slider {
    background: var(--color-accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cookie-prefs-actions {
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

/* Game Modal */
.game-modal {
    max-width: 600px;
    padding: 0;
    overflow: hidden;
}

.game-modal-image {
    height: 200px;
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-modal-image svg {
    width: 64px;
    height: 64px;
    color: var(--color-accent);
    opacity: 0.5;
}

.game-modal-content {
    padding: var(--space-8);
}

.game-modal-content h2 {
    margin-bottom: var(--space-4);
}

.game-modal-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.game-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* ========================================
   ANIMATIONS & REVEALS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========================================
   UTILITY CLASSES
   ======================================== */
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   LEGAL PAGES (Terms of Use, Privacy)
   ======================================== */
.legal-section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-24);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-intro {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

.legal-intro p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    line-height: 1.8;
}

.legal-intro p:last-child {
    margin-bottom: 0;
}

.legal-intro a {
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

.legal-intro a:hover {
    color: var(--color-accent-light);
}

.legal-article {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

.legal-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-article h2 {
    font-size: var(--text-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-6);
}

.legal-article h3 {
    font-size: var(--text-lg);
    color: var(--color-text);
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.legal-article p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    line-height: 1.8;
}

.legal-article p:last-child {
    margin-bottom: 0;
}

.legal-article a {
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

.legal-article a:hover {
    color: var(--color-accent-light);
}

.legal-list {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
    list-style: disc;
}

.legal-list li {
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    line-height: 1.8;
}

.legal-list li:last-child {
    margin-bottom: 0;
}

.legal-list li strong {
    color: var(--color-text);
}