:root {
    /* Colors */
    --bg-primary: #0b0f1a;
    --bg-secondary: #131a2a;
    --card-bg: rgba(255, 255, 255, 0.05);
    
    /* Accent Colors */
    --electric-blue: #3b82f6;
    --neon-purple: #8b5cf6;
    --candy-pink: #ec4899;
    --gold-highlight: #facc15;
    --aqua-glow: #22d3ee;
    
    /* Typography */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5f5;
    --font-main: 'Outfit', system-ui, -apple-system, sans-serif;
    
    /* Layout */
    --sidebar-width: 100px;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Image with Animation */
body::before {
    content: '';
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('images/photo-1550684848-fac1c5b4e853.png'); /* neon-abstract-background.jpg */
    background-size: cover;
    background-position: center;
    z-index: -2;
    animation: bgPan 30s infinite alternate ease-in-out;
    filter: brightness(0.25) saturate(1.2);
    pointer-events: none;
}

/* Gradient Overlay over the animated background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(11, 15, 26, 0.7), rgba(19, 26, 42, 0.95));
    z-index: -1;
    pointer-events: none;
}

@keyframes bgPan {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.05) translate(-2%, -1%); }
}

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

ul {
    list-style: none;
}

/* ==========================================================================
   SIDE NAVIGATION & 3D ICON SYSTEM
   ========================================================================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

/* Background layer */
.top-nav-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 26, 42, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset -5px 0 20px rgba(139, 92, 246, 0.1), 10px 0 30px rgba(0,0,0,0.5);
    z-index: 1;
}

.nav-links {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    align-items: center;
}

.nav-item {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s, box-shadow 0.3s;
    animation: floatIcon 4s ease-in-out infinite alternate;
}

/* Stagger animations */
.nav-item:nth-child(1) { animation-delay: 0s; }
.nav-item:nth-child(2) { animation-delay: 0.5s; }
.nav-item:nth-child(3) { animation-delay: 1s; }
.nav-item:nth-child(4) { animation-delay: 1.5s; }

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
    transition: fill 0.3s, filter 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.nav-item:hover {
    transform: translateZ(25px) rotateY(15deg) scale(1.1);
    border-color: var(--aqua-glow);
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.5), 
        0 0 20px rgba(34, 211, 238, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.5);
    animation-play-state: paused;
}

.nav-item:hover svg {
    fill: var(--text-primary);
    filter: drop-shadow(0 0 8px var(--aqua-glow));
}

/* Tooltips */
.tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateX(-10px) translateY(-50%);
    background: rgba(19, 26, 42, 0.9);
    border: 1px solid var(--neon-purple);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(5px);
}

.nav-item:hover .tooltip {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-purple), var(--candy-pink));
    background-size: 200% auto;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4), inset 0 2px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--candy-pink), var(--neon-purple), var(--electric-blue));
    background-size: 200% auto;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.5), inset 0 2px 0 rgba(255,255,255,0.4);
}

.btn-primary:hover::before {
    opacity: 1;
    animation: gradientShift 2s linear infinite;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero-bg-elements {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.hero-orb-1 {
    width: 400px; height: 400px;
    background: var(--neon-purple);
    top: -100px; right: -100px;
    animation: orbFloat 10s ease-in-out infinite alternate;
}

.hero-orb-2 {
    width: 300px; height: 300px;
    background: var(--electric-blue);
    bottom: -50px; left: 10%;
    animation: orbFloat 12s ease-in-out infinite alternate-reverse;
}

/* Glossy Glass Box */
.hero-glass-box {
    position: relative;
    z-index: 10;
    max-width: 700px;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3.5rem;
    text-align: center;
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 0 20px rgba(139, 92, 246, 0.1);
    animation: floatBox 6s ease-in-out infinite alternate;
    overflow: hidden;
}

/* Reflection sweep */
.hero-glass-box::after {
    content: '';
    position: absolute;
    top: 0; left: -150%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: sweep 8s infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
    line-height: 1.1;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Legal Box inside Hero */
.hero-legal-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 0 15px rgba(236, 72, 153, 0.1);
}

.hero-legal-box p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-legal-box .age-badge {
    background: var(--candy-pink);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
}

/* ==========================================================================
   GAME SECTION
   ========================================================================== */
.game-section {
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 5;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.game-container {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    background: #000;
    position: relative;
    padding: 4px; /* Space for border gradient */
    border-radius: 24px;
    background: linear-gradient(45deg, var(--electric-blue), var(--neon-purple), var(--candy-pink));
    animation: borderFlicker 3s infinite alternate;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(139, 92, 246, 0.3);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    background: var(--bg-secondary); /* Loading state bg */
    display: block;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.features-section {
    padding: 5rem 2rem;
    background: linear-gradient(to bottom, transparent, rgba(19, 26, 42, 0.8), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--electric-blue), var(--neon-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   STANDARD PAGES (About, Contact, Legal)
   ========================================================================== */
.page-header {
    padding: 6rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.1), transparent);
}

.page-title {
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.content-container {
    max-width: 900px;
    margin: 0 auto 5rem;
    padding: 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.content-container h2 {
    color: var(--aqua-glow);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.content-container h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}

.content-container p, .content-container ul {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.content-container ul {
    padding-left: 1.5rem;
}

.content-container li {
    margin-bottom: 0.5rem;
}

/* Contact specific */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.contact-item svg {
    width: 40px; height: 40px;
    fill: var(--candy-pink);
    margin-bottom: 1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: rgba(19, 26, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: -5px;
    width: 50%; height: 2px;
    background: var(--neon-purple);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--aqua-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.disclaimer {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.4);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes floatIcon {
    0% { transform: translateY(0) translateZ(20px); }
    100% { transform: translateY(-8px) translateZ(20px); }
}

@keyframes floatBox {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

@keyframes sweep {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

@keyframes borderFlicker {
    0% { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(30deg) brightness(1.2); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .game-container {
        width: 90%;
    }
    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation -> Bottom App Bar */
    .top-nav {
        width: 100%;
        height: 70px;
        flex-direction: row;
        top: auto;
        bottom: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        background: rgba(11, 15, 26, 0.95);
        backdrop-filter: blur(20px);
    }
    
    .top-nav-bg {
        display: none; 
    }

    .nav-links {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 45px;
        height: 45px;
        transform-style: flat;
        animation: none;
        box-shadow: none;
        background: transparent;
        border: none;
    }

    .nav-item:hover {
        transform: translateY(-5px);
        box-shadow: none;
    }

    .tooltip {
        display: none; 
    }

    .main-content {
        margin-left: 0;
        margin-top: 0;
        margin-bottom: 70px;
    }

    .hero {
        padding: 2rem 1rem;
        min-height: calc(100vh - 70px);
    }

    .hero-glass-box {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .game-container {
        width: 100%;
        border-radius: 12px;
    }
    
    .game-container iframe {
        border-radius: 8px;
    }

    .content-container {
        padding: 1.5rem;
        margin: 0 1rem 3rem;
    }
}