/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: white;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content */
main {
    margin: 2rem auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section {
    padding: 2rem;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

/* Model grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.model-card {
    background: linear-gradient(145deg, #f0f2f5, #ffffff);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.model-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.model-card p {
    color: #666;
    margin-bottom: 1rem;
}

.model-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Model interface */
.model-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.model-details h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.model-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.model-info strong {
    color: #333;
}

/* Model controls */
.model-controls {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.audio-controls {
    text-align: center;
}

.record-button {
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.record-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.record-button.recording {
    background: linear-gradient(145deg, #dc3545, #c82333);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1) translateY(-2px); }
    to { transform: scale(1.05) translateY(-2px); }
}

.audio-upload {
    margin: 1rem 0;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.file-input-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.audio-status {
    margin: 1rem 0;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 500;
}

.audio-status.recording {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.audio-status.ready {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Results */
.results {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.results h4 {
    color: #333;
    margin-bottom: 1rem;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.prediction-label {
    font-weight: 600;
    color: #333;
}

.prediction-confidence {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn.secondary {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Utility classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 1.5rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}