/* Common styles for Room Acoustics Simulator */

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

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
    margin-bottom: 10px;
}

h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Badges */
.info-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin: 5px 5px 5px 0;
}

.source-badge {
    background: #ff6b6b;
}

/* Form Controls */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
button {
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #555;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-danger {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 100, 100, 0.3);
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 5px;
}

.btn-danger:hover {
    background: rgba(255, 100, 100, 0.3);
}

/* Panels and Containers */
.panel {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.plot-container {
    min-height: 400px;
}

.plot-container-large {
    min-height: 300px;
    aspect-ratio: 2 / 1;
}

.plot-container-3d {
    min-height: 500px;
}

/* Frequency Slider */
.frequency-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: rgba(200, 200, 200, 0.3);
    outline: none;
    margin-top: 10px;
}

.frequency-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

.frequency-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
}

/* Status Messages */
.status-message {
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 0.9em;
    border-radius: 5px;
}

.status-success {
    background: rgba(81, 207, 102, 0.2);
    color: #51cf66;
    border: 1px solid rgba(81, 207, 102, 0.3);
}

.status-error {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-info {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.info-card {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    text-align: center;
    border-radius: 5px;
}

.info-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #667eea;
}

.info-label {
    font-size: 0.75em;
    color: #888;
    margin-top: 5px;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
