:root {
    --bg-color: #050505;
    --text-color: #33ff00; /* Phosphor Green */
    --text-color-error: #ff3333;
    --text-color-success: #00ffff;
    --scanline-color: rgba(0, 0, 0, 0.25);
    --font-family: 'VT323', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 24px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Effects */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 10;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, var(--scanline-color) 50%, transparent 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 11;
    opacity: 0.8;
}

/* Terminal Container */
.terminal {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    padding: 30px;
    position: relative;
    box-shadow: 0 0 10px var(--text-color), inset 0 0 15px var(--text-color);
    background-color: rgba(0, 20, 0, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow-y: auto;
    
    /* Subtle text glow */
    text-shadow: 0 0 5px var(--text-color);
}

.terminal::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.header {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
    opacity: 0.7;
    font-size: 0.8em;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.riddle-container {
    margin-bottom: 30px;
    line-height: 1.4;
    white-space: pre-wrap;
    min-height: 100px;
}

.interaction-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: opacity 0.3s;
}

.interaction-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.prompt-symbol {
    margin-right: 15px;
}

input[type="text"] {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1em;
    flex-grow: 1;
    outline: none;
    text-shadow: 0 0 5px var(--text-color);
    caret-color: transparent; /* custom caret */
}

input[type="text"]:focus {
    outline: none;
}

/* Custom Cursor */
.interaction-container::after {
    content: '_';
    animation: blink 1s step-end infinite;
    margin-left: -5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.feedback-container {
    margin-top: 20px;
    font-weight: bold;
}

.feedback-success {
    color: var(--text-color-success);
    text-shadow: 0 0 5px var(--text-color-success);
}

.feedback-error {
    color: var(--text-color-error);
    text-shadow: 0 0 5px var(--text-color-error);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #001100;
}
::-webkit-scrollbar-thumb {
    background: var(--text-color);
}
