@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

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

body {
    font-family: 'Courier Prime', monospace;
    background: #1a1a2e;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #16f4d0, #ff6b35);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(22, 244, 208, 0.5);
}

.header p {
    font-size: 1.2rem;
    color: #e0e0e0;
    -webkit-text-fill-color: #e0e0e0;
}

.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    margin-bottom: 30px;
}

.controls-panel, .info-panel {
    background: rgba(22, 244, 208, 0.1);
    border: 1px solid #16f4d0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(22, 244, 208, 0.2);
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #16f4d0;
    font-weight: bold;
}

input[type="range"] {
    width: 100%;
    background: #404040;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
}

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

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

select {
    width: 100%;
    padding: 8px;
    background: #404040;
    border: 1px solid #16f4d0;
    border-radius: 5px;
    color: #e0e0e0;
    font-family: inherit;
}

input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #16f4d0;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #16f4d0, #00ff88);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 244, 208, 0.4);
}

.presets h3 {
    color: #ff6b35;
    margin-bottom: 10px;
    text-align: center;
}

.preset-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid #ff6b35;
    border-radius: 5px;
    color: #ff6b35;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: rgba(255, 107, 53, 0.4);
    transform: translateX(5px);
}

.canvas-container {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #16f4d0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(22, 244, 208, 0.3);
}

#canvas {
    display: block;
    width: 100%;
    height: auto;
}

.canvas-labels {
    position: absolute;
    left: 10px;
    top: 10px;
    pointer-events: none;
}

.label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 120px;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
}

.label.analog {
    color: #16f4d0;
    border-left: 4px solid #16f4d0;
}

.label.sampled {
    color: #ff6b35;
    border-left: 4px solid #ff6b35;
}

.label.digital {
    color: #00ff88;
    border-left: 4px solid #00ff88;
}

.stats h3 {
    color: #16f4d0;
    margin-bottom: 15px;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(22, 244, 208, 0.2);
}

.stat-label {
    color: #e0e0e0;
}

.fun-facts {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid #ff6b35;
    border-radius: 8px;
}

.fun-facts h3 {
    color: #ff6b35;
    margin-bottom: 10px;
    text-align: center;
}

.fun-facts p {
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.explanation {
    margin-top: 20px;
}

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

.explanation ol {
    list-style: none;
    counter-reset: step-counter;
}

.explanation li {
    counter-increment: step-counter;
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    font-size: 14px;
}

.explanation li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #00ff88;
    color: #1a1a2e;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cyan { color: #16f4d0; }
.orange { color: #ff6b35; }
.green { color: #00ff88; }

.footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(22, 244, 208, 0.3);
    margin-top: 30px;
}

.footer a {
    color: #16f4d0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    text-shadow: 0 0 10px rgba(22, 244, 208, 0.8);
}

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

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .controls-panel {
        order: 1;
    }
    
    .canvas-container {
        order: 2;
    }
    
    .info-panel {
        order: 3;
    }
    
    .canvas-labels .label {
        margin-bottom: 80px;
    }
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .container {
        padding: 10px;
    }
    
    #canvas {
        height: 300px;
    }
    
    .canvas-labels .label {
        margin-bottom: 60px;
        font-size: 10px;
    }
}

/* Scan line effect */
@keyframes scanlines {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.canvas-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #16f4d0, transparent);
    animation: scanlines 3s linear infinite;
    opacity: 0.3;
}

/* Glow effects */
.controls-panel:hover,
.info-panel:hover {
    box-shadow: 0 0 30px rgba(22, 244, 208, 0.4);
}

.canvas-container:hover {
    box-shadow: 0 0 40px rgba(22, 244, 208, 0.5);
}