@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Nunito:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --mystic-purple: #8e44ad;
    --shadow-violet: #5b2c6f;
    --abyss: #0c0c14;
    --twilight: #1a1a2e;
    --moonlight: #eae6f0;
    --ethereal: #bb8fce;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--abyss);
    color: var(--moonlight);
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

a {
    color: var(--ethereal);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--mystic-purple);
}

/* Header */
.shadow-header {
    background: linear-gradient(180deg, var(--twilight) 0%, transparent 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
}

.header-row {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-sigil {
    width: 50px;
    height: 50px;
}

.brand-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--ethereal);
    font-style: italic;
}

/* Mobile Menu */
.shadow-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.shadow-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--ethereal);
    margin: 6px 0;
    transition: 0.3s;
}

.shadow-toggle.open span:first-child {
    transform: rotate(45deg) translate(5px, 6px);
}

.shadow-toggle.open span:nth-child(2) {
    opacity: 0;
}

.shadow-toggle.open span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

.shadow-nav {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.shadow-nav a {
    color: var(--moonlight);
    font-weight: 600;
    font-size: 0.95rem;
}

.shadow-nav a:hover {
    color: var(--ethereal);
}

/* Main */
.page-body {
    padding-top: 85px;
}

/* Mystic Banner */
.mystic-banner {
    padding: 6rem 2rem;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(142, 68, 173, 0.15) 0%, transparent 60%);
}

.mystic-banner h1 {
    font-size: 3.5rem;
    color: var(--ethereal);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.mystic-banner p {
    font-size: 1.1rem;
    max-width: 750px;
    margin: 0 auto;
}

/* Rune Cards */
.rune-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.rune-card {
    background: var(--twilight);
    border: 1px solid var(--shadow-violet);
    padding: 2.5rem 2rem;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    position: relative;
    overflow: hidden;
}

.rune-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--mystic-purple), transparent);
}

.rune-card .mark {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.rune-card h3 {
    color: var(--ethereal);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Chamber Game */
.chamber-section {
    padding: 4rem 2rem;
    background: var(--twilight);
}

.chamber-section h2 {
    text-align: center;
    color: var(--ethereal);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.game-chamber {
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
    border: 2px solid var(--mystic-purple);
    box-shadow: 0 0 50px rgba(142, 68, 173, 0.3);
}

.game-chamber iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Grimoire Layout */
.grimoire-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 1600px;
    margin: 2rem auto;
}

.grimoire-page {
    padding: 3rem;
    border: 1px solid rgba(142, 68, 173, 0.2);
}

.grimoire-page:nth-child(odd) {
    background: var(--twilight);
}

.grimoire-page h3 {
    color: var(--ethereal);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* Scroll Content */
.scroll-container {
    max-width: 950px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.scroll-content {
    background: var(--twilight);
    padding: 3.5rem;
    border: 1px solid var(--shadow-violet);
    position: relative;
}

.scroll-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--ethereal), var(--mystic-purple), var(--shadow-violet));
}

.scroll-content h1 {
    color: var(--ethereal);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.scroll-content h2 {
    color: var(--mystic-purple);
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    font-style: italic;
}

.scroll-content p {
    margin-bottom: 1.2rem;
}

.scroll-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.scroll-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.shadow-footer {
    background: var(--twilight);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 2px solid var(--shadow-violet);
}

.footer-heading {
    color: var(--ethereal);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.aid-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.aid-links a {
    color: var(--moonlight);
    padding: 0.7rem 1.8rem;
    border: 1px solid var(--shadow-violet);
    font-size: 0.9rem;
}

.aid-links a:hover {
    background: var(--mystic-purple);
    border-color: var(--mystic-purple);
}

.footer-whisper {
    color: rgba(234, 230, 240, 0.5);
    font-size: 0.85rem;
}

/* Age Veil */
.age-veil {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 20, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.age-tome {
    background: var(--twilight);
    border: 2px solid var(--mystic-purple);
    padding: 3.5rem;
    text-align: center;
    max-width: 480px;
    margin: 1rem;
    box-shadow: 0 0 80px rgba(142, 68, 173, 0.4);
}

.age-tome h2 {
    color: var(--ethereal);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.age-tome p {
    margin-bottom: 2rem;
}

.tome-choices {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.tome-choices button {
    padding: 1rem 2.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-enter {
    background: var(--mystic-purple);
    color: var(--moonlight);
}

.btn-enter:hover {
    background: var(--ethereal);
    color: var(--abyss);
}

.btn-retreat {
    background: transparent;
    color: var(--moonlight);
    border: 1px solid rgba(234, 230, 240, 0.3);
}

.btn-retreat:hover {
    border-color: var(--moonlight);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    .shadow-toggle {
        display: block;
    }

    .shadow-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--twilight);
        flex-direction: column;
        padding: 100px 2rem 2rem;
        gap: 0;
        transition: right 0.3s;
    }

    .shadow-nav.visible {
        right: 0;
    }

    .shadow-nav li {
        border-bottom: 1px solid rgba(142, 68, 173, 0.2);
    }

    .shadow-nav a {
        display: block;
        padding: 1.2rem 0;
    }

    .grimoire-grid {
        grid-template-columns: 1fr;
    }

    .mystic-banner h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .brand-title {
        font-size: 1.7rem;
    }

    .mystic-banner {
        padding: 4rem 1rem;
    }

    .scroll-content {
        padding: 2rem;
    }

    .age-tome {
        padding: 2.5rem;
    }

    .tome-choices {
        flex-direction: column;
    }
}
