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

body {
    background: #2a2520;
    background-image: 
        radial-gradient(ellipse at center, #3a3025 0%, #1a1510 100%);
    font-family: 'Roboto Condensed', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: #e0d8c8;
}

#tv-frame {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    padding: 30px 35px 50px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 0 0 3px #111;
    margin-bottom: 20px;
}

#tv-brand {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Archivo Black', sans-serif;
    font-size: 14px;
    color: #666;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#crt-bezel {
    background: #0a0a0a;
    border-radius: 12px;
    padding: 8px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
}

#canvas-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

#canvas {
    display: block;
    border-radius: 8px;
    image-rendering: auto;
}

#scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    border-radius: 8px;
    z-index: 2;
}

#vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 8px;
    box-shadow: inset 0 0 80px rgba(0,0,0,0.6), inset 0 0 200px rgba(0,0,0,0.3);
    z-index: 3;
}

/* Controls - Windows 95/98 style */
#controls {
    width: 100%;
    max-width: 700px;
    border: 2px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    background: #c0c0c0;
    box-shadow: 1px 1px 0 #000;
    margin-bottom: 20px;
}

#controls-titlebar {
    background: linear-gradient(90deg, #000080, #1084d0);
    padding: 3px 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.titlebar-icon {
    width: 16px;
    height: 16px;
    background: #ffc107;
    border-radius: 2px;
    display: inline-block;
}

.titlebar-text {
    flex: 1;
    font-family: 'Roboto Condensed', sans-serif;
}

.titlebar-buttons {
    display: flex;
    gap: 2px;
}

.tb-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #000;
    cursor: default;
    line-height: 1;
}

#controls-body {
    padding: 12px;
}

.control-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

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

.control-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    margin-bottom: 3px;
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 3px 4px;
    font-size: 13px;
    font-family: 'Roboto Condensed', sans-serif;
    border: 2px solid;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
    background: #fff;
    outline: none;
}

.control-group select:focus,
.control-group input:focus {
    outline: 1px dotted #000;
    outline-offset: -3px;
}

.button-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.win-btn {
    padding: 4px 16px;
    font-size: 13px;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    border: 2px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    background: #c0c0c0;
    cursor: pointer;
    color: #000;
    outline: none;
    white-space: nowrap;
}

.win-btn:active {
    border-color: #404040 #dfdfdf #dfdfdf #404040;
    padding: 5px 15px 3px 17px;
}

.win-btn.primary {
    background: #d4d0c8;
    border: 3px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    outline: 1px solid #000;
    outline-offset: -4px;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #000;
    margin-left: auto;
}

.audio-toggle input {
    cursor: pointer;
}

.audio-toggle label {
    cursor: pointer;
    font-weight: 700;
}

/* Footer */
#footer {
    width: 100%;
    max-width: 700px;
    background: #1a1a2e;
    border: 1px solid #333;
    padding: 10px 16px;
    border-radius: 4px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-listing {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #8888aa;
}

.viewer-feedback {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 11px;
    color: #ffc107;
    text-decoration: none;
    border: 1px solid #ffc107;
    padding: 3px 8px;
    border-radius: 2px;
    transition: background 0.2s;
}

.viewer-feedback:hover {
    background: rgba(255, 193, 7, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #tv-frame {
        padding: 15px 18px 35px;
        border-radius: 14px;
    }
    
    .control-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .audio-toggle {
        margin-left: 0;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}