:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #ffffff;
    --glitch-offset: 2px;
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Space Mono', monospace;
    overflow: hidden;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    user-select: none;
    opacity: 0;
    transition: opacity 1s ease-in;
}
/* CRT Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.6;
}
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 11;
}
/* The Hexagon Container */
.hexagon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.hexagon-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--text-color);
    stroke-width: 2;
    opacity: 0.5;
}
.center-x {
    font-size: 2rem;
    font-weight: bold;
    z-index: 2;
}
/* Text Containers */
.side-text {
    width: 300px;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: pre;
    text-align: right; /* Default to right for the RT side */
}
#rs-text {
    text-align: left; /* Explicitly left for the RS side */
}
@media (max-width: 768px) {
    .side-text {
        font-size: 1.1rem;
        width: auto;
        margin: 0.5rem 0;
    }
    .hexagon-wrapper {
        width: 60px;
        height: 60px;
        margin: 1rem 0;
    }
    .center-x { font-size: 1.5rem; }
}
/* Glitch Animation Classes */
.glitch-active {
    position: relative;
    animation: glitch-anim 0.3s infinite;
}
.glitch-active::before,
.glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.glitch-active::before {
    color: #ff004c;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch-active::after {
    color: #00fff9;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px, 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(10% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(30% 0 40% 0); }
    100% { clip-path: inset(50% 0 30% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(80% 0 5% 0); }
    40% { clip-path: inset(40% 0 30% 0); }
    60% { clip-path: inset(10% 0 80% 0); }
    80% { clip-path: inset(50% 0 20% 0); }
    100% { clip-path: inset(30% 0 60% 0); }
}
/* Subtle Color Shift */
.color-pulse { animation: pulse-white 6s infinite; }
@keyframes pulse-white {
    0%, 100% { color: #e0e0e0; stroke: #e0e0e0; }
    50% { color: #ffffff; stroke: #ffffff; }
}
#passcode-display {
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
    width: 100%;
    pointer-events: none;
}
#passcode-display.visible {
    opacity: 1;
    pointer-events: auto;
}
.passcode-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.passcode-box {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(224, 224, 224, 0.3);
    color: var(--accent-color);
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    text-align: center;
    width: 30px;
    outline: none;
    text-transform: uppercase;
    transition: border-color 0.3s ease;
}
.passcode-box:focus {
    border-bottom-color: var(--accent-color);
    outline: none;
    caret-color: transparent;
}