/* Reset default margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    background-color: #111;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Title Styling */
h1 {
    font-size: 28px;
    color: #fff; /* White Color */
    margin-bottom: 40px;
}

/* Container Styling */
.container {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

/* Animated Waveform Styling */
.animated-waveform {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 150px;
    height: 50px;
    display: none;
}

.animated-waveform.active {
    display: block;
}

.animated-waveform path {
    stroke: #f1c40f;
    stroke-width: 2;
    fill: none;
    animation: waveAnimation 1s linear infinite;
}

@keyframes waveAnimation {
    0% {
        d: path("M0,25 Q50,0 100,25 T200,25");
    }
    50% {
        d: path("M0,25 Q50,50 100,25 T200,25");
    }
    100% {
        d: path("M0,25 Q50,0 100,25 T200,25");
    }
}

/* Control Group Styling */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 600;
    color: #ddd;
    font-size: 16px;
}

/* Frequency Slider Styling */
#frequency-slider {
    margin: 16px 0;
    width: 100%;
    height: 20px;
    -webkit-appearance: none;
    background: #444;
    border-radius: 10px;
    outline: none;
    transition: background 0.3s;
    z-index: 1;
}

#frequency-slider:hover {
    background: #555;
}

#frequency-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: #f1c40f; /* Yellow Accent */
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

#frequency-slider::-webkit-slider-thumb:hover {
    background: #e0b90f;
    transform: scale(1.1);
}

#frequency-slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: #f1c40f; /* Yellow Accent */
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

#frequency-slider::-moz-range-thumb:hover {
    background: #e0b90f;
    transform: scale(1.1);
}

/* Frequency and Waveform Row */
.row {
    display: flex;
    gap: 20px;
}

/* Half Width Control */
.half-width {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Frequency Input and Waveform Dropdown */
.frequency-input-container {
    display: flex;
    gap: 20px;
    align-items: center;
    height: 50px;
}

/* Numeric Input Styling */
input[type="number"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 16px;
    height: 100%;
}

input[type="number"]::placeholder {
    color: #888;
}

/* Select Dropdown Styling */
.select-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

select {
    width: 100%;
    padding: 15px 40px 16px 50px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 16px;
    appearance: none;
    cursor: pointer;
    height: 100%;
    position: relative;
    z-index: 0;
}

/* Custom Arrow for Select */
.select-container::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ccc;
    transform: translateY(-50%);
    z-index: 1;
}

select:focus {
    outline: none;
    border-color: #f1c40f;
}

/* Waveform Icon Styling */
.waveform-icon {
    position: absolute;
    left: 15px;
    width: 24px;
    height: 24px;
    fill: #f1c40f;
    pointer-events: none;
    z-index: 2;
}

/* Volume and Panning Sliders Styling */
.small-slider {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    background: #444;
    border-radius: 6px;
    outline: none;
    transition: background 0.3s;
}

.small-slider:hover {
    background: #555;
}

.small-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #3498db; /* Dark Blue Accent */
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

.small-slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.small-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #3498db; /* Dark Blue Accent */
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

.small-slider::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* Play/Stop Button Styling */
.play-button {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    font-weight: 600;
    background-color: #f1c40f; /* Yellow Accent */
    color: #1e1e1e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.play-button:hover {
    background-color: #e0b90f;
}

.play-button.stopped {
    background-color: #e74c3c; /* Red for Stop */
}

.play-button.stopped:hover {
    background-color: #c0392b;
}

/* Footer Styling */
footer {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-top: 30px;
}

/* Increased vertical spacing */
.control-group,
.row,
.frequency-input-container {
    margin-bottom: 20px;
}

/* Ensure select and input have same height */
.frequency-input-container input[type="number"],
.frequency-input-container select {
    height: 100%;
}

/* Ensure waveform-icon appears above the dropdown */
.select-container {
    overflow: visible;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 30px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .play-button {
        font-size: 18px;
    }

    .row {
        flex-direction: column;
    }

    .half-width {
        width: 100%;
    }

    .waveform-icon {
        display: none; /* Hide icons on small screens */
    }

    .animated-waveform {
        display: none; /* Hide animated waveform on small screens */
    }
}
