/* ===== VARIABLES CSS ===== */
:root {
    /* Colores corporativos y serios */
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    
    /* Fondos */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-body: #ecf0f1;
    
    /* Texto */
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #7f8c8d;
    
    /* Sombras sutiles */
    --shadow-sm: 0 1px 3px rgba(44, 62, 80, 0.1);
    --shadow-md: 0 2px 8px rgba(44, 62, 80, 0.15);
    --shadow-lg: 0 4px 16px rgba(44, 62, 80, 0.2);
    
    /* Bordes */
    --border-light: #e9ecef;
    --border-medium: #dee2e6;
    
    /* Radius sobrio */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Espaciado compacto */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    
    /* Transiciones */
    --transition: all 0.2s ease;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-body);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== PARTÍCULAS DE FONDO ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(44, 62, 80, 0.05);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.2; }
    50% { transform: translateY(-10px) rotate(180deg); opacity: 0.05; }
}

/* ===== HERO SECTION COMPACTA ===== */
.hero-section {
    position: relative;
    z-index: 1;
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    background: var(--primary-color);
    color: white;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1rem);
    opacity: 0.9;
    margin-bottom: var(--space-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    line-height: 1.4;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    font-size: 0.8rem;
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

/* ===== BOTONES ===== */
.btn-primary {
    background: var(--success-color);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    min-width: 140px;
    justify-content: center;
}

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

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: calc(var(--space-sm) - 1px) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Variante para secciones no-hero */
.results-section .btn-secondary,
.download-section .btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: var(--space-md) var(--space-lg);
    min-width: 140px;
    flex-shrink: 0;
}

.results-section .btn-secondary:hover,
.download-section .btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

/* ===== STATUS Y LÍMITES ===== */
.hero-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.backend-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.backend-status.connected {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.backend-status.disconnected {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.limits-display {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    min-width: 140px;
    justify-content: center;
}

.limits-display.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border-color: rgba(39, 174, 96, 0.3);
}

.limits-display.info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
    border-color: rgba(52, 152, 219, 0.3);
}

.limits-display.warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border-color: rgba(243, 156, 18, 0.3);
    animation: pulse 2s infinite;
}

.limits-display.danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border-color: rgba(231, 76, 60, 0.3);
}

.limits-display.blocked {
    animation: shake 0.5s ease-in-out;
}

/* Animaciones para límites */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(243, 156, 18, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== BANNER DE LÍMITES EXCEDIDOS ===== */
.limits-exceeded-banner {
    background: rgba(231, 76, 60, 0.05);
    border: 2px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) auto;
    max-width: 1200px;
    animation: slideInFromTop 0.5s ease;
    box-shadow: var(--shadow-lg);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
}

.banner-icon {
    font-size: 3rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.banner-text {
    flex: 1;
}

.banner-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--error-color);
    margin-bottom: var(--space-sm);
}

.banner-subtitle {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.banner-actions {
    flex-shrink: 0;
}

.banner-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.banner-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: var(--space-lg) auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    padding: var(--space-2xl);
    text-align: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    margin: var(--space-lg);
    transition: var(--transition);
}

.upload-section:hover,
.upload-section.dragover {
    border-color: var(--accent-color);
    background: rgba(52, 152, 219, 0.03);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.upload-section[disabled] {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.upload-section[disabled] .upload-text {
    color: var(--text-muted);
}

.upload-section[disabled] .upload-btn {
    background: var(--border-medium);
    color: var(--text-muted);
    cursor: not-allowed;
}

.upload-section[disabled] .upload-btn:hover {
    transform: none;
    box-shadow: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    color: var(--accent-color);
}

.upload-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.upload-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.file-input {
    display: none;
}

.upload-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    min-width: 180px;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ===== SETTINGS SECTION ===== */
.settings-section {
    background: var(--bg-primary);
    padding: var(--space-lg);
    margin: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.settings-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    align-items: stretch;
}

.setting-group {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 120px;
    justify-content: flex-start;
    gap: var(--space-xs);
}

.setting-group:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.setting-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    flex-shrink: 0;
    margin-bottom: 0;
}

.setting-group input,
.setting-group select {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: var(--transition);
    background: var(--bg-primary);
    font-family: inherit;
}

.setting-group textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    transition: var(--transition);
    background: var(--bg-primary);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    resize: vertical;
    min-height: 60px;
    line-height: 1.3;
}

