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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 600px;
}

/* Cards */
.login-card,
.import-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: slideUp 0.4s ease-out;
}

.import-card {
    max-width: 800px;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.header .logo {
    text-align: left;
    margin-bottom: 0;
}

.header .logo h1 {
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Form */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--card-background);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-group {
    display: flex;
    gap: 16px;
    width: 100%;
}

.button-group .btn {
    flex: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:not(.button-group .btn) {
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--error-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
}

/* Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--error-color);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Instructions Toggle */
.instructions-toggle {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.instructions-header {
    background: #f8fafc;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.instructions-header:hover {
    background: #f1f5f9;
}

.instructions-header::-webkit-details-marker {
    display: none;
}

.toggle-icon {
    font-size: 1.2rem;
}

.toggle-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.instructions-toggle[open] .toggle-arrow {
    transform: rotate(180deg);
}

.instructions-content {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 24px;
}

.instructions-content h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.instructions-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.instructions-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-area p {
    margin-bottom: 8px;
}

/* File Preview */
.file-preview {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    animation: slideUp 0.3s ease-out;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    font-size: 2rem;
}

.file-info > div {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.875rem;
}

/* Progress Area */
.progress-area {
    background: #f8fafc;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Results Area */
.results-area,
.error-area {
    background: #f8fafc;
    border-radius: 12px;
    padding: 32px;
    animation: slideUp 0.3s ease-out;
}

.results-header,
.error-header {
    text-align: center;
    margin-bottom: 24px;
}

.results-header h3 {
    color: var(--success-color);
}

.error-header h3 {
    color: var(--error-color);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.artist-list {
    background: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.artist-list h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.artist-list ul {
    list-style: none;
}

.artist-list li {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.artist-list li:last-child {
    border-bottom: none;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.small {
    font-size: 0.875rem;
}

/* Notificaciones */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: var(--success-color);
    color: white;
}

.notification-error {
    background: var(--error-color);
    color: white;
}

.notification-info {
    background: var(--primary-color);
    color: white;
}

.notification-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

.notification-message {
    flex: 1;
    font-size: 0.95rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-background);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-content p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-buttons .btn {
    padding: 10px 20px;
    min-width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .login-card,
    .import-card {
        padding: 24px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
    }
    
    .header .logo {
        text-align: center;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .header .logo h1 {
        font-size: 1.5rem;
    }
    
    .instructions {
        padding: 16px;
    }
    
    .upload-area {
        padding: 32px 16px;
    }
    
    .stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .notification-container {
        right: 12px;
        left: 12px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
    }
    
    .modal-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        font-size: 0.95rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}
