/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

/* Apply a dark theme background with animated gradient */
body {
    font-family: 'Roboto Mono', monospace;
    text-align: center;
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #1F1B24, #121212, #1F1B24, #292337);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header styling */
h1 {
    font-size: 3em;
    margin-top: 20px;
    color: #03DAC6;
    text-shadow: 0 0 10px #03DAC6;
}

/* Style the file input */
#fileInputContainer {
    position: relative;
    width: 250px;
    margin: 20px auto;
}

#fileInputLabel {
    display: block;
    background-color: #1F1B24;
    color: #BB86FC;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px dashed #BB86FC;
    transition: background-color 0.3s, border-color 0.3s;
}

#fileInputLabel:hover {
    background-color: #292337;
    border-color: #03DAC6;
}

#fileInputLabel:active {
    background-color: #121212;
}

#audioFile {
    display: none;
}

/* Style the buttons */
button, #downloadLink {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 18px;
    cursor: pointer;
    background-color: #BB86FC;
    color: #121212;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

button:hover, #downloadLink:hover {
    background-color: #03DAC6;
    transform: translateY(-3px);
}

button:active, #downloadLink:active {
    transform: translateY(2px);
}

button:disabled {
    background-color: #4A4458;
    cursor: not-allowed;
    transform: none;
}

#convertButton {
    box-shadow: 0 0 15px #BB86FC;
}

#downloadLink {
    box-shadow: 0 0 15px #03DAC6;
}

#convertButton:hover {
    box-shadow: 0 0 25px #BB86FC;
}

#downloadLink:hover {
    box-shadow: 0 0 25px #03DAC6;
}

/* Playback Controls */
#playbackControls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.player {
    margin-bottom: 30px;
}

.player button {
    margin-bottom: 10px;
}

canvas {
    background-color: #1F1B24;
    border: 2px solid #BB86FC;
    border-radius: 5px;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    button, #downloadLink {
        width: 80%;
        font-size: 16px;
    }

    #fileInputContainer {
        width: 80%;
    }

    canvas {
        width: 100%;
    }
}