.setting-group input:focus,
.setting-group select:focus,
.setting-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Configuraciones especiales */
.setting-group:has(#ollamaUrl) {
    min-height: 160px;
}

.ai-config-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-grow: 1;
}

.ai-config-container input {
    margin-bottom: 0;
}

.setting-group:has(#promptTemplate) {
    grid-column: 1 / -1;
    min-height: 140px;
}

#promptTemplate {
    min-height: 80px;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Range slider */
.range-container {
    position: relative;
    flex-grow: 1;
}

.range-value {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.7rem;
    pointer-events: none;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border-medium);
    outline: none;
    width: 100%;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
}

.setting-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid var(--border-light);
}

/* ===== PROCESS SECTION ===== */
.process-section {
    display: none;
    padding: var(--space-lg);
    margin: var(--space-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.file-list {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-light);
    max-height: 280px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    padding: var(--space-sm);
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.file-item:hover {
    border-color: var(--accent-color);
}

.file-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-right: var(--space-md);
    border: 1px solid var(--border-light);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.file-status {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pending {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-processing {
    background: rgba(52, 152, 219, 0.1);
    color: var(--accent-color);
}

.status-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.status-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
}

.progress-container {
    margin: var(--space-md) 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-sm);
}

.process-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 0 auto;
    min-width: 180px;
}

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

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

/* ===== RESULTS SECTION ===== */
.results-section {
    display: none;
    padding: var(--space-lg);
    margin: var(--space-lg);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--primary-color);
    color: white;
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.result-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}

.result-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent-color);
}

.result-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.result-info {
    padding: var(--space-md);
}

.result-name {
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.3;
}

.result-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.compression-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.7rem;
    white-space: nowrap;
}

.download-section {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
}

.download-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    min-width: 140px;
    flex-shrink: 0;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    padding: var(--space-lg);
    width: 95%;
    height: 95%;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    height: calc(100% - 60px);
    overflow-y: auto;
    padding: var(--space-md);
}

.modal-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    cursor: pointer;
}

.modal-item:hover {
    border-color: var(--accent-color);
}

.modal-item.selected {
    border-color: var(--warning-color);
    background: rgba(243, 156, 18, 0.05);
}

.modal-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.modal-item-info {
    text-align: center;
}

