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

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

.oscilloscope-container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(145deg, #333, #444);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #555;
}

.oscilloscope-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #555;
}

.oscilloscope-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 3px;
}

.power-led {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #666;
    transition: all 0.3s ease;
}

.power-led.active {
    background: #ff0000;
    box-shadow: 0 0 15px #ff0000;
}

.main-display-container {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

#oscilloscope {
    background: #000;
    border: 8px solid #444;
    border-radius: 15px;
    box-shadow: 
        inset 0 0 50px rgba(0, 255, 0, 0.1),
        0 0 30px rgba(0, 0, 0, 0.8);
}

.screen-bezel {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 5px solid #222;
    border-radius: 25px;
    pointer-events: none;
    background: linear-gradient(145deg, #333, #111);
    z-index: -1;
}

.controls-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.channel-section, .timebase-section {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #444;
}

.channel-section h3, .timebase-section h3 {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    color: #ccc;
    font-weight: bold;
    letter-spacing: 1px;
}

.ch1 h3 {
    color: #ffff00;
}

.ch2 h3 {
    color: #00ffff;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-size: 10px;
    color: #aaa;
    margin-bottom: 5px;
    text-align: center;
    letter-spacing: 1px;
}

.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.knob {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, #555, #222),
        linear-gradient(145deg, #444, #111);
    border: 3px solid #333;
    position: relative;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 0 0 2px #555;
}

.knob:hover {
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.7),
        inset 0 0 0 2px #666;
}

.knob:active {
    transform: scale(0.98);
}

.knob-indicator {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 20px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%) rotate(-135deg);
    transform-origin: center bottom;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.scale-labels {
    font-size: 10px;
    color: #aaa;
    text-align: center;
}

.toggle-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(145deg, #333, #111);
    border: 2px solid #555;
    border-radius: 8px;
    color: #ccc;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.toggle-btn:hover {
    background: linear-gradient(145deg, #444, #222);
    border-color: #666;
}

.toggle-btn.active {
    background: linear-gradient(145deg, #006600, #004400);
    border-color: #00aa00;
    color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    border: 1px solid #666;
    margin: 8px auto 0;
    transition: all 0.3s ease;
}

.led-indicator.active {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

.signal-generator {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #444;
    margin-bottom: 20px;
}

.signal-generator h3 {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    color: #ff9900;
    font-weight: bold;
    letter-spacing: 1px;
}

.sig-gen-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.signal-generator select {
    width: 100%;
    padding: 8px;
    background: linear-gradient(145deg, #333, #111);
    border: 2px solid #555;
    border-radius: 5px;
    color: #ccc;
    font-family: inherit;
    font-size: 12px;
}

.signal-generator select:focus {
    outline: none;
    border-color: #00aa00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.measurements {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #444;
}

.measurements h3 {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    color: #00aaff;
    font-weight: bold;
    letter-spacing: 1px;
}

.measurement-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.measurement-item {
    background: linear-gradient(145deg, #111, #000);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.measurement-item .label {
    display: block;
    font-size: 10px;
    color: #aaa;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.measurement-item .value {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

@media (max-width: 768px) {
    .oscilloscope-container {
        padding: 20px;
    }
    
    .controls-panel {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #oscilloscope {
        width: 100%;
        height: auto;
        max-width: 600px;
    }
    
    .sig-gen-controls {
        grid-template-columns: 1fr;
    }
    
    .measurement-display {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .oscilloscope-header h1 {
        font-size: 18px;
    }
    
    .knob {
        width: 50px;
        height: 50px;
    }
    
    .measurement-display {
        grid-template-columns: 1fr;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #666;
}