@keyframes flicker {
    0%, 100% { opacity: 1; }
    48% { opacity: 1; }
    50% { opacity: 0.3; }
    52% { opacity: 1; }
}

@keyframes text-glitch {
    0% { transform: translate(0, 0); opacity: 1; }
    2% { transform: translate(-2px, 1px); opacity: 0.8; }
    4% { transform: translate(1px, -1px); opacity: 1; }
    6% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(0, 0); opacity: 1; }
}

body {
    background-color: #0a0a0a;
    color: #b0b0b0;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: default;
}

#init-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0a0a0a;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 100;
    text-align: center;
    padding: 20px;
}

#init-overlay p {
     animation: flicker 1.5s infinite;
}

.container {
    width: 100%;
    max-width: 600px;
    border: 1px solid #333;
    padding: 2em;
    box-shadow: 0 0 15px rgba(100, 100, 100, 0.05);
    display: none; /* Hidden until initialized */
}

h1 {
    color: #ccc;
    font-size: 1.5em;
    margin: 0 0 1.5em 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: text-glitch 8s infinite;
}

p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0.5em 0;
}

#status-line {
    color: #5f5; /* Sickly green */
    height: 1.2em; /* Reserve space */
}

.tuner-control {
    margin-top: 2em;
    margin-bottom: 2em;
}

#frequency-display {
    text-align: center;
    font-size: 1.5em;
    color: #f80; /* Amber warning */
    margin-bottom: 0.5em;
    font-weight: bold;
}

#log {
    border-top: 1px solid #333;
    margin-top: 2em;
    padding-top: 1.5em;
    height: 6em; /* Fixed height for log */
    overflow: hidden;
    position: relative;
}

#log p {
    font-size: 1em;
    color: #888;
}

/* --- SLIDER STYLES --- */
#tuner {
    -webkit-appearance: none; /* Override default appearance */
    appearance: none;
    width: 100%;
    height: 4px; /* Slim track */
    background: #333; /* Dark track */
    outline: none;
    opacity: 0.8;
    -webkit-transition: .2s;
    transition: opacity .2s;
    cursor: pointer;
}

#tuner:hover {
    opacity: 1;
}

/* --- SLIDER THUMB (CHROME/SAFARI) --- */
#tuner::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px; /* Width of the block */
    height: 20px; /* Height of the block */
    background: #f80; /* Amber color to match display */
    border: 1px solid #0a0a0a;
    box-shadow: 0 0 5px rgba(255, 136, 0, 0.7); /* Glow */
    cursor: pointer;
    margin-top: -8px; /* Center the thumb on the track */
}

/* --- SLIDER THUMB (FIREFOX) --- */
#tuner::-moz-range-thumb {
    width: 12px;
    height: 20px;
    background: #f80;
    border: 1px solid #0a0a0a;
    box-shadow: 0 0 5px rgba(255, 136, 0, 0.7);
    cursor: pointer;
    border-radius: 0; /* Ensure it's a block */
}