@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Colors */
    --bg-primary: #0A0A0C;
    --bg-secondary: #171311;
    --surface: rgba(255, 248, 235, 0.05);
    --gold: #C9A14A;
    --gold-hover: #DBC07A;
    --emerald: #2F7D68;
    --burgundy: #6A2C38;
    --text-primary: #F5F1E8;
    --text-secondary: #CFC6B8;
    --text-muted: #9E9488;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --radius: 16px;
    --nav-width: 100px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

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

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }

.editorial-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem auto;
    border: 1px solid rgba(201, 161, 74, 0.3);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #A88132 0%, #C9A14A 50%, #E6C875 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(201, 161, 74, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 161, 74, 0.4);
    background: linear-gradient(135deg, #C9A14A 0%, #DBC07A 50%, #F5E0A3 100%);
}

.btn-secondary {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 161, 74, 0.4);
    color: var(--gold);
}

.btn-secondary:hover {
    background: rgba(201, 161, 74, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 161, 74, 0.15);
}

/* Floating Navigation Frame */
.floating-nav {
    position: fixed;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 161, 74, 0.2);
    border-radius: 24px;
    padding: 2rem 1rem;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-variant: small-caps;
    letter-spacing: 1px;
    padding: 0.5rem;
    border-radius: 12px;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--gold);
    background: rgba(255, 248, 235, 0.03);
    transform: translateY(-2px);
}

.nav-item.active {
    background: rgba(201, 161, 74, 0.15);
    color: var(--text-primary);
    border: 1px solid rgba(201, 161, 74, 0.4);
    box-shadow: 0 0 15px rgba(201, 161, 74, 0.1);
}

.nav-item.active svg {
    fill: var(--gold);
}

/* Main Layout Offset */
.page-wrapper {
    margin-left: calc(2rem + var(--nav-width) + 2rem);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem 4rem;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

.site-header > * {
    pointer-events: auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-right: auto;
    padding-left: 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 4rem;
    background: url('images/glowing-magical-book-library-hero.jpg') center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0.7) 50%, rgba(10, 10, 12, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

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

/* Game Section */
.game-section {
    padding: 120px 4rem;
    background: var(--bg-secondary);
    position: relative;
}

.game-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 161, 74, 0.3), transparent);
}

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

.section-header h2 {
    font-size: 3rem;
    color: var(--gold);
}

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

.game-container {
    background: var(--surface);
    border: 1px solid rgba(201, 161, 74, 0.3);
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    max-width: 1100px;
    margin: 0 auto;
    transition: var(--transition);
}

.game-container:hover {
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    border-color: rgba(201, 161, 74, 0.5);
}

.iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Features Section */
.features-section {
    padding: 120px 4rem;
    background: var(--bg-primary);
}

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

.feature-card {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(23, 19, 17, 0.5) 100%);
    border: 1px solid rgba(201, 161, 74, 0.15);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--burgundy);
    opacity: 0.5;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 161, 74, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

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

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

/* Editorial Pages (About, Contact, Legal) */
.editorial-section {
    padding: 160px 4rem 100px;
    max-width: 900px;
    margin: 0 auto;
}

.editorial-section h1 {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-align: center;
}

.editorial-content {
    background: var(--surface);
    border: 1px solid rgba(201, 161, 74, 0.2);
    border-radius: 24px;
    padding: 4rem;
    backdrop-filter: blur(12px);
}

.editorial-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.editorial-content h2, .editorial-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 1.1rem;
}

.form-group input, .form-group textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(201, 161, 74, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(0,0,0,0.5);
}

/* Footer */
.site-footer {
    background: #050506;
    padding: 4rem 4rem 2rem;
    border-top: 1px solid rgba(201, 161, 74, 0.1);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 800px;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .editorial-section { padding: 120px 2rem 80px; }
    .editorial-content { padding: 2rem; }
}

@media (max-width: 768px) {
    /* Transform floating nav to bottom bar */
    .floating-nav {
        top: auto;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        padding: 0.75rem 1rem;
        width: 90%;
        max-width: 400px;
        justify-content: space-between;
        border-radius: 20px;
    }
    
    .nav-item span {
        display: none; /* Hide text on mobile for space */
    }
    
    .page-wrapper {
        margin-left: 0;
        padding-bottom: 100px; /* Space for bottom nav */
    }
    
    .site-header {
        padding: 1rem 2rem;
        justify-content: center;
        background: rgba(10, 10, 12, 0.9);
        backdrop-filter: blur(10px);
        position: fixed;
    }
    
    .logo {
        padding-left: 0;
        margin: 0 auto;
    }
    
    .header-btn {
        display: none; /* Hide header btn on mobile to save space */
    }
    
    .hero {
        padding: 120px 2rem 4rem;
        text-align: center;
    }
    
    .hero h1 { font-size: 2.5rem; }
    .hero p { margin: 0 auto 2rem; }
    .hero-actions { justify-content: center; flex-direction: column; }
    
    .game-section, .features-section { padding: 60px 1.5rem; }
    .section-header h2 { font-size: 2rem; }
    
    .footer-content { padding: 0 1rem; }
}

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

.fade-in {
    animation: fadeIn 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}