/**
 * SMOOTH JAZZ CHICAGO 3 - Main Styles
 * Estilos generales y base
 * Tema: Ambar Fuego / Minimalista
 */

/* ============================================ */
/* RESET Y VARIABLES */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores Ambar Fuego */
    --primary: #FF6B00;
    --secondary: #FFA500;
    --accent: #FFD700;
    --dark: #1a1a1a;
    --light: #ffffff;
    --active: #FF8C00;
    --inactive: #666666;
    --bg-dark: #0d0d0d;
    --bg-medium: #1f1f1f;
    --border: rgba(255, 107, 0, 0.2);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #FF6B00 0%, #FFA500 100%);
    --gradient-dark: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.3);
    
    /* Tipografia */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                    'Helvetica Neue', Arial, sans-serif;
    
    /* Espaciado */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================ */
/* BASE */
/* ============================================ */

body {
    font-family: var(--font-primary);
    background: var(--gradient-dark);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================ */
/* LOADER / SPINNER */
/* ============================================ */

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 107, 0, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================ */
/* SPLASH SCREEN */
/* ============================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.splash-screen.active {
    opacity: 1;
    visibility: visible;
}

.splash-content {
    text-align: center;
    padding: var(--spacing-xl);
}

.splash-logo h1 {
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 2px;
}

.splash-logo h2 {
    font-size: 36px;
    font-weight: 300;
    color: var(--secondary);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 1px;
}

.splash-tagline {
    font-size: 14px;
    color: var(--inactive);
    margin-bottom: var(--spacing-xl);
    letter-spacing: 1px;
}

.splash-button {
    padding: 16px 48px;
    background: var(--gradient-primary);
    color: var(--light);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), 
                box-shadow var(--transition-fast);
    letter-spacing: 0.5px;
}

.splash-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.splash-button:active {
    transform: translateY(0);
}

.splash-loader {
    margin-top: var(--spacing-xl);
}

.splash-loader p {
    margin-top: var(--spacing-md);
    color: var(--inactive);
    font-size: 14px;
}

/* ============================================ */
/* LOADING OVERLAY */
/* ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    text-align: center; /* ← NUEVO: Centrar texto */
}

.loading-overlay p {
    margin-top: var(--spacing-md);
    color: var(--light);
    font-size: 14px;
    text-align: center; /* ← NUEVO: Centrar texto */
    width: 100%; /* ← NUEVO: Ancho completo */
}

/* ← NUEVO: Asegurar que spinner esté centrado */
.loading-overlay .loader-spinner {
    margin: 0 auto;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */

.icon-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast),
                color var(--transition-fast);
}

.icon-btn:hover {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
}

.icon-btn:active {
    background: rgba(255, 107, 0, 0.2);
}

/* ============================================ */
/* MESSAGES */
/* ============================================ */

.message-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    z-index: 2000;
}

.message {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-sm);
    animation: slideUp 0.3s ease;
}

.message.success {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.message.error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.message.info {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

@media (max-width: 768px) {
    .splash-logo h1 {
        font-size: 36px;
    }
    
    .splash-logo h2 {
        font-size: 28px;
    }
}

/* ============================================ */
/* UTILITIES */
/* ============================================ */

.spacer {
    flex: 1;
}

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
    opacity: 0;
}