* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --magic-purple: #4a148c;
    --magic-blue: #1a237e;
    --magic-gold: #ffd700;
    --magic-silver: #c0c0c0;
    --enchanted-pink: #ff6ec7;
    --mystical-cyan: #00e5ff;
    --dark-void: #0a0015;
    --parchment: #f4e8d0;
    --glow-gold: rgba(255, 215, 0, 0.6);
    --glow-purple: rgba(138, 43, 226, 0.5);
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: var(--dark-void);
    color: #fff;
    overflow: hidden;
    position: relative;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
}

.hidden {
    display: none !important;
}

/* ========================================
   MAGICAL COSMIC BACKGROUND
========================================= */
.mystical-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(74, 20, 140, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(26, 35, 126, 0.3) 0%, transparent 50%),
        radial-gradient(circle at center, rgba(138, 43, 226, 0.1) 0%, transparent 70%),
        linear-gradient(135deg, 
            #0a0015 0%, 
            #1a0033 25%,
            #0d001a 50%,
            #1a0033 75%,
            #0a0015 100%);
    z-index: 1;
    animation: cosmicShift 30s ease-in-out infinite alternate;
}

@keyframes cosmicShift {
    0% { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(20deg) brightness(1.1); }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 110, 199, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 60%);
    animation: auraShift 15s ease-in-out infinite;
}

@keyframes auraShift {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced Floating Magic Particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, rgba(255, 215, 0, 0.8) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(138, 43, 226, 0.6) 1px, transparent 1px),
        radial-gradient(circle, rgba(0, 229, 255, 0.7) 2px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px);
    background-size: 
        250px 250px,
        350px 350px,
        180px 180px,
        420px 420px;
    background-position: 0 0, 50px 60px, 130px 270px, 250px 50px;
    opacity: 0.6;
}

.floating-particles::before {
    animation: magicFloat 40s linear infinite;
}

.floating-particles::after {
    animation: magicFloat 50s linear infinite reverse;
    background-size: 
        300px 300px,
        400px 400px,
        220px 220px,
        380px 380px;
}

@keyframes magicFloat {
    0% { 
        transform: translateY(0) translateX(0) rotate(0deg); 
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% { 
        transform: translateY(-1200px) translateX(200px) rotate(360deg); 
        opacity: 0.6;
    }
}

/* ========================================
   LOADING SCREEN - ENCHANTED GRIMOIRE
========================================= */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, rgba(74, 20, 140, 0.3) 0%, transparent 60%),
        linear-gradient(135deg, 
            rgba(10, 0, 21, 0.98) 0%, 
            rgba(26, 0, 51, 0.98) 50%,
            rgba(13, 0, 26, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(15px);
    animation: portalOpen 1s ease-out;
}

@keyframes portalOpen {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(15px);
    }
}

/* Floating Enchanted Book */
.book-loader {
    position: relative;
    width: clamp(140px, 28vw, 200px);
    height: clamp(100px, 20vw, 140px);
    margin-bottom: clamp(40px, 8vw, 60px);
    perspective: 1500px;
    animation: bookFloatMain 4s ease-in-out infinite;
}

@keyframes bookFloatMain {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 15px 30px rgba(138, 43, 226, 0.6));
    }
    50% { 
        transform: translateY(-25px) rotate(3deg);
        filter: drop-shadow(0 30px 60px rgba(255, 215, 0, 0.8));
    }
}

.book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: bookRotate 8s ease-in-out infinite;
}

@keyframes bookRotate {
    0%, 100% { 
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% { 
        transform: rotateY(-8deg) rotateX(5deg);
    }
    50% { 
        transform: rotateY(0deg) rotateX(0deg);
    }
    75% { 
        transform: rotateY(8deg) rotateX(-5deg);
    }
}

/* Glowing Magical Cover */
.book::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, 
            var(--magic-purple) 0%, 
            var(--magic-blue) 30%,
            var(--magic-purple) 60%,
            #6a1b9a 100%);
    border: 3px solid var(--magic-gold);
    border-radius: 0 12px 12px 0;
    box-shadow: 
        0 0 40px var(--glow-purple),
        0 0 80px rgba(138, 43, 226, 0.4),
        inset 0 0 40px rgba(255, 215, 0, 0.2),
        inset -5px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1;
    animation: coverGlow 3s ease-in-out infinite;
}

