@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Philosopher:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-purple: #4C1D95;
    --dark-red: #7F1D1D;
    --mystic-purple: #8B5CF6;
    --gold: #F59E0B;
    --dark-bg: #0F0A1E;
    --card-bg: #1A1232;
    --text-light: #E9D5FF;
    --border-glow: #A78BFA;
}

body {
    font-family: 'Philosopher', sans-serif;
    background: radial-gradient(ellipse at top, #1E1B4B, var(--dark-bg));
    background-attachment: fixed;
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header with Grid Layout */
.mystical-header {
    background: linear-gradient(180deg, rgba(26, 18, 50, 0.95), rgba(15, 10, 30, 0.9));
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--mystic-purple);
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 2rem;
}

.header-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

.brand {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--mystic-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.nav-links a::before {
    content: '✦';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--gold);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
    left: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
    border-color: var(--mystic-purple);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.mystical-symbol {
    font-size: 2rem;
    color: var(--gold);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mobile Menu Toggle */
.menu-btn {
    display: none;
    background: var(--deep-purple);
    border: 2px solid var(--mystic-purple);
    color: var(--gold);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* Page Title Section */
.title-shrine {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.3), rgba(127, 29, 29, 0.3));
    border: 2px solid var(--border-glow);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(167, 139, 250, 0.2);
    position: relative;
}

.title-shrine::before,
.title-shrine::after {
    content: '✧';
    position: absolute;
    top: 1rem;
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.6;
}

.title-shrine::before {
    left: 2rem;
}

.title-shrine::after {
    right: 2rem;
}

.title-shrine h1 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--mystic-purple), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.title-shrine p {
    font-size: 1.4rem;
    color: var(--text-light);
    font-style: italic;
}

/* Content Grimoire (Card) */
.grimoire-page {
    background: linear-gradient(135deg, rgba(26, 18, 50, 0.8), rgba(15, 10, 30, 0.9));
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-glow);
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 50px rgba(139, 92, 246, 0.2);
    position: relative;
}

.grimoire-page::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--mystic-purple), var(--gold), var(--mystic-purple));
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.grimoire-page:hover::before {
    opacity: 0.3;
}

.grimoire-page h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--mystic-purple);
    padding-bottom: 1rem;
}

.grimoire-page h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--mystic-purple);
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.grimoire-page p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.grimoire-page ul {
    list-style: none;
    padding: 0;
}

.grimoire-page ul li {
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    position: relative;
}

.grimoire-page ul li::before {
    content: '◆';
    position: absolute;
    left: 1rem;
    color: var(--gold);
    font-size: 1.2rem;
}

/* Warning Seal */
.warning-seal {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(76, 29, 149, 0.3));
    border: 3px solid var(--dark-red);
    border-radius: 15px;
    padding: 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 0 30px rgba(127, 29, 29, 0.4);
}

.warning-seal h3 {
    font-family: 'Cinzel', serif;
    color: #FCA5A5;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.warning-seal p {
    color: #FDE68A;
    font-weight: 600;
    line-height: 1.8;
}

/* Game Portal */
.game-portal {
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.2), transparent);
    border: 3px solid var(--mystic-purple);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2.5rem 0;
    text-align: center;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
}

.game-portal iframe {
    border: 2px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.3);
}

/* Footer */
.mystical-footer {
    background: linear-gradient(180deg, rgba(15, 10, 30, 0.9), rgba(26, 18, 50, 0.95));
    border-top: 2px solid var(--mystic-purple);
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 -10px 30px rgba(139, 92, 246, 0.2);
}

.mystical-footer h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.resource-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.resource-links a {
    color: var(--mystic-purple);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--mystic-purple);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.resource-links a:hover {
    background: var(--mystic-purple);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.footer-text {
    color: var(--text-light);
    opacity: 0.8;
    margin-top: 2rem;
    font-size: 1rem;
}

/* Age Gate Modal */
.age-gate {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.age-gate.visible {
    display: flex;
}

.gate-content {
    background: linear-gradient(135deg, var(--card-bg), var(--deep-purple));
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 3rem;
    max-width: 550px;
    text-align: center;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.4);
}

.gate-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.gate-symbol {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.gate-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.7;
}

.gate-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.gate-btn {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 1rem 3rem;
    border: 2px solid var(--mystic-purple);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gate-enter {
    background: linear-gradient(135deg, var(--mystic-purple), var(--deep-purple));
    color: white;
}

.gate-enter:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.gate-leave {
    background: rgba(127, 29, 29, 0.5);
    color: #FCA5A5;
}

.gate-leave:hover {
    background: var(--dark-red);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-grid {
        grid-template-columns: auto auto;
        gap: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(26, 18, 50, 0.98);
        gap: 0;
        padding: 1rem 0;
        border-top: 2px solid var(--mystic-purple);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 2rem;
        border-radius: 0;
    }

    .menu-btn {
        display: block;
    }

    .mystical-symbol {
        display: none;
    }

    .brand {
        font-size: 1.8rem;
    }

    .title-shrine h1 {
        font-size: 2.5rem;
    }

    .title-shrine p {
        font-size: 1.1rem;
    }

    .grimoire-page {
        padding: 2rem 1.5rem;
    }

    .grimoire-page h2 {
        font-size: 2rem;
    }

    .gate-content {
        margin: 1rem;
        padding: 2rem;
    }

    .gate-content h2 {
        font-size: 2rem;
    }

    .gate-buttons {
        flex-direction: column;
    }

    .gate-btn {
        width: 100%;
    }

    .resource-links {
        flex-direction: column;
        gap: 1rem;
    }
}
