/* THE TEMPLE: NEON VELVET VEIL & RAINBOW OVERFLOW */
.temple-terminal {
    background: radial-gradient(circle at center, #ff1493 0%, #0a0a0a 100%); [span_22](start_span)/* Magenta core[span_22](end_span) */
    border: 3px solid;
    border-image: linear-gradient(45deg, #ff0000, #ff1493, #9400d3, #00bfff) 1; [span_23](start_span)/* Rainbow Spectrum[span_23](end_span) */
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.7); [span_24](start_span)/* Ultraviolet glow[span_24](end_span) */
    mask-image: url('mycelial-mesh.svg'); [span_25](start_span)[span_26](start_span)/* Porous membrane layout[span_25](end_span)[span_26](end_span) */
    transition: filter 0.5s ease-in-out;
}

/* ACTIVATING THE GLITCH: PROTECTIVE ADAPTATION */
.temple-terminal.encroachment-detected {
    animation: neonGlitch 0.2s infinite; [span_27](start_span)[span_28](start_span)/* Glitch frequency[span_27](end_span)[span_28](end_span) */
    filter: hue-rotate(270deg) blur(5px);
    pointer-events: none; [span_29](start_span)[span_30](start_span)/* Non-navigable to intruders[span_29](end_span)[span_30](end_span) */
}

@keyframes neonGlitch {
    0% { transform: translate(0); clip-path: inset(0 0 0 0); }
    50% { transform: translate(-5px, 2px); clip-path: inset(10% 0 40% 0); }
    100% { transform: translate(5px, -2px); clip-path: inset(30% 0 10% 0); }
}

/* 🌹 THE THORN LAYER */
.thorn-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 1s ease;
    /* Create a vignette of sharp, metallic thorns */
    background: radial-gradient(circle at center, transparent 60%, #000 150%),
                url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 0 C60 40 90 50 50 100 C10 50 40 40 50 0 Z" fill="none" stroke="%23ff0055" stroke-width="2"/></svg>');
    background-size: cover, 50px 50px;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

/* ACTIVATION STATE */
body.veiled .thorn-overlay {
    opacity: 0.8;
    animation: growThorns 2s ease-out forwards;
}

@keyframes growThorns {
    0% { background-size: cover, 0px 0px; }
    100% { background-size: cover, 100px 100px; } /* Thorns expand */
}

/* THE FANG CURSOR */
body.veiled {
    cursor: url('data:image/svg+xml;utf8,<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><text y="24" font-size="24">🧛‍♀️</text></svg>'), auto;
}

/* 🌈 SUPERRADIANCE BEAMS */
.superradiance-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1; /* Behind content, in front of void */
    mix-blend-mode: screen; /* Light adds up */
    opacity: 0.6;
}

.beam {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to top, 
        var(--magenta) 0%, 
        var(--cyan) 50%, 
        var(--gold) 80%, 
        transparent 100%);
    filter: blur(15px);
    opacity: 0;
    animation: superradianceRise 4s ease-in-out infinite;
}

/* GENERATE THE DISORDERED ORDER */
.beam:nth-child(1) { left: 10%; animation-delay: 0s; width: 30px; }
.beam:nth-child(2) { left: 25%; animation-delay: 1.5s; width: 10px; --magenta: #ff0000; }
.beam:nth-child(3) { left: 40%; animation-delay: 0.5s; width: 50px; }
.beam:nth-child(4) { left: 60%; animation-delay: 2s; width: 15px; --cyan: #00ff00; }
.beam:nth-child(5) { left: 85%; animation-delay: 1s; width: 40px; }

@keyframes superradianceRise {
    0% { transform: scaleY(0); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: scaleY(1.5); opacity: 0; }
}
