/* OpenMusic CSS */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: #475569;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1e1b4b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Sections */
section {
    background: var(--surface);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

section h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.upload-area.dragging {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.02);
}

.upload-prompt svg {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-prompt p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.upload-prompt small {
    color: var(--text-secondary);
}

/* Image Preview */
.image-preview {
    text-align: center;
    margin-top: 20px;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.image-info {
    background: var(--surface-light);
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    text-align: left;
}

.image-info p {
    margin: 5px 0;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.setting-group input,
.setting-group select {
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.setting-value {
    display: inline-block;
    margin-top: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.setting-group small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: var(--surface-light);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--surface-light);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
}

/* Results */
.results-info {
    background: var(--surface-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.results-info p {
    margin: 10px 0;
}

.audio-player-container {
    margin: 30px 0;
    text-align: center;
}

#audioPlayer {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.download-buttons .btn {
    flex: 1;
    min-width: 200px;
}

/* Info Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: var(--surface-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.info-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-secondary);
}

.info-note {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-buttons .btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}
