/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Control Panel */
.control-panel {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

#stopBtn {
    background-color: #e74c3c;
}

#stopBtn:hover {
    background-color: #c0392b;
}

/* Status Display */
.status {
    background-color: #ecf0f1;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
}

#status {
    font-weight: 600;
    margin: 0;
}

/* Visualization */
.visualization {
    margin-top: 2rem;
}

#soundVisualizer {
    height: 120px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 0 10px;
}

.sound-bar {
    background-color: #3498db;
    flex-grow: 1;
    transition: height 0.1s ease;
    border-radius: 3px 3px 0 0;
}

#detectionResult {
    font-size: 1.2rem;
    text-align: center;
    margin: 1.5rem 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#detectionResult i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Predictions */
.predictions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.prediction-item {
    background-color: #f8f9fa;
    padding: 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

/* Alert Box */
.alert-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert-box.visible {
    display: flex;
}

.alert-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

#alertTitle {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#alertMessage {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#closeAlert {
    background-color: #3498db;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
}