:root {
    --bg-color: #050505;
    --term-green: #33ff00;
    --cosmic-purple: #9d00ff;
    --dust-color: #888;
}

body {
    background-color: var(--bg-color);
    color: var(--dust-color);
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    overflow-x: hidden;
    height: 100vh;
}

/* Old CRT Effect */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
}

/* Glitch Title */
h1.glitch {
    color: white;
    font-size: 2.5rem;
    position: relative;
    letter-spacing: 0.2em;
}

h1.glitch::before, h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
}

h1.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip-path: inset(10% 0 80% 0); }
    20% { clip-path: inset(80% 0 10% 0); }
    40% { clip-path: inset(40% 0 40% 0); }
    60% { clip-path: inset(10% 0 50% 0); }
    80% { clip-path: inset(90% 0 5% 0); }
    100% { clip-path: inset(30% 0 60% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(80% 0 20% 0); }
    20% { clip-path: inset(10% 0 60% 0); }
    40% { clip-path: inset(50% 0 30% 0); }
    60% { clip-path: inset(20% 0 70% 0); }
    80% { clip-path: inset(60% 0 10% 0); }
    100% { clip-path: inset(40% 0 50% 0); }
}

/* The Portal */
.portal-frame {
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid #333;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.2);
    overflow: hidden;
}

/* Twitch Embed - fill the portal completely */
#twitch-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#twitch-embed iframe {
    width: 100% !important;
    height: 100% !important;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #444;
    text-align: center;
}

.status-indicator {
    color: var(--term-green);
    margin-top: 0.5rem;
}

.blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Lore & Footer */
.reliquary {
    width: 100%;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #333;
    padding: 1rem;
    background: rgba(0,0,0,0.5);
}

.reliquary h2 {
    font-size: 1rem;
    color: var(--term-green);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.glyph-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.glyph-btn {
    background: transparent;
    border: 1px solid var(--dust-color);
    color: var(--dust-color);
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Times New Roman', serif; /* Mystical vibe */
}

.glyph-btn:hover {
    color: var(--bg-color);
    background: var(--cosmic-purple);
    box-shadow: 0 0 15px var(--cosmic-purple);
    border-color: var(--cosmic-purple);
}

.glyph-btn:active {
    background: white;
    color: black;
}

.echo-log {
    margin-top: 1rem;
    height: 1.5rem;
    font-size: 0.8rem;
    color: #555;
    font-style: italic;
}

.lore-terminal {
    text-align: left;
    width: 100%;
    border-top: 1px dashed #333;
    padding-top: 1rem;
    color: #aaa;
}

footer {
    margin-top: 3rem;
    width: 100%;
    text-align: center;
}

footer a {
    color: #444;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.8rem;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--cosmic-purple);
}

.hidden-link {
    cursor: default;
    color: #0c0c0c !important; /* Almost invisible */
}

.hidden-link:hover {
    color: #fff !important;
    text-shadow: 0 0 5px white;
    cursor: help;
}

/* Omega Unlock Effect */
.omega-unlocked {
    animation: omega-pulse 0.5s ease-out;
}

@keyframes omega-pulse {
    0% { filter: brightness(1) hue-rotate(0deg); }
    25% { filter: brightness(3) hue-rotate(45deg); }
    50% { filter: brightness(1) hue-rotate(90deg); }
    75% { filter: brightness(2) hue-rotate(45deg); }
    100% { filter: brightness(1) hue-rotate(0deg); }
}

.omega-unlocked .glitch-btn {
    box-shadow: 0 0 30px gold;
}
