/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: monospace;
    background-color: black;
    color: white;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* TV Static background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, white, #666, black);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    text-align: center;
    padding: 40px 20px;
    background: #ffd700;
    border: 6px solid #ff4444;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd700, #ff4444, #9932cc);
    opacity: 0.3;
    z-index: 0;
}

h1 {
    font-size: 4em;
    color: #ff4444;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    transform: rotate(-2deg);
    margin-bottom: 10px;
    text-shadow: 4px 4px 0 black;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.4em;
    color: black;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.2rem;
    position: relative;
    z-index: 1;
}

/* Card styles */
.card {
    background: #ffd700;
    border: 5px solid #ff4444;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd700, #ff4444, #9932cc);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card h2 {
    color: #ff4444;
    margin-bottom: 20px;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    transform: rotate(-1.5deg);
    text-shadow: 2px 2px 0 black;
}

/* Upload area */
.upload-area {
    border: 4px dashed #ff4444;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background: black;
    color: #ffd700;
}

.upload-area:hover {
    border-color: #9932cc;
    background: #1a1a1a;
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area p {
    color: #ffd700;
    font-weight: bold;
    text-transform: uppercase;
}

/* Buttons */
.preset-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

button {
    background: #ff4444;
    color: #ffd700;
    border: 3px solid black;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-family: monospace;
}

button:hover {
    transform: translateY(-3px) rotate(-1deg);
    background: #ffd700;
    color: #ff4444;
    box-shadow: 0 6px 0 #9932cc;
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

button.secondary {
    background: #9932cc;
    color: #ffd700;
}

button.secondary:hover {
    background: #ffd700;
    color: #9932cc;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
    background: black;
    border: 3px solid #ff4444;
    border-radius: 8px;
    padding: 10px;
}

/* Controls */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    color: #ff4444;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

select, input[type="range"] {
    padding: 10px;
    border-radius: 6px;
    border: 3px solid #ff4444;
    background: black;
    color: #ffd700;
    font-size: 1em;
    font-family: monospace;
    font-weight: bold;
}

select {
    cursor: pointer;
}

select option {
    background: black;
    color: #ffd700;
}

input[type="range"] {
    cursor: pointer;
    accent-color: #ff4444;
}

.slider-value {
    text-align: center;
    color: #ff4444;
    font-weight: bold;
    font-size: 1.2em;
    text-transform: uppercase;
}

/* Waveform */
.waveform-container {
    height: 150px;
    background: black;
    border: 3px solid #ff4444;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

#waveform {
    width: 100%;
    height: 100%;
}

/* Play button */
.play-button {
    font-size: 1.4em;
    padding: 20px 50px;
    margin: 20px auto;
    display: block;
    background: #ffd700;
    color: #ff4444;
    border: 4px solid #ff4444;
    text-shadow: 2px 2px 0 black;
}

.play-button:hover {
    background: #ff4444;
    color: #ffd700;
    transform: translateY(-4px) rotate(-2deg);
    box-shadow: 0 8px 0 #9932cc;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background: #ff4444;
    color: #ffd700;
    border-radius: 10px;
    border: 4px solid #ffd700;
}

footer p {
    margin: 10px 0;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: bold;
}

footer a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: black;
}

/* Status messages */
.status-message {
    text-align: center;
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    border: 3px solid;
}

.status-message.success {
    background: #9932cc;
    color: #ffd700;
    border-color: #ffd700;
}

.status-message.info {
    background: black;
    color: #ff4444;
    border-color: #ff4444;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    .controls-grid {
        grid-template-columns: 1fr;
    }

    .preset-buttons {
        flex-direction: column;
    }
}