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

:root {
    /* Colors */
    --bg-base: #020202;
    --bg-secondary: #0f0c07;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 215, 120, 0.04);
    --glass-border: rgba(255, 215, 120, 0.12);
    --glass-blur: 18px;
    
    /* Gradients */
    --grad-gold: linear-gradient(135deg, #d4af37, #facc15);
    --grad-amber: linear-gradient(135deg, #c2410c, #f97316);
    --grad-sand: linear-gradient(135deg, #facc15, #fde68a);
    
    /* Glows */
    --glow-gold: rgba(250, 204, 21, 0.45);
    --glow-amber: rgba(249, 115, 22, 0.35);
    --glow-mystic: rgba(255, 215, 120, 0.25);
    
    /* Typography */
    --text-primary: #fefce8;
    --text-secondary: #e7e5e4;
    --text-muted: #a8a29e;
    
    --font-heading: 'Cinzel', serif;
    --font-ui: 'Inter', sans-serif;
    
    /* Layout */
    --container-max: 1280px;
    --space-desktop: 120px;
    --space-tablet: 80px;
    --space-mobile: 60px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

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

/* Global Background Elements */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 50% 0%, rgba(20, 15, 5, 0.8) 0%, var(--bg-base) 70%);
}

#sand-particles {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Custom Cursor */
.cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--glow-mystic) 0%, transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    transition: width 0.3s, height 0.3s;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.text-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.section-padding {
    padding-top: var(--space-desktop);
    padding-bottom: var(--space-desktop);
}

/* Main Layout Wrapper */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glass Surface (Luxury) */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,120,0.3), transparent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 18px;
    font-family: var(--font-ui);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-gold {
    background: var(--grad-gold);
    color: #000;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.btn-gold::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s ease;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-gold);
}

.btn-gold:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-3px);
}

/* Header / Top Nav */
.top-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(15, 12, 7, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.brand-logo svg {
    width: 32px; height: 32px;
    fill: url(#gold-grad);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.top-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--grad-gold);
    transition: width 0.3s ease;
}

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

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

.header-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 1001;
}

.mobile-menu-btn svg {
    transition: color 0.3s ease;
}
.mobile-menu-btn:hover svg {
    color: #facc15;
}

.mobile-only {
    display: none;
}

/* Cinematic Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -5%; left: -5%; width: 110%; height: 110%;
    background-image: url('images/photo-1600585154340-be6161a56a0c.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    animation: slowPan 30s ease-in-out infinite alternate;
}

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

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
    padding: 0 20px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    animation: fadeUp 1s ease 0.2s backwards;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    animation: fadeUp 1s ease 0.4s backwards;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeUp 1s ease 0.6s backwards;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeUp 1s ease 0.8s backwards;
}

/* Legal Banner Floating */
.legal-banner-floating {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 10;
}

/* Game Section (Book of Ra) */
.game-section {
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.game-showcase {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 10px;
    position: relative;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    transition: transform 0.5s ease;
}

.game-showcase:hover {
    transform: scale(1.02);
}

.game-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.8), rgba(212, 175, 55, 0.1) 50%, rgba(212, 175, 55, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 10px var(--glow-gold)); }
    50% { opacity: 1; filter: drop-shadow(0 0 25px var(--glow-gold)); }
}

.game-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.feature-icon {
    width: 80px; height: 80px;
    background: rgba(255, 215, 120, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px var(--glow-gold);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover .feature-icon::after {
    opacity: 1;
}

.feature-icon svg {
    width: 40px; height: 40px;
    fill: url(#gold-grad);
    transition: transform 0.4s;
}

.feature-card:hover .feature-icon svg {
    transform: scale(1.1) rotate(5deg);
}

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

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

/* Story Timeline (About Page) */
.story-timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.5), transparent);
    transform: translateX(-50%);
}

.story-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6rem;
    position: relative;
    width: 100%;
}

.story-node:nth-child(even) {
    flex-direction: row-reverse;
}

.story-content {
    width: 45%;
    padding: 2.5rem;
}

.story-img {
    width: 45%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
}

.story-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s ease;
}

.story-node:hover .story-img img {
    transform: scale(1.05);
}

.story-point {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px; height: 24px;
    background: var(--bg-base);
    border: 3px solid #d4af37;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--glow-gold);
    z-index: 2;
}

/* Generic Content Pages (Legal, Contact) */
.page-header {
    padding-top: 180px;
    padding-bottom: 60px;
    text-align: center;
    position: relative;
}

.content-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
}

.content-box h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #facc15;
}

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

.content-box ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

/* Form Styles */
.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-control {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem;
    background: linear-gradient(to top, rgba(15, 12, 7, 0.8), transparent);
    margin-top: auto;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

.disclaimer-box {
    text-align: center;
    max-width: 800px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.3);
}

.disclaimer-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.disclaimer-box .age-limit {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #facc15;
    font-weight: bold;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --space-desktop: var(--space-tablet);
    }
    
    .hero h1 { font-size: 3.5rem; }
    .story-node { flex-direction: column !important; text-align: center; gap: 2rem; margin-bottom: 4rem;}
    .story-timeline::before { left: 0; }
    .story-point { left: 0; }
    .story-content, .story-img { width: 100%; padding: 1rem 0 1rem 2rem; }
}

@media (max-width: 768px) {
    :root {
        --space-desktop: var(--space-mobile);
    }
    
    .top-header {
        padding: 0 1.5rem;
    }
    
    .desktop-only { display: none; }
    .mobile-only { display: inline-flex; margin-top: 1rem; width: fit-content; }
    .mobile-menu-btn { display: block; }
    
    .top-nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(15, 12, 7, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .top-nav.open {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .content-box {
        padding: 2rem 1.5rem;
    }
}