@keyframes coverGlow {
    0%, 100% { 
        box-shadow: 
            0 0 40px var(--glow-purple),
            0 0 80px rgba(138, 43, 226, 0.4),
            inset 0 0 40px rgba(255, 215, 0, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 60px var(--glow-gold),
            0 0 120px rgba(255, 215, 0, 0.6),
            inset 0 0 60px rgba(138, 43, 226, 0.3);
    }
}

/* Magical Rune on Cover */
.book::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(35px, 7vw, 50px);
    color: var(--magic-gold);
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 1),
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6);
    z-index: 2;
    animation: runeRotate 6s linear infinite;
}

@keyframes runeRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enchanted Pages */
.book-page {
    position: absolute;
    width: 48%;
    height: 95%;
    top: 2.5%;
    right: 3%;
    background: 
        linear-gradient(to right, 
            rgba(244, 232, 208, 0.95), 
            rgba(255, 250, 240, 1));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-left: none;
    border-radius: 0 8px 8px 0;
    transform-origin: left center;
    box-shadow: 
        -4px 0 15px rgba(138, 43, 226, 0.3),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    animation: pageGlow 3s ease-in-out infinite;
}

@keyframes pageGlow {
    0%, 100% { 
        box-shadow: 
            -4px 0 15px rgba(138, 43, 226, 0.3),
            inset 0 0 30px rgba(255, 215, 0, 0.1);
    }
    50% { 
        box-shadow: 
            -4px 0 25px rgba(255, 215, 0, 0.5),
            inset 0 0 40px rgba(138, 43, 226, 0.2);
    }
}

/* Magical Script on Pages */
.book-page::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 10%;
    width: 80%;
    height: 76%;
    background: 
        repeating-linear-gradient(
            transparent,
            transparent 11px,
            rgba(138, 43, 226, 0.15) 11px,
            rgba(138, 43, 226, 0.15) 12px
        );
    opacity: 0.7;
}

.book-page:nth-child(1) {
    animation: pageFlipMagic 5s ease-in-out infinite;
    z-index: 3;
}

.book-page:nth-child(2) {
    animation: pageFlipMagic 5s ease-in-out infinite 0.7s;
    z-index: 2;
}

.book-page:nth-child(3) {
    animation: pageFlipMagic 5s ease-in-out infinite 1.4s;
    z-index: 1;
}

@keyframes pageFlipMagic {
    0%, 25%, 100% { 
        transform: rotateY(0deg); 
        opacity: 1; 
    }
    60%, 90% { 
        transform: rotateY(-175deg); 
        opacity: 0.8; 
    }
}

/* Magical Aura */
.golden-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(280px, 55vw, 450px);
    height: clamp(280px, 55vw, 450px);
    background: 
        radial-gradient(circle, 
            rgba(255, 215, 0, 0.6) 0%, 
            rgba(138, 43, 226, 0.4) 30%,
            rgba(0, 229, 255, 0.3) 50%,
            transparent 70%);
    animation: auraPulse 4s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes auraPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 0.7; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.4) rotate(180deg); 
        opacity: 1; 
    }
}

/* Loading Text - Enchanted */
.loading-text {
    color: var(--magic-gold);
    font-size: clamp(18px, 4.5vw, 32px);
    font-weight: 700;
    letter-spacing: clamp(2px, 0.5vw, 5px);
    text-transform: uppercase;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 1),
        0 0 40px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(138, 43, 226, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.9);
    margin-bottom: clamp(25px, 5vw, 35px);
    font-family: 'Cinzel', serif;
    text-align: center;
    padding: 0 20px;
    animation: textSparkle 3s ease-in-out infinite;
}

@keyframes textSparkle {
    0%, 100% { 
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(138, 43, 226, 0.6);
        transform: scale(1);
    }
    50% { 
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 215, 0, 1),
            0 0 90px rgba(138, 43, 226, 0.8),
            0 0 120px rgba(0, 229, 255, 0.5);
        transform: scale(1.03);
    }
}

/* Magical Symbols (instead of stamps) */
.progress-runes {
    display: flex;
    gap: clamp(25px, 6vw, 40px);
    margin-top: clamp(20px, 4vw, 30px);
}

.rune {
    font-size: clamp(38px, 9vw, 56px);
    animation: runeOrbit 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.9));
    position: relative;
}

.rune::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(30px, 7vw, 45px);
    height: 3px;
    background: 
        linear-gradient(90deg, 
            transparent, 
            rgba(255, 215, 0, 0.8) 20%,
            rgba(138, 43, 226, 0.8) 50%,
            rgba(0, 229, 255, 0.8) 80%,
            transparent);
    animation: runeTrail 3s ease-in-out infinite;
}

.rune:nth-child(1) { 
    animation-delay: 0s;
    color: var(--magic-gold);
}
.rune:nth-child(1)::after { animation-delay: 0s; }

