:root {
    --bg-primary: #1B1A1F;
    --bg-secondary: #24232A;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --accent-primary: #F97316;
    --accent-secondary: #FB923C;
    --accent-highlight: #A78BFA;
    --accent-support: #34D399;
    --text-primary: #F5F5F5;
    --text-secondary: #A1A1AA;
    --glass-border: rgba(249, 115, 22, 0.2);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

/* Global Background Effects */
.ambient-fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 100vh;
    background: url('images/fog-texture-seamless.webp') repeat-x;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: drift 60s linear infinite;
}

@keyframes drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50vw); }
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }

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

a:hover {
    color: var(--accent-primary);
}

/* Layout System */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 100px;
}

@media (max-width: 1024px) { .container { padding: 0 70px; } }
@media (max-width: 768px) { .container { padding: 0 50px; } }
@media (max-width: 480px) { .container { padding: 0 20px; } }

.section-spacing {
    padding: 100px 0;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(27, 26, 31, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

.logo img {
    width: 32px;
    height: 32px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-highlight));
    transition: width 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 18px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #111;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    color: #000;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--accent-highlight);
    transform: translateY(-2px);
}

/* Disclaimer Banner */
.disclaimer-banner {
    background: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--accent-support);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 80px);
}

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

.hero-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.hero-visual::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.05);
    animation: gentle-pulse 10s infinite alternate;
}

@keyframes gentle-pulse {
    0% { transform: scale(1.02); filter: brightness(0.9); }
    100% { transform: scale(1.05); filter: brightness(1.1); }
}

/* Game Wrapper */
.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 4rem auto;
}

.game-wrapper {
    width: 100%;
    max-width: 1300px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(249, 115, 22, 0.15);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-wrapper:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 50px rgba(249, 115, 22, 0.25);
}

.game-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Pumpkin Encounter UI */
.encounter-ui {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.encounter-ui::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(167, 139, 250, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.encounter-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dialogue-box {
    flex: 1;
}

.dialogue-text {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-highlight);
    padding-left: 1.5rem;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    background: var(--surface-hover);
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--surface);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid var(--surface);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Progress / Rewards */
.xp-bar-container {
    background: rgba(0,0,0,0.5);
    border-radius: 30px;
    height: 24px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--surface);
    margin: 2rem 0;
}

.xp-bar-fill {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-highlight));
    height: 100%;
    width: 65%;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.5);
}

/* Responsiveness */
@media (max-width: 992px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { order: -1; }
    .encounter-ui { flex-direction: column; text-align: center; }
    .dialogue-text { border-left: none; border-bottom: 4px solid var(--accent-highlight); padding-left: 0; padding-bottom: 1rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; /* In a real app, a hamburger menu would be here */ }
    h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .game-wrapper { border-radius: 12px; }
}