/* PDMI Simulator Styles - Oscilloscope Theme */

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

body {
    font-family: 'Courier New', monospace;
    background: #0a0a1a;
    color: #cccccc;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #1a1a2e;
    border-bottom: 2px solid #00ff00;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 255, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.title {
    font-size: 1.8rem;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    font-weight: bold;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px;
}

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

.led.paused {
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

.clock {
    font-size: 1.2rem;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    background: #000;
    padding: 0.5rem 1rem;
    border: 1px solid #00ff00;
    border-radius: 4px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 1fr 200px;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 140px);
}

/* Controls Panel */
.controls-panel {
    background: #16213e;
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
}

.control-section {
    margin-bottom: 1.5rem;
}

.control-section h3 {
    color: #00ff00;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 0.5rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

.control-group input[type="range"] {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: #00ff00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px #00ff00;
    -webkit-appearance: none;
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    background: #1a1a2e;
    border: 1px solid #00ff00;
    border-radius: 4px;
    color: #cccccc;
    font-family: 'Courier New', monospace;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    accent-color: #00ff00;
}

.play-pause-btn {
    width: 100%;
    padding: 1rem;
    background: #ff8800;
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.play-pause-btn:hover {
    background: #ffaa33;
    box-shadow: 0 0 15px #ff8800;
}

/* Canvas Container */
.canvas-container {
    position: relative;
    background: #0a0a1a;
    border: 2px solid #00ff00;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

#oscilloscope {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.voltage-scale {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0;
    background: rgba(0, 0, 0, 0.7);
}

.voltage-scale div {
    font-size: 0.8rem;
    color: #00ff00;
    text-align: center;
}

/* Info Panel */
.info-panel {
    background: #16213e;
    border: 1px solid #ff8800;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section h3 {
    color: #ff8800;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #ff8800;
    padding-bottom: 0.5rem;
}

.measurement {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.measurement .label {
    color: #cccccc;
}

.measurement .value {
    color: #00ff00;
    font-weight: bold;
}

.info-text {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #aaa;
}

/* Footer */
.footer {
    background: #1a1a2e;
    border-top: 1px solid #666;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preset-buttons {
    display: flex;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: #333;
    border: 1px solid #666;
    border-radius: 4px;
    color: #cccccc;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.preset-btn:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 10px #00ff00;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#exportBtn {
    padding: 0.5rem 1rem;
    background: #16213e;
    border: 1px solid #ff8800;
    border-radius: 4px;
    color: #ff8800;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

#exportBtn:hover {
    background: #ff8800;
    color: #000;
}

.footer-links a {
    color: #00ff00;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-shadow: 0 0 5px #00ff00;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 200px 1fr 180px;
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
        gap: 0.5rem;
    }
    
    .controls-panel,
    .info-panel {
        height: auto;
        max-height: 300px;
    }
    
    .canvas-container {
        height: 300px;
    }
    
    .header {
        padding: 0.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .preset-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .canvas-container {
        height: 250px;
    }
    
    .voltage-scale {
        display: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #33ff33;
}

/* Animation keyframes for glowing effects */
@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 5px currentColor; 
    }
    50% { 
        text-shadow: 0 0 15px currentColor; 
    }
}

.title {
    animation: glow 2s ease-in-out infinite;
}