.rune:nth-child(2) { 
    animation-delay: 0.6s;
    color: var(--enchanted-pink);
}
.rune:nth-child(2)::after { animation-delay: 0.6s; }

.rune:nth-child(3) { 
    animation-delay: 1.2s;
    color: var(--mystical-cyan);
}
.rune:nth-child(3)::after { animation-delay: 1.2s; }

@keyframes runeOrbit {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 15px currentColor);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg) scale(1.25);
        filter: drop-shadow(0 0 35px currentColor);
        opacity: 1;
    }
}

@keyframes runeTrail {
    0%, 100% { 
        width: 25px;
        opacity: 0.4;
    }
    50% { 
        width: 50px;
        opacity: 1;
    }
}

/* ========================================
   VIDEO CONTAINER - KEEP AS-IS (NO CHANGES)
========================================= */
#gateScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 50;
}

.video-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background: linear-gradient(135deg, var(--parchment-dark), var(--parchment));
    padding: 25px;
    box-shadow: 
        0 0 0 4px var(--gold-dark),
        0 0 0 12px var(--parchment-dark),
        0 0 0 16px var(--gold-primary),
        0 0 100px rgba(212, 175, 55, 0.6),
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        0 50px 150px rgba(0, 0, 0, 0.9);
    clip-path: polygon(
        0% 4%, 4% 0%, 96% 0%, 100% 4%,
        100% 96%, 96% 100%, 4% 100%, 0% 96%
    );
    z-index: 2;
    position: relative;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 2px solid rgba(139, 105, 20, 0.3);
    pointer-events: none;
    z-index: 10;
}

.video-container::after {
    content: '✦';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 28px;
    color: var(--gold-primary);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
    animation: cornerGlow 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes cornerGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

#gateVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--gold-dark);
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

/* ========================================
   ORNAMENTAL FRAME - FLOATING CRYSTALS
========================================= */
.ornamental-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.corner {
    position: absolute;
    width: clamp(70px, 14vw, 140px);
    height: clamp(70px, 14vw, 140px);
    animation: crystalFloat 6s ease-in-out infinite;
}

.corner::before {
    font-size: clamp(28px, 6vw, 48px);
    filter: drop-shadow(0 0 20px currentColor);
    animation: crystalSpin 8s linear infinite;
    display: block;
}

.corner-tl {
    top: clamp(20px, 4vw, 40px);
    left: clamp(20px, 4vw, 40px);
}

.corner-tl::before {
    content: '💎';
    color: var(--mystical-cyan);
    animation-delay: 0s;
}

.corner-tr {
    top: clamp(20px, 4vw, 40px);
    right: clamp(20px, 4vw, 40px);
}

.corner-tr::before {
    content: '🔮';
    color: var(--enchanted-pink);
    animation-delay: 2s;
}

.corner-bl {
    bottom: clamp(20px, 4vw, 40px);
    left: clamp(20px, 4vw, 40px);
}

.corner-bl::before {
    content: '✨';
    color: var(--magic-gold);
    animation-delay: 4s;
}

.corner-br {
    bottom: clamp(20px, 4vw, 40px);
    right: clamp(20px, 4vw, 40px);
}

.corner-br::before {
    content: '⭐';
    color: #fff;
    animation-delay: 6s;
}

@keyframes crystalFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-20px) rotate(10deg);
        opacity: 1;
    }
}

@keyframes crystalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   VALIDATION SCREEN - ENCHANTED SEAL
========================================= */
#validatingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: 
        radial-gradient(ellipse at center, rgba(138, 43, 226, 0.3) 0%, transparent 60%),
        linear-gradient(135deg, 
            rgba(10, 0, 21, 0.97) 0%, 
            rgba(26, 0, 51, 0.97) 50%,
            rgba(13, 0, 26, 0.97) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    backdrop-filter: blur(20px);
    padding: 20px;
}

