body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
}

#test-container {
    width: 800px;
    margin: 20px;
    padding: 20px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
}

h1 {
    text-align: center;
}

.disclaimer, .instructions, .credits {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

#graph-container {
    margin-bottom: 20px;
    border: 1px solid #ccc;
}

#controls-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.control-group label {
    width: 150px;
}

.control-group input[type="range"] {
    flex-grow: 1;
    height: 22px; /* Increased height to accommodate track + thumb */
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #888 0%, #888 100%); /* Fallback background */
    background-size: 100% 8px;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}

/* Range slider track - WebKit/Blink browsers (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #888;
    border-radius: 4px;
    border: 1px solid #666;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Range slider track - Mozilla browsers (Firefox) */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #888;
    border-radius: 4px;
    border: 1px solid #666;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Range slider thumb - WebKit browsers */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #007bff;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    margin-top: -7px; /* Center the thumb on the track */
}

/* Range slider thumb - Mozilla browsers */
input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #007bff;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    border: none; /* Remove default border */
}

/* Focus states */
input[type="range"]:focus::-webkit-slider-runnable-track {
    background: #666;
    border-color: #007bff;
}

input[type="range"]:focus::-moz-range-track {
    background: #666;
    border-color: #007bff;
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25), 0 2px 4px rgba(0,0,0,0.3);
}

input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25), 0 2px 4px rgba(0,0,0,0.3);
}

/* Disabled state */
input[type="range"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="range"]:disabled::-webkit-slider-thumb {
    background: #999;
    cursor: not-allowed;
}

input[type="range"]:disabled::-moz-range-thumb {
    background: #999;
    cursor: not-allowed;
}

input[type="range"]:disabled::-webkit-slider-runnable-track {
    background: #ccc;
    border-color: #aaa;
}

input[type="range"]:disabled::-moz-range-track {
    background: #ccc;
    border-color: #aaa;
}

button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f0f0f0;
    cursor: pointer;
}

button:hover {
    background-color: #e0e0e0;
}

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

select {
    padding: 8px;
}

#eq-results-container {
    margin-top: 20px;
}

#eq-results table {
    width: 100%;
    border-collapse: collapse;
}

#eq-results th, #eq-results td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#eq-results th {
    background-color: #f0f0f0;
}

.button-label {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 3px;
    display: inline-block;
}

.button-label:hover {
    background-color: #e0e0e0;
}

#frequency-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#frequency-display-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.freq-nav-btn {
    padding: 5px 10px;
    font-size: 16px;
    margin: 0 10px;
}

#frequency-label {
    min-width: 80px;
    text-align: center;
    font-weight: bold;
}

#frequency-indicator-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
    padding: 5px 0;
}

.freq-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 3px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.freq-indicator-dot.adjusted {
    background-color: #4CAF50; /* Green */
}

.freq-indicator-dot.current {
    background-color: #3498DB; /* Blue */
    transform: scale(1.5);
    box-shadow: 0 0 5px #3498DB;
}

/* EQ Results Table Styles */
.eq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eq-table th,
.eq-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.eq-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.eq-table tr:hover {
    background-color: #f5f5f5;
}

.eq-summary {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.eq-summary p {
    margin: 5px 0;
}

/* Styles for tested vs interpolated frequencies */
.eq-table .tested-freq {
    background-color: #e8f5e8; /* Light green background for tested frequencies */
}

.eq-table .interpolated-freq {
    background-color: #f0f8ff; /* Light blue background for interpolated frequencies */
    font-style: italic;
}

.eq-table .tested-freq:hover {
    background-color: #d4edda;
}

.eq-table .interpolated-freq:hover {
    background-color: #e6f3ff;
}

#eq-results-container {
    margin-top: 30px;
    width: 100%;
}

/* Notification System Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px;
    pointer-events: all;
    position: relative;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid #ccc;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification.notification-show {
    transform: translateX(0);
}

.notification.notification-hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-confirm {
    border-left-color: #6c757d;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #666;
}

.notification-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notification-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.notification-btn-confirm {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.notification-btn-confirm:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.notification-btn-cancel {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.notification-btn-cancel:hover {
    background: #545b62;
    border-color: #545b62;
}

/* Modal Dialog Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.modal-show {
    opacity: 1;
}

.modal-overlay.modal-hide {
    opacity: 0;
}

.modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal-show .modal-container {
    transform: scale(1);
}

.modal-hide .modal-container {
    transform: scale(0.7);
}

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #666;
}

.modal-body {
    padding: 0 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.modal-error-content {
    align-items: center;
}

.modal-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.modal-message {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    flex: 1;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-field label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.modal-field input,
.modal-field textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.modal-field input:focus,
.modal-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-field input.invalid,
.modal-field textarea.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.modal-btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.modal-btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.modal-btn-secondary {
    background: white;
    color: #6c757d;
    border-color: #6c757d;
}

.modal-btn-secondary:hover {
    background: #6c757d;
    color: white;
}

.modal-error {
    border-top: 4px solid #dc3545;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}
