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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Language Selector */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.lang-btn {
    padding: 8px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.lang-btn.active {
    background: #667eea;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.section p {
    color: #666;
    margin-bottom: 20px;
}

/* File Upload */
.file-upload-area {
    text-align: center;
    padding: 40px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    background: #f8f9ff;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background: #f0f0ff;
    border-color: #764ba2;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

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

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.file-info {
    margin-top: 20px;
    color: #667eea;
    font-weight: 600;
}

/* Analysis Section */
.info-box {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.info-box p {
    margin: 0;
    color: #555;
}

#out-of-range-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.note-tag {
    background: #ff6b6b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.adaptation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adaptation-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.adaptation-options label:hover {
    background: #f0f0ff;
}

.adaptation-options input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

#transpose-amount-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#transpose-amount {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

/* Preview Section */
.preview-controls {
    margin-bottom: 30px;
}

.audio-player {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

#audio-element {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.download-section {
    text-align: center;
    padding: 20px;
    background: #f8feff;
    border-radius: 10px;
}

#download-info {
    margin-top: 15px;
    color: #11998e;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    margin-top: 30px;
}

/* Loading Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    color: #667eea;
    font-weight: 600;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .section {
        padding: 20px;
    }

    .language-selector {
        flex-wrap: wrap;
    }

    #out-of-range-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .adaptation-options {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .section {
        padding: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Instrument Selector */
.instrument-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.instrument-selector label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.instrument-select {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.instrument-select:hover {
    border-color: #764ba2;
    background: #f5f5ff;
}

.instrument-select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 8px rgba(118, 75, 162, 0.3);
}