.validation-container {
    text-align: center;
    max-width: clamp(340px, 92%, 650px);
    padding: clamp(40px, 8vw, 70px) clamp(30px, 6vw, 50px);
    background: 
        radial-gradient(ellipse at center, rgba(138, 43, 226, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(26, 0, 51, 0.6));
    border: 3px solid var(--magic-gold);
    position: relative;
    box-shadow: 
        0 0 60px rgba(255, 215, 0, 0.6),
        0 30px 90px rgba(0, 0, 0, 0.9),
        inset 0 0 60px rgba(138, 43, 226, 0.2);
    border-radius: 20px;
    animation: containerFloat 4s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% { 
        transform: translateY(0);
        box-shadow: 
            0 0 60px rgba(255, 215, 0, 0.6),
            0 30px 90px rgba(0, 0, 0, 0.9);
    }
    50% { 
        transform: translateY(-15px);
        box-shadow: 
            0 0 80px rgba(255, 215, 0, 0.9),
            0 45px 110px rgba(0, 0, 0, 0.9);
    }
}

.validation-container::before,
.validation-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: 
        linear-gradient(90deg, 
            transparent,
            var(--mystical-cyan) 20%,
            var(--magic-gold) 50%,
            var(--enchanted-pink) 80%,
            transparent);
    box-shadow: 0 0 20px currentColor;
}

.validation-container::before { 
    top: 0;
    animation: borderFlow 3s linear infinite;
}

.validation-container::after { 
    bottom: 0;
    animation: borderFlow 3s linear infinite reverse;
}

@keyframes borderFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

/* Mystical Validation Seal */
.mystical-seal {
    position: relative;
    width: clamp(160px, 38vw, 260px);
    height: clamp(160px, 38vw, 260px);
    margin: 0 auto clamp(35px, 7vw, 55px);
}

.seal-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        conic-gradient(from 0deg,
            var(--magic-purple),
            var(--magic-blue),
            var(--enchanted-pink),
            var(--mystical-cyan),
            var(--magic-gold),
            var(--magic-purple));
    border: 4px solid rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 0 60px rgba(138, 43, 226, 0.8),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
    animation: sealRotateMagic 20s linear infinite;
}

@keyframes sealRotateMagic {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.seal-outer::before {
    content: '✦';
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(18px, 4vw, 28px);
    color: #fff;
    text-shadow: 0 0 20px currentColor;
}

.seal-middle {
    position: absolute;
    width: 72%;
    height: 72%;
    top: 14%;
    left: 14%;
    border-radius: 50%;
    background: 
        radial-gradient(circle, 
            rgba(255, 255, 255, 0.2) 0%, 
            transparent 70%);
    border: 3px solid rgba(255, 255, 255, 0.5);
    animation: sealRotateMagic 16s linear infinite reverse;
}

.seal-middle::before {
    content: '★';
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(16px, 3.5vw, 24px);
    color: var(--magic-gold);
    text-shadow: 0 0 20px currentColor;
}

.seal-inner {
    position: absolute;
    width: 42%;
    height: 42%;
    top: 29%;
    left: 29%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(circle, 
            rgba(255, 215, 0, 0.4) 0%, 
            rgba(138, 43, 226, 0.3) 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
    animation: sealInnerPulse 3s ease-in-out infinite;
}

.seal-inner::before {
    content: '🌟';
    font-size: clamp(40px, 9vw, 65px);
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes sealInnerPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.8),
            inset 0 0 30px rgba(138, 43, 226, 0.4);
    }
    50% { 
        transform: scale(1.12); 
        box-shadow: 
            0 0 70px rgba(255, 215, 0, 1),
            inset 0 0 50px rgba(138, 43, 226, 0.6);
    }
}

@keyframes starTwinkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        filter: brightness(1.5);
    }
}

.validation-title {
    font-size: clamp(24px, 6vw, 44px);
    color: var(--magic-gold);
    margin-bottom: clamp(15px, 3vw, 25px);
    font-weight: 700;
    letter-spacing: clamp(2px, 0.5vw, 4px);
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 1),
        0 0 60px rgba(138, 43, 226, 0.8);
    animation: titleShimmer 3s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { 
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(138, 43, 226, 0.8);
    }
    50% { 
        text-shadow: 
            0 0 50px rgba(255, 215, 0, 1),
            0 0 100px rgba(138, 43, 226, 1),
            0 0 150px rgba(0, 229, 255, 0.6);
    }
}

.validation-text {
    font-size: clamp(15px, 4vw, 22px);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: clamp(30px, 6vw, 45px);
    line-height: 1.7;
    font-style: italic;
}

.rune-circle {
    display: flex;
    justify-content: center;
    gap: clamp(30px, 7vw, 50px);
}

.rune-symbol {
    font-size: clamp(36px, 8vw, 54px);
    animation: symbolOrbit 3s ease-in-out infinite;
    filter: drop-shadow(0 0 25px currentColor);
}

.rune-symbol:nth-child(1) {
    color: var(--mystical-cyan);
    animation-delay: 0s;
}

.rune-symbol:nth-child(2) {
    color: var(--magic-gold);
    animation-delay: 0.5s;
}

