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

:root {
    /* Color Palette (Warm Desert Luxury) */
    --bg-primary: #1E1A16;
    --bg-secondary: #2A241E;
    --surface-card: rgba(255, 245, 230, 0.05);
    
    --accent-primary: #E67E22;
    --accent-secondary: #F4A261;
    --accent-highlight: #E9C46A;
    --accent-deep: #8C5A2B;
    
    --text-primary: #F5EDE4;
    --text-secondary: #C2B8A3;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    --spacing-desktop: 100px;
    --spacing-tablet: 70px;
    --spacing-mobile: 50px;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 50px;
}

* {
    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;
    background-image: radial-gradient(circle at 50% 0%, rgba(230, 126, 34, 0.05) 0%, transparent 70%);
}

/* Light grain texture overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.02"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-desktop);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4);
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-highlight));
}

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

.btn-outline:hover {
    background: rgba(244, 162, 97, 0.1);
    box-shadow: 0 0 15px rgba(244, 162, 97, 0.2);
    transform: translateY(-2px);
}

/* Header */
header.market-navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(42, 36, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(233, 196, 106, 0.1);
}

header.market-navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.5;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-highlight);
    text-shadow: 0 0 10px rgba(233, 196, 106, 0.3);
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-primary);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-highlight);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--accent-highlight);
}

.nav-links a:hover {
    color: var(--accent-highlight);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--text-primary), var(--accent-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.story-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.disclaimer-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(230, 126, 34, 0.1);
    border: 1px solid rgba(230, 126, 34, 0.3);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.hero-visual img {
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.lamp-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(233,196,106,0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulseGlow 4s infinite alternate;
}

/* Game Section */
.game-container-wrapper {
    padding: 80px 0;
    text-align: center;
}

.game-header {
    margin-bottom: 40px;
}

.game-header h2 {
    font-size: 2.5rem;
    color: var(--accent-highlight);
}

.game-frame {
    max-width: 1300px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    position: relative;
    transition: transform 0.3s ease;
}

.game-frame::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), transparent, var(--accent-highlight));
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    opacity: 0.6;
    animation: borderGlow 6s linear infinite;
}

.game-frame:hover {
    transform: scale(1.01);
}

.game-frame iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: var(--radius-md);
    background: #000;
}

/* Cards & Grid Systems */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(244,162,97,0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(233,196,106,0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

/* Story/Genie Interaction */
.story-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

.genie-dialogue {
    background: rgba(30, 26, 22, 0.8);
    border-left: 4px solid var(--accent-highlight);
    padding: 40px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.genie-dialogue p {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--accent-secondary);
}

/* Page Layouts (Generic) */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--accent-highlight);
}

.content-section {
    padding: 80px 0;
}

.text-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-card);
    padding: 50px;
    border-radius: var(--radius-md);
}

.text-content h2 {
    color: var(--accent-primary);
    margin-top: 30px;
}

.text-content p, .text-content ul {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.text-content ul {
    padding-left: 20px;
}

/* Footer */
footer {
    background: #14110e;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--accent-highlight);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-legal {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(194, 184, 163, 0.5);
    font-size: 0.8rem;
}

/* Animations */
@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes borderGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(30deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .container { padding: 0 var(--spacing-tablet); }
    .hero-grid { gap: 30px; }
    .hero h1 { font-size: 3rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 var(--spacing-mobile); }
    .nav-links {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }
    
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero p.story-text { margin: 0 auto 30px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .grid-3 { grid-template-columns: 1fr; }
}