:root {
    --bg-color: #0d0d0d;
    --panel-color: #1a1a1a;
    --text-main: #e0e0e0;
    --text-dim: #666;
    --accent-color: #ff9d00; /* Amber/Orange for radio feel */
    --accent-glow: rgba(255, 157, 0, 0.3);
    --grid-line: #222;
    --font-mono: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Prevent scrolling on main body, handle in specific areas if needed */
}

.interface-container {
    width: 100%;
    max-width: 600px;
    background: var(--panel-color);
    border: 1px solid #333;
    padding: 2rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    position: relative;
}

/* Subtle grid texture overlay */
.interface-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.device-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--text-dim);
    padding-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.brand-name {
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-top: 5px;
}

.tuner-console {
    position: relative;
    z-index: 1;
}

.frequency-display {
    background: #000;
    border: 1px solid #444;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.signal-status {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.signal-status.active {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.current-frequency {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.current-frequency .unit {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 400;
    text-shadow: none;
}

.meter-bar {
    height: 4px;
    background: #222;
    margin-top: 1rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: width 0.3s ease-out;
}

.control-panel {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 30px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.control-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.control-btn:disabled {
    border-color: #333;
    color: #333;
    cursor: default;
}

.control-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.frequency-selector {
    position: relative;
}

.selector-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dial-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.freq-item {
    background: #111;
    border: 1px solid #333;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.freq-item:hover {
    border-color: #555;
    background: #161616;
}

.freq-item.active {
    border-color: var(--accent-color);
    background: #1a1a1a;
    box-shadow: inset 0 0 10px rgba(255, 157, 0, 0.1);
}

.freq-val {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.freq-type {
    display: block;
    font-size: 0.6rem;
    color: var(--text-dim);
}

.device-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    border-top: 1px solid #222;
    padding-top: 1rem;
    font-size: 0.6rem;
    color: #444;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; text-shadow: 0 0 5px var(--accent-color); }
    100% { opacity: 0.7; }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .interface-container {
        padding: 1rem;
        border: none;
        height: 100vh;
        max-width: none;
    }
    
    .current-frequency {
        font-size: 2.5rem;
    }
}