.rune-symbol:nth-child(3) {
    color: var(--enchanted-pink);
    animation-delay: 1s;
}

@keyframes symbolOrbit {
    0%, 100% { 
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-18px) scale(1.3) rotate(180deg);
        opacity: 1;
    }
}

/* ========================================
   ACCESS DENIED SCREEN - DARK MAGIC
========================================= */
#deniedScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: 
        radial-gradient(ellipse at center, rgba(139, 0, 0, 0.4) 0%, transparent 60%),
        linear-gradient(135deg, 
            rgba(10, 0, 0, 0.97) 0%, 
            rgba(26, 0, 0, 0.97) 50%,
            rgba(13, 0, 0, 0.97) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
    padding: 20px;
}

.denied-container {
    text-align: center;
    max-width: clamp(340px, 92%, 700px);
    padding: clamp(45px, 9vw, 80px) clamp(35px, 7vw, 60px);
    background: 
        radial-gradient(ellipse at center, rgba(139, 0, 0, 0.2) 0%, transparent 70%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(26, 0, 0, 0.8));
    border: 4px solid #8b0000;
    position: relative;
    box-shadow: 
        0 0 80px rgba(139, 0, 0, 0.8),
        0 40px 120px rgba(0, 0, 0, 0.9),
        inset 0 0 60px rgba(139, 0, 0, 0.3);
    border-radius: 20px;
    animation: deniedShake 0.8s ease-out;
}

@keyframes deniedShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-12px); }
    20%, 40%, 60%, 80% { transform: translateX(12px); }
}

.denied-container::before,
.denied-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: 
        linear-gradient(90deg, 
            transparent,
            #8b0000 20%,
            #ff0000 50%,
            #8b0000 80%,
            transparent);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.denied-container::before { top: 0; }
.denied-container::after { bottom: 0; }

.seal-broken {
    font-size: clamp(90px, 22vw, 150px);
    margin-bottom: clamp(30px, 6vw, 45px);
    animation: brokenPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.9));
}

@keyframes brokenPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.8));
    }
    50% { 
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 60px rgba(255, 0, 0, 1));
    }
}

.denied-title {
    font-size: clamp(30px, 7.5vw, 54px);
    color: #ff6b6b;
    margin-bottom: clamp(25px, 5vw, 35px);
    font-weight: 700;
    letter-spacing: clamp(2px, 0.5vw, 4px);
    text-shadow: 
        0 0 30px rgba(255, 107, 107, 1),
        0 0 60px rgba(255, 0, 0, 0.8);
    animation: deniedGlow 2s ease-in-out infinite;
}

@keyframes deniedGlow {
    0%, 100% { 
        text-shadow: 
            0 0 30px rgba(255, 107, 107, 1),
            0 0 60px rgba(255, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 
            0 0 50px rgba(255, 107, 107, 1),
            0 0 100px rgba(255, 0, 0, 1),
            0 0 150px rgba(255, 0, 0, 0.6);
    }
}

.denied-text {
    font-size: clamp(17px, 4.5vw, 24px);
    color: #ffcccc;
    margin: clamp(18px, 4vw, 25px) 0;
    line-height: 1.7;
}

.denied-subtext {
    font-size: clamp(14px, 3.5vw, 18px);
    color: #ff9999;
    font-style: italic;
    margin-top: clamp(12px, 3vw, 18px);
    opacity: 0.9;
}

.particles-denied {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle, rgba(255, 0, 0, 0.6) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particlesChaos 25s linear infinite;
    opacity: 0.5;
}

@keyframes particlesChaos {
    from { background-position: 0 0; }
    to { background-position: 50px 1000px; }
}

/* ========================================
   RESPONSIVE OPTIMIZATIONS
========================================= */

/* Tablets */
@media (max-width: 768px) {
    .video-container {
        height: clamp(60vh, 75vh, 80vh);
    }
    
    .corner {
        width: clamp(60px, 12vw, 100px);
        height: clamp(60px, 12vw, 100px);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .video-container {
        width: 96%;
        height: 70vh;
        padding: 12px;
    }
    
    .book-loader {
        width: 110px;
        height: 80px;
    }
}

/* Landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .video-container {
        height: 88vh;
    }
    
    .validation-container,
    .denied-container {
        max-height: 92vh;
        overflow-y: auto;
    }
}

/* ========================================
   ACCESSIBILITY
========================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ========================================
   FINISHING TOUCHES
========================================= */
::selection {
    background: var(--magic-gold);
    color: var(--dark-void);
}

*:focus-visible {
    outline: 3px solid var(--magic-gold);
    outline-offset: 4px;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}