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

:root {
    /* Color System */
    --bg-primary: #08070d;
    --bg-secondary: #171322;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Typography Colors */
    --text-primary: #faf5ff;
    --text-secondary: #ddd6fe;
    --text-muted: #a5b4fc;
    
    /* Gradients */
    --grad-purple: linear-gradient(135deg, #581c87, #c084fc);
    --grad-blue: linear-gradient(135deg, #1e3a8a, #38bdf8);
    --grad-gold: linear-gradient(135deg, #ca8a04, #fde68a);
    
    /* Glow Effects */
    --glow-purple: rgba(192, 132, 252, 0.4);
    --glow-blue: rgba(56, 189, 248, 0.35);
    --glow-gold: rgba(250, 204, 21, 0.4);
    
    /* Layout */
    --max-width: 1280px;
    --spacing-desktop: 120px;
    --spacing-tablet: 80px;
    --spacing-mobile: 60px;
    
    /* Typography Families */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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 Atmospheric Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(88, 28, 135, 0.15), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(30, 58, 138, 0.15), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

.section {
    padding: var(--spacing-mobile) 0;
}

@media (min-width: 768px) {
    .section { padding: var(--spacing-tablet) 0; }
}

@media (min-width: 1024px) {
    .section { padding: var(--spacing-desktop) 0; }
}

/* Glass & Premium Effects */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--grad-gold);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--glow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--glow-gold);
}

.btn-secondary {
    background: var(--grad-purple);
    color: #fff;
    box-shadow: 0 0 15px var(--glow-purple);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--glow-purple);
}

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

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Header - Arcane Command Bar */
.header-arcane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(8, 7, 13, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23fde68a'/%3E%3Cstop offset='100%25' stop-color='%23ca8a04'/%3E%3C/radialGradient%3E%3ClinearGradient id='o1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2338bdf8'/%3E%3Cstop offset='100%25' stop-color='%23c084fc'/%3E%3C/linearGradient%3E%3ClinearGradient id='o2' x1='100%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2338bdf8'/%3E%3Cstop offset='100%25' stop-color='%23818cf8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='4' fill='url(%23g)'/%3E%3Cellipse cx='12' cy='12' rx='9.5' ry='3.5' transform='rotate(45 12 12)' fill='none' stroke='url(%23o1)' stroke-width='2'/%3E%3Cellipse cx='12' cy='12' rx='9.5' ry='3.5' transform='rotate(-45 12 12)' fill='none' stroke='url(%23o2)' stroke-width='2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

/* Floating Side Navigation */
.nav-capsule {
    position: fixed;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
    border: 1px solid rgba(192, 132, 252, 0.3);
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.15);
    border-radius: 40px;
}

.nav-link {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow-gold);
    transform: rotate(180deg) scale(1.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--grad-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-gold);
}

@media (max-width: 1024px) {
    .nav-capsule {
        top: auto;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        padding: 1rem 2rem;
        border-radius: 40px;
        width: 90%;
        max-width: 400px;
        justify-content: space-between;
        background: rgba(8, 7, 13, 0.85);
    }
    .nav-link {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 0.75rem;
    }
    .nav-link:hover, .nav-link.active {
        transform: scale(1.08);
    }
    .nav-link.active::after {
        left: 50%;
        top: -10px;
        transform: translateX(-50%);
    }
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/books-magic-library-background.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(8,7,13,0.3) 0%, rgba(8,7,13,1) 100%);
    z-index: 2;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    animation: float 6s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

@media (max-width: 600px) {
    .hero-actions {
        flex-direction: column;
    }
}

.social-notice {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    display: inline-block;
}

/* Game Section */
.game-section {
    position: relative;
    z-index: 10;
    margin-top: -50px;
}

.game-showcase {
    padding: 2px; /* Border gradient effect */
    background: linear-gradient(135deg, rgba(192,132,252,0.5), rgba(250,204,21,0.5));
    border-radius: 26px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-showcase:hover {
    transform: scale(1.01);
    box-shadow: 0 0 40px rgba(192,132,252,0.3);
}

.game-inner {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-title-group h2 {
    margin-bottom: 0.2rem;
    font-size: 2rem;
}

.game-tags {
    display: flex;
    gap: 10px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(192, 132, 252, 0.1);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.2);
}

.game-frame-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

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

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('images/books-magic-magical-paper-texture.png');
    opacity: 0.03;
    pointer-events: none;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #c084fc;
    font-size: 1.5rem;
}

/* Asymmetrical Grid Setup */
.feature-card:nth-child(1) { grid-column: span 8; }
.feature-card:nth-child(2) { grid-column: span 4; }
.feature-card:nth-child(3) { grid-column: span 4; }
.feature-card:nth-child(4) { grid-column: span 4; }
.feature-card:nth-child(5) { grid-column: span 4; }
.feature-card:nth-child(6) { grid-column: span 12; }

@media (max-width: 900px) {
    .feature-card:nth-child(n) { grid-column: span 6; }
    .feature-card:nth-child(6) { grid-column: span 12; }
}

@media (max-width: 600px) {
    .feature-card:nth-child(n) { grid-column: span 12; }
}

/* Inner Pages Setup */
.page-header {
    padding-top: 150px;
    padding-bottom: 60px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(88, 28, 135, 0.1), transparent);
}

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

.content-box h2 {
    margin-top: 2rem;
    color: var(--text-primary);
}

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

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.form-control:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    background: #050409;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

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

.footer-links a:hover {
    color: #c084fc;
}

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

.footer-notice {
    margin-bottom: 1rem;
    color: #fca5a5;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 200; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 30px rgba(192,132,252,0.2);
}

.close-btn {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
}

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

/* Floating Particles (CSS only for effect) */
.particles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--glow-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow-gold);
    animation: floatUp 15s infinite linear;
    opacity: 0;
}

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