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

/* Header styles */
header {
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

/* Controls section */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
}

select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
    min-width: 200px;
    cursor: pointer;
}

select:hover {
    border-color: #a0aec0;
}

select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Chart container styles */
#chart-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

#chart {
    width: 100%;
    height: 500px;
    margin-bottom: 20px;
}

/* Chart legend styles */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    border-top: 1px solid #edf2f7;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.audiogram {
    background-color: #4299e1;
}

.legend-color.gain {
    background-color: #48bb78;
}

.legend-color.spectrum {
    background-color: #ed8936;
    opacity: 0.7;
}

/* Audio controls section */
.audio-controls {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.input-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.audio-input, .microphone-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

input[type="file"] {
    font-size: 0.9rem;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #4299e1;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3182ce;
}

button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
}

#mic-toggle {
    background-color: #48bb78;
}

#mic-toggle:hover {
    background-color: #38a169;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    width: 150px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #e53e3e;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
}

#acknowledge-warning {
    background-color: #e53e3e;
}

#acknowledge-warning:hover {
    background-color: #c53030;
}

/* Instructions section styles */
.instructions {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.instructions h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.instructions h3 {
    color: #2d3748;
    margin: 20px 0 15px;
    font-size: 1.3rem;
}

.instruction-block {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
}

.instruction-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.instruction-block p {
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.6;
}

.instruction-block ul {
    list-style-type: none;
    padding-left: 20px;
}

.instruction-block ul li {
    margin-bottom: 10px;
    color: #4a5568;
    position: relative;
}

.instruction-block ul li:before {
    content: "•";
    color: #4299e1;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.instruction-block strong {
    color: #2d3748;
    font-weight: 600;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    #chart {
        height: 400px;
    }

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

    .playback-controls {
        flex-direction: column;
        gap: 15px;
    }

    .volume-control {
        flex-direction: column;
    }
}

/* D3.js specific styles */
.axis path,
.axis line {
    stroke: #cbd5e0;
}

.axis text {
    fill: #4a5568;
    font-size: 12px;
}

.grid line {
    stroke: #edf2f7;
    stroke-opacity: 0.7;
}

.grid path {
    stroke-width: 0;
}

/* Interactive elements */
.draggable-point {
    cursor: move;
    fill: #48bb78;
    stroke: white;
    stroke-width: 2;
}

.draggable-point:hover {
    fill: #38a169;
}