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

body {
    background: #000;
    font-family: 'VT323', monospace;
    color: #33FF33;
    overflow-x: hidden;
}

.crt-screen {
    position: relative;
    background: #0a0a0a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(51, 255, 51, 0.1),
        inset 0 0 80px rgba(0, 0, 0, 0.8);
}

.crt-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 10;
}

.crt-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 11;
}

.terminal-text {
    font-family: 'VT323', monospace;
    font-size: 20px;
    line-height: 1.2;
    color: #33FF33;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
    white-space: pre-wrap;
    word-break: break-all;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

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

.retro-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    background: linear-gradient(180deg, #444 0%, #222 100%);
    color: #FFAA00;
    border: 2px solid #666;
    border-bottom-color: #111;
    border-right-color: #111;
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.1s;
}

.retro-btn:hover {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    color: #FFD700;
}

.retro-btn:active {
    border-top-color: #111;
    border-left-color: #111;
    border-bottom-color: #666;
    border-right-color: #666;
    transform: translateY(1px);
}

.retro-btn.active {
    background: linear-gradient(180deg, #553300 0%, #331100 100%);
    color: #FF4400;
    border-color: #FF4400;
}

.retro-input {
    font-family: 'VT323', monospace;
    font-size: 18px;
    background: #111;
    color: #33FF33;
    border: 2px solid #333;
    padding: 4px 8px;
    outline: none;
}

.retro-input:focus {
    border-color: #33FF33;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.3);
}

.flag-set {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    font-weight: bold;
}

.flag-clear {
    color: #444;
}

.register-panel {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
}

.hex-dump {
    font-family: 'VT323', monospace;
    font-size: 16px;
    line-height: 1.4;
    color: #33FF33;
}

.hex-highlight {
    background: rgba(51, 255, 51, 0.3);
    color: #FFD700;
}

.speed-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #FFAA00;
    border-radius: 50%;
    cursor: pointer;
}

.key-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #555;
}

.key-indicator.active {
    background: #33FF33;
    box-shadow: 0 0 8px rgba(51, 255, 51, 0.8);
}

@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.98; }
    15% { opacity: 0.96; }
    20% { opacity: 0.99; }
    100% { opacity: 0.98; }
}

.crt-flicker {
    animation: flicker 0.15s infinite alternate;
}