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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    color: #00FFAA;
    text-shadow: 0 0 10px #00FFAA;
    margin-bottom: 10px;
}

.header p {
    color: #aaa;
    font-size: 1.1em;
}

.vfd-housing {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid #333;
}

#vfd-canvas {
    width: 100%;
    height: 120px;
    background: #000;
    border-radius: 10px;
    border: 2px solid #444;
    box-shadow: inset 0 0 20px rgba(0, 255, 170, 0.1);
    display: block;
}

.scan-lines {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 170, 0.03) 2px,
        rgba(0, 255, 170, 0.03) 4px
    );
    border-radius: 10px;
    pointer-events: none;
}

.controls {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    color: #00FFAA;
    font-weight: bold;
}

.input-section input {
    width: 100%;
    padding: 12px;
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    color: #00FFAA;
    text-transform: uppercase;
}

.input-section input:focus {
    outline: none;
    border-color: #00FFAA;
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
}

.control-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9em;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #e0e0e0;
    font-family: inherit;
}

.control-group select:focus,
.control-group input[type="range"]:focus {
    outline: none;
    border-color: #00FFAA;
}

.power-button,
.fullscreen-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(145deg, #333, #222);
    border: 2px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.power-button:hover,
.fullscreen-button:hover {
    background: linear-gradient(145deg, #444, #333);
    border-color: #00FFAA;
}

.power-button.powered-on {
    background: linear-gradient(145deg, #004d33, #003322);
    border-color: #00FFAA;
    color: #00FFAA;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
}

.presets {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.presets h3 {
    color: #00FFAA;
    margin-bottom: 15px;
    text-align: center;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.preset-btn {
    padding: 8px 15px;
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    border-color: #00FFAA;
    color: #00FFAA;
}

footer {
    text-align: center;
    padding: 20px;
    color: #888;
    border-top: 1px solid #333;
}

footer a {
    color: #00FFAA;
    text-decoration: none;
}

footer a:hover {
    text-shadow: 0 0 5px #00FFAA;
}

/* Responsive design */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .preset-buttons {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    #vfd-canvas {
        height: 80px;
    }
}

/* Fullscreen mode adjustments */
:fullscreen .container {
    max-width: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

:fullscreen .vfd-housing {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

:fullscreen #vfd-canvas {
    height: 200px;
    max-width: 1200px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00FFAA;
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #00FFAA;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00FFAA;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}