@import url('https://fonts.googleapis.com/css2?family=Uncial+Antiqua&family=Philosopher:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --arcane-blue: #4a69bd;
    --mystic-purple: #6c5ce7;
    --enchant-gold: #f39c12;
    --spell-silver: #dfe6e9;
    --void-dark: #0c0c14;
    --shadow: #1a1a2e;
    --dim-rune: #636e72;
}

body {
    font-family: 'Philosopher', sans-serif;
    background: var(--void-dark);
    color: var(--spell-silver);
    min-height: 100vh;
    line-height: 1.75;
}

.mystic-backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 25%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(74, 105, 189, 0.12) 0%, transparent 50%),
        var(--void-dark);
    z-index: -1;
}

header {
    background: rgba(12, 12, 20, 0.95);
    border-bottom: 2px solid var(--mystic-purple);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.spell-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tome-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.tome-sigil {
    width: 52px;
    height: 52px;
}

.tome-name {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.7rem;
    color: var(--mystic-purple);
    letter-spacing: 2px;
}

.rune-toggle {
    display: none;
    background: none;
    border: 2px solid var(--mystic-purple);
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
}

.rune-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--mystic-purple);
    margin: 5px 0;
}

.arcane-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.arcane-nav a {
    color: var(--dim-rune);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.3s;
}

.arcane-nav a:hover {
    color: var(--enchant-gold);
}

.scroll-area {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.enchant-hero {
    text-align: center;
    padding: 6rem 1rem;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

.enchant-hero h1 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    color: var(--mystic-purple);
    margin-bottom: 1.5rem;
}

.enchant-hero .spell-text {
    font-size: 1.2rem;
    color: var(--dim-rune);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.cast-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--mystic-purple), var(--arcane-blue));
    color: var(--void-dark);
    padding: 1rem 3rem;
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cast-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.rune-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.rune-card {
    background: var(--shadow);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(108, 92, 231, 0.2);
    transition: border-color 0.3s;
}

.rune-card:hover {
    border-color: var(--mystic-purple);
}

.rune-card .glyph {
    font-size: 3rem;
    margin-bottom: 1.2rem;
}

.rune-card h3 {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--enchant-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.rune-card p {
    color: var(--dim-rune);
}

.sanctum-area {
    background: var(--shadow);
    border-radius: 20px;
    padding: 2.5rem;
    margin: 4rem 0;
    border: 2px solid var(--mystic-purple);
}

.sanctum-area h2 {
    font-family: 'Uncial Antiqua', cursive;
    text-align: center;
    color: var(--enchant-gold);
    margin-bottom: 2rem;
    font-size: 1.6rem;
}

.sanctum-glass {
    width: 100%;
    height: 580px;
    border: none;
    border-radius: 12px;
    background: #000;
}

.power-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.power-item {
    background: rgba(26, 26, 46, 0.8);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--mystic-purple);
}

.power-item .power-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.power-item h3 {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--enchant-gold);
    margin-bottom: 1rem;
}

.power-item p {
    color: var(--dim-rune);
}

.lore-section {
    background: linear-gradient(145deg, var(--shadow), rgba(74, 105, 189, 0.1));
    border-radius: 16px;
    padding: 3.5rem;
    margin: 4rem 0;
}

.lore-section h2 {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--mystic-purple);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.lore-section p {
    color: var(--dim-rune);
    margin-bottom: 1.2rem;
}

.page-title {
    text-align: center;
    padding: 4rem 1rem;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    margin-bottom: 3rem;
}

.page-title h1 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 2.4rem;
    color: var(--mystic-purple);
}

.grimoire-section {
    background: rgba(26, 26, 46, 0.6);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--enchant-gold);
}

.grimoire-section h2 {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--enchant-gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.grimoire-section p {
    color: var(--dim-rune);
    margin-bottom: 1rem;
}

.grimoire-section ul {
    color: var(--dim-rune);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.grimoire-section li {
    margin-bottom: 0.5rem;
}

footer {
    background: var(--shadow);
    border-top: 2px solid var(--mystic-purple);
    padding: 3.5rem 2rem;
    margin-top: 5rem;
}

.foot-area {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.foot-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.foot-nav a {
    color: var(--dim-rune);
    text-decoration: none;
    font-weight: 700;
}

.foot-nav a:hover {
    color: var(--enchant-gold);
}

.aid-section {
    padding: 2rem 0;
    border-top: 1px solid rgba(108, 92, 231, 0.2);
    margin-top: 2rem;
}

.aid-section p {
    color: var(--dim-rune);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.aid-section a {
    color: var(--mystic-purple);
    text-decoration: none;
    margin: 0 1rem;
}

.aid-section a:hover {
    color: var(--enchant-gold);
}

.seal-text {
    color: var(--dim-rune);
    font-size: 0.85rem;
    margin-top: 2rem;
}

.ward-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 20, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ward-box {
    background: var(--shadow);
    border: 2px solid var(--mystic-purple);
    padding: 3.5rem;
    max-width: 520px;
    text-align: center;
    border-radius: 16px;
    margin: 1rem;
}

.ward-box h2 {
    font-family: 'Uncial Antiqua', cursive;
    color: var(--mystic-purple);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.ward-box p {
    color: var(--dim-rune);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.ward-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.ward-btns button {
    font-family: 'Uncial Antiqua', cursive;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.enter-ward {
    background: linear-gradient(135deg, var(--mystic-purple), var(--arcane-blue));
    border: none;
    color: var(--void-dark);
}

.enter-ward:hover {
    transform: scale(1.05);
}

.leave-ward {
    background: transparent;
    border: 2px solid var(--enchant-gold);
    color: var(--enchant-gold);
}

.leave-ward:hover {
    background: var(--enchant-gold);
    color: var(--void-dark);
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .rune-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rune-toggle {
        display: block;
    }
    
    .arcane-nav ul {
        position: fixed;
        top: 78px;
        left: 0;
        right: 0;
        background: rgba(12, 12, 20, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-200%);
        transition: transform 0.3s;
        border-bottom: 2px solid var(--mystic-purple);
    }
    
    .arcane-nav ul.unlocked {
        transform: translateY(0);
    }
    
    .arcane-nav a {
        display: block;
        padding: 0.8rem 0;
        text-align: center;
    }
    
    .sanctum-glass {
        height: 400px;
    }
    
    .spell-header {
        padding: 1rem;
    }
    
    .scroll-area {
        padding: 1rem;
    }
}
