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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ff8c00;
    min-height: 100vh;
    overflow-x: auto;
}

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

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

header h1 {
    font-size: 2.5rem;
    text-shadow: 0 0 10px #ff8c00;
    margin-bottom: 10px;
}

header p {
    color: #00ff41;
    font-size: 1.1rem;
}

.app-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tv-frame {
    position: relative;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(255, 140, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.tv-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #333;
    border-radius: 10px;
    pointer-events: none;
}

canvas {
    border-radius: 8px;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.screen-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 65, 0.1) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 15px;
}

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

.preset-btn {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 1px solid #ff8c00;
    color: #ff8c00;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    transform: translateY(-2px);
}

.control-panel {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.control-panel h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

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

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

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

.control-group select {
    padding: 8px;
}

.control-group input[type="range"] {
    height: 6px;
    outline: none;
    -webkit-appearance: none;
    background: linear-gradient(to right, #ff8c00 0%, #333 100%);
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ff8c00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.8);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff8c00;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.8);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.audio-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.audio-section h4 {
    margin-bottom: 10px;
    color: #00ff41;
}

.waveform {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 30px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 3px;
    margin-top: 10px;
}

.wave-bar {
    background: #00ff41;
    width: 3px;
    min-height: 1px;
    border-radius: 1px;
    box-shadow: 0 0 2px #00ff41;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.export-btn {
    flex: 1;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}

.export-btn:hover {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

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

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

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

/* Responsive design */
@media (max-width: 1200px) {
    .app-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .control-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 900px) {
    canvas {
        width: 100%;
        height: auto;
        max-width: 800px;
    }
    
    .preset-buttons {
        gap: 5px;
    }
    
    .preset-btn {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* TV static animation */
@keyframes static {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

.screen-glow {
    animation: static 0.1s infinite;
}

/* Glowing effects */
.control-panel h3,
.audio-section h4 {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px currentColor; }
    to { text-shadow: 0 0 10px currentColor, 0 0 15px currentColor; }
}