@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    /* Base Colors */
    --bg-primary: #080604;
    --bg-secondary: #1a1208;
    --bg-fantasy: #241507;
    
    /* Glass Surface */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --blur: 18px;

    /* Gradients */
    --grad-emerald: linear-gradient(135deg, #064e3b, #10b981);
    --grad-bronze: linear-gradient(135deg, #7c2d12, #c2410c);
    --grad-gold: linear-gradient(135deg, #f59e0b, #fde68a);
    --grad-crystal: linear-gradient(135deg, #0ea5e9, #67e8f9);

    /* Specific Borders */
    --nav-border-grad: linear-gradient(135deg, #facc15, #10b981, #b45309);
    --main-border-grad: linear-gradient(135deg, #f59e0b, #78350f, #10b981);

    /* Glow Effects */
    --glow-emerald: rgba(16, 185, 129, 0.45);
    --glow-gold: rgba(250, 204, 21, 0.45);
    --glow-fire: rgba(194, 65, 12, 0.35);
    --glow-crystal: rgba(14, 165, 233, 0.35);

    /* Typography */
    --text-primary: #fff7ed;
    --text-secondary: #fde68a;
    --text-muted: #d6d3d1;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --max-width: 1280px;
    --space-desktop: 120px;
    --space-tablet: 80px;
    --space-mobile: 60px;
    --nav-width: 80px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, var(--bg-fantasy), transparent 60%);
    pointer-events: none;
    z-index: -2;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ==========================================================================
   COMPLIANCE BANNER
   ========================================================================== */
.compliance-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #000;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 1rem;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.text-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.2);
}

.title-xl {
    font-size: clamp(3rem, 6vw, 5.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero .title-xl {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.main-wrapper {
    margin-left: calc(var(--nav-width) + 40px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

section {
    padding: var(--space-desktop) 0;
    position: relative;
}

/* ==========================================================================
   HEADER (STATIC DRAGON COMMAND BAR)
   ========================================================================== */
.top-bar {
    position: absolute;
    top: 36px; /* Offset for compliance banner */
    left: calc(var(--nav-width) + 40px);
    right: 0;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(8,6,4,0.9), transparent);
    backdrop-filter: blur(5px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.brand svg {
    width: 32px;
    height: 32px;
    fill: url(#gold-grad);
    filter: drop-shadow(0 0 8px var(--glow-gold));
}

/* ==========================================================================
   SIDE NAVIGATION
   ========================================================================== */
.side-nav {
    position: fixed;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    width: var(--nav-width);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: 40px;
    padding: 2rem 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    
    /* Required Nav Border System */
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                var(--nav-border-grad) border-box;
    border: 2px solid transparent;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.15), inset 0 0 20px rgba(16, 185, 129, 0.1);
}

.nav-item {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    transform: scale(1.15);
    background: rgba(255,255,255,0.08);
}

.nav-item:hover svg, .nav-item.active svg {
    fill: url(#gold-grad);
    filter: drop-shadow(0 0 8px var(--glow-gold));
}

.nav-tooltip {
    position: absolute;
    left: calc(100% + 15px);
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

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

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 18px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--grad-gold);
    color: #451a03; /* Deep brown/black for contrast */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 20px var(--glow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 30px var(--glow-gold);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.2);
}

/* ==========================================================================
   COMPONENTS (CARDS & SECTIONS)
   ========================================================================== */
/* Required Main Content Border System */
.realm-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    
    /* The Gold + Fire Bronze gradient border */
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
                var(--main-border-grad) border-box;
    border: 2px solid transparent;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,0,0,0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.realm-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 10l10-10H0l10 10zm0 0L0 20h20L10 10z' fill='%23ffffff' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.realm-card > * {
    position: relative;
    z-index: 1;
}

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

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-color: #000;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    mix-blend-mode: luminosity;
    font-size: 0.75rem;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--bg-primary) 0%, rgba(8,6,4,0.6) 50%, transparent 100%),
                linear-gradient(0deg, var(--bg-primary) 0%, transparent 40%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    animation: fadeUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* ==========================================================================
   GAME SECTION
   ========================================================================== */
.game-section {
    padding: var(--space-desktop) 0;
    text-align: center;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 24px;
    overflow: hidden;
    margin: 2rem 0;
    
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                var(--main-border-grad) border-box;
    border: 3px solid transparent;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), 0 0 80px rgba(16, 185, 129, 0.1);
}

/* Animated Border for Game */
.game-wrapper::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 26px;
    background: linear-gradient(45deg, #f59e0b, #10b981, #78350f, #f59e0b);
    background-size: 400% 400%;
    z-index: -1;
    animation: borderGradient 8s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-wrapper:hover::after {
    opacity: 1;
}

.game-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    background: #000;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==========================================================================
   FEATURES SECTION (ASYMMETRICAL GRID)
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 3rem 2rem;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), inset 0 0 40px rgba(245, 158, 11, 0.1);
}

.feature-card:nth-child(1) { grid-column: span 7; }
.feature-card:nth-child(2) { grid-column: span 5; }
.feature-card:nth-child(3) { grid-column: span 5; }
.feature-card:nth-child(4) { grid-column: span 7; }

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    fill: url(#emerald-grad);
    filter: drop-shadow(0 0 10px var(--glow-emerald));
}

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

/* ==========================================================================
   FOOTER & LEGAL
   ========================================================================== */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    background: linear-gradient(to top, #000, transparent);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.legal-notice {
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 12px;
    max-width: 800px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================== */
@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Embers System */
.embers {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.ember {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 10px #f59e0b, 0 0 20px #c2410c;
    animation: floatUp linear infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-100vh) translateX(50px) scale(0); opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-card:nth-child(n) { grid-column: span 1; }
    
    .top-bar {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .compliance-banner {
        font-size: 0.65rem;
        padding: 0.4rem;
        line-height: 1.4;
    }

    .top-bar {
        top: 50px; /* Adjust for multiline banner on mobile */
    }

    .main-wrapper {
        margin-left: 0;
        padding-bottom: 90px; /* Space for bottom nav */
    }
    
    .top-bar {
        left: 0;
        justify-content: center;
    }
    
    .brand span { display: none; }
    .top-bar .btn { display: none; }
    
    /* Convert Side Nav to Bottom App Nav */
    .side-nav {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        height: 70px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 1rem;
        border-radius: 20px;
    }
    
    .nav-tooltip { display: none; }
    
    .hero-content { text-align: center; }
    .hero-actions { justify-content: center; flex-direction: column; }
    
    section { padding: var(--space-mobile) 0; }
}