.modal-item-name {
    font-weight: 600;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.modal-item-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: var(--bg-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ===== CONTEXT MENU ===== */
.context-menu {
    position: absolute;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    padding: var(--space-xs) 0;
    min-width: 140px;
    display: none;
}

.context-menu-item {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    font-size: 0.85rem;
}

.context-menu-item:hover {
    background: var(--bg-secondary);
}

.context-menu-item.danger {
    color: var(--error-color);
}

.context-menu-item.danger:hover {
    background: rgba(231, 76, 60, 0.05);
}

/* ===== NOTIFICACIONES ===== */
.notifications-container {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    pointer-events: none;
    padding: 16px;
    width: 100%;
    max-width: 400px;
}

.notification {
    background: var(--success-color);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    font-size: 0.9rem;
    word-wrap: break-word;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    min-height: 50px;
}

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

.notification-hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-content {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

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

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

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

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

.notification:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.notification.notification-hide:hover {
    transform: translateX(100%);
}

/* Stack de notificaciones */
.notifications-container .notification:nth-child(1) { z-index: 1010; }
.notifications-container .notification:nth-child(2) { z-index: 1009; }
.notifications-container .notification:nth-child(3) { z-index: 1008; }
.notifications-container .notification:nth-child(4) { z-index: 1007; }
.notifications-container .notification:nth-child(5) { z-index: 1006; }

.notifications-container .notification:nth-child(n+6) {
    display: none;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: var(--space-sm);
}

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

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    background: var(--primary-color);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.footer-description {
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-feature {
    text-align: center;
    padding: var(--space-md);
}

.footer-feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

.footer-feature-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.footer-feature-text {
    opacity: 0.8;
    line-height: 1.4;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.85rem;
}

.footer-link:hover {
    color: white;
}

.footer-copyright {
    opacity: 0.7;
    font-size: 0.75rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: var(--space-lg) var(--space-md);
    }
    
    .hero-features {
        gap: var(--space-sm);
        margin-bottom: var(--space-sm);
    }
    
    .hero-feature {
        font-size: 0.75rem;
        padding: 4px var(--space-xs);
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .hero-status {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .limits-display {
        min-width: auto;
        width: 100%;
        max-width: 250px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .stats-summary {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    
    .upload-section,
    .settings-section,
    .process-section,
    .results-section {
        padding: var(--space-lg);
        margin: var(--space-md);
    }
    
    .footer-features {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
        gap: var(--space-md);
    }
    
    .banner-icon {
        font-size: 2.5rem;
    }
    
    .banner-title {
        font-size: 1.1rem;
    }
    
    .banner-subtitle {
        font-size: 0.9rem;
    }
    
    .limits-exceeded-banner {
        margin: var(--space-md);
    }
    
    .notifications-container {
        top: 0;
        right: 0;
        left: 0;
        max-width: none;
        padding: 10px;
    }
    
    .notification {
        margin-bottom: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-features {
        gap: 4px;
    }
    
    .hero-feature {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .hero-feature span:first-child {
        font-size: 0.8rem;
    }
}

/* ===== FOCUS STATES ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
/* ===== ESTILOS PARA SISTEMA DE PROMPTS ===== */
/* Añadir al final de styles.css */

/* Contenedor del selector de prompts */
.prompt-selector-wrapper {
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.prompt-selector-wrapper:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

/* Botones del selector */
.prompt-selector-wrapper button {
    transition: var(--transition);
}

.prompt-selector-wrapper button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Modal de gestión de prompts */
.prompt-manage-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    animation: fadeIn 0.3s ease;
}

.prompt-manage-modal .modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    animation: slideInFromTop 0.3s ease;
}

/* Items de prompt en el modal */
.prompt-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: var(--transition);
}

.prompt-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.prompt-item.selected {
    border-color: var(--accent-color);
    background: rgba(52, 152, 219, 0.05);
}

.prompt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.prompt-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.prompt-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.prompt-item-actions {
    display: flex;
    gap: var(--space-sm);
}

.prompt-item-actions button {
    border: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.prompt-item-actions button:hover {
    transform: translateY(-1px);
}

.prompt-preview {
    background: var(--bg-primary);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-height: 80px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    line-height: 1.3;
    border: 1px solid var(--border-light);
}

/* Botones de acción en prompts */
.btn-use-prompt {
    background: var(--accent-color);
    color: white;
}

.btn-edit-prompt {
    background: var(--warning-color);
    color: white;
}

.btn-delete-prompt {
    background: var(--error-color);
    color: white;
}

.btn-create-prompt {
    background: var(--success-color);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-create-prompt:hover {
    background: #219a52;
    transform: translateY(-1px);
}

/* Indicadores especiales */
.prompt-default-badge {
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: var(--space-xs);
}

.prompt-custom-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: var(--space-xs);
}

.prompt-selected-badge {
    background: var(--warning-color);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: var(--space-xs);
}

/* Animación para cambio de prompt */
.prompt-changed {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2) !important;
    animation: promptChangeGlow 0.5s ease;
}

@keyframes promptChangeGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(39, 174, 96, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* Notificación de guardado */
.prompt-save-notification {
    background: var(--success-color);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideInFromRight 0.3s ease;
}

/* Estadísticas de prompts */
.prompt-stats {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-top: var(--space-lg);
    border: 1px solid var(--border-light);
}

.prompt-stats-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.prompt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
}

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

.prompt-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--space-xs);
}

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

/* Responsive para prompts */
@media (max-width: 768px) {
    .prompt-manage-modal {
        padding: var(--space-md);
    }
    
    .prompt-manage-modal .modal-content {
        max-height: 95vh;
    }
    
    .prompt-item-header {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .prompt-item-actions {
        align-self: flex-start;
    }
    
    .prompt-selector-wrapper {
        padding: var(--space-md);
    }
    
    .prompt-selector-wrapper > div {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .prompt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .prompt-item-actions {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .prompt-item-actions button {
        font-size: 0.8rem;
        padding: var(--space-sm);
    }
}


/* ===== ESTILOS PARA MODALES BONITOS ===== */
/* Añadir al final de styles.css */

/* Animaciones para modales bonitos */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutToBottom {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Overlay de modales bonitos */
.beautiful-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

/* Contenido de modales bonitos */
.beautiful-modal-overlay > div {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.3);
    border: 1px solid var(--border-light);
    position: relative;
}

/* Headers de modales con gradientes */
.beautiful-modal-overlay .modal-header-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: var(--space-xl);
    text-align: center;
}

.beautiful-modal-overlay .modal-header-gradient.success {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
}

.beautiful-modal-overlay .modal-header-gradient.warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
}

.beautiful-modal-overlay .modal-header-gradient.danger {
    background: linear-gradient(135deg, var(--error-color), #c0392b);
}

/* Campos de formulario mejorados */
.beautiful-modal-overlay input,
.beautiful-modal-overlay textarea,
.beautiful-modal-overlay select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    font-family: inherit;
}

.beautiful-modal-overlay input:focus,
.beautiful-modal-overlay textarea:focus,
.beautiful-modal-overlay select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: var(--bg-primary);
}

.beautiful-modal-overlay textarea {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    line-height: 1.4;
    resize: vertical;
    min-height: 120px;
}

/* Labels mejorados */
.beautiful-modal-overlay label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

/* Textos de ayuda */
.beautiful-modal-overlay small {
    display: block;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Botones mejorados */
.beautiful-modal-overlay .cancel-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.beautiful-modal-overlay .cancel-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.beautiful-modal-overlay .save-btn,
.beautiful-modal-overlay .delete-btn {
    color: white;
    border: none;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
}

.beautiful-modal-overlay .save-btn {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
}

.beautiful-modal-overlay .save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.beautiful-modal-overlay .delete-btn {
    background: linear-gradient(135deg, var(--error-color), #c0392b);
}

.beautiful-modal-overlay .delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

/* Mensajes de error en campos */
.field-error {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
    font-weight: 500;
    animation: slideInFromTop 0.3s ease;
}

/* Información de prompt en modales */
.beautiful-modal-overlay .prompt-info-card {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-light);
}

.beautiful-modal-overlay .prompt-info-card h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.beautiful-modal-overlay .prompt-info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.beautiful-modal-overlay .prompt-preview {
    background: var(--bg-primary);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    max-height: 60px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    border: 1px solid var(--border-light);
}

/* Overlay de éxito */
.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: var(--radius-lg);
    animation: fadeIn 0.3s ease;
}

.success-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.success-overlay p {
    opacity: 0.9;
    text-align: center;
    max-width: 300px;
    line-height: 1.4;
}

/* Efectos de enfoque mejorados */
.beautiful-modal-overlay input:focus {
    animation: focusGlow 0.3s ease;
}

@keyframes focusGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(52, 152, 219, 0.1);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }
}

/* Estados de validación visual */
.beautiful-modal-overlay .field-valid {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1) !important;
}

.beautiful-modal-overlay .field-invalid {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    animation: shake 0.5s ease;
}

/* Responsive para modales bonitos */
@media (max-width: 768px) {
    .beautiful-modal-overlay {
        padding: var(--space-md);
    }
    
    .beautiful-modal-overlay > div {
        max-height: 95vh;
        margin: 0;
    }
    
    .beautiful-modal-overlay .modal-header-gradient {
        padding: var(--space-lg);
    }
    
    .beautiful-modal-overlay .modal-header-gradient h2 {
        font-size: 1.3rem;
    }
    
    .beautiful-modal-overlay .modal-content-padding {
        padding: var(--space-lg);
    }
    
    .beautiful-modal-overlay .modal-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .beautiful-modal-overlay .modal-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .beautiful-modal-overlay {
        padding: var(--space-sm);
    }
    
    .beautiful-modal-overlay .modal-header-gradient {
        padding: var(--space-md);
    }
    
    .beautiful-modal-overlay .modal-header-gradient h2 {
        font-size: 1.2rem;
    }
    
    .beautiful-modal-overlay .modal-content-padding {
        padding: var(--space-md);
    }
}

/* Efectos de partículas para éxito (opcional) */
.success-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.success-particles::before {
    content: '✨';
    position: absolute;
    top: 20%;
    left: 20%;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: 0s;
}

.success-particles::after {
    content: '🎉';
    position: absolute;
    top: 30%;
    right: 20%;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* Indicadores de progreso en modales */
.modal-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-md);
}

.modal-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Estados de carga en botones */
.beautiful-modal-overlay .btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.beautiful-modal-overlay .btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .beautiful-modal-overlay,
    .beautiful-modal-overlay > div,
    .beautiful-modal-overlay *,
    .success-overlay,
    .field-error {
        animation: none !important;
        transition: none !important;
    }
}