/* ============================================
   BASE STYLES - Weather App
   Reset, tipografía base y animaciones globales
   ============================================ */

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

/* Body Base */
body {
    font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
    font-weight: 300;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fondo animado sutil */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(52, 211, 153, 0.08) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

/* Container Principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    /* Preparado para GIF de fondo dinámico vía JavaScript */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    border-radius: 20px;
    overflow: hidden;
    /* Sombra sutil para destacar el contenedor */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: background-image 0.8s ease-in-out, box-shadow 0.3s ease;
}

/* ============================================
   ANIMACIONES GLOBALES
   ============================================ */

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5%, 5%) rotate(180deg); }
}

@keyframes lightning {
    0%, 90%, 100% { 
        filter: brightness(1) contrast(1);
    }
    5% { 
        filter: brightness(2) contrast(1.5);
        box-shadow: 0 0 100px rgba(255, 255, 255, 0.8);
    }
    10% { 
        filter: brightness(0.5) contrast(1.2);
    }
}

@keyframes mysticalFog {
    0%, 100% { 
        filter: brightness(1) blur(0px);
    }
    33% { 
        filter: brightness(1.2) blur(1px);
    }
    66% { 
        filter: brightness(0.9) blur(0.5px);
    }
}

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

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

/* ============================================
   CLASES UTILITARIAS
   ============================================ */

.hidden {
    display: none !important;
}

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

/* Footer Adaptativo */
.footer {
    margin-top: 4rem;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.footer a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary);
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Footer según clima */
body.clear .footer {
    background: rgba(135, 206, 235, 0.1);
    border-top: 1px solid rgba(135, 206, 235, 0.3);
}

body.clouds .footer {
    background: rgba(169, 169, 169, 0.1);
    border-top: 1px solid rgba(169, 169, 169, 0.3);
}

body.rain .footer {
    background: rgba(47, 79, 79, 0.2);
    border-top: 1px solid rgba(47, 79, 79, 0.4);
    color: #ffffff;
}

body.thunderstorm .footer {
    background: rgba(25, 25, 112, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

body.snow .footer {
    background: rgba(240, 248, 255, 0.1);
    border-top: 1px solid rgba(240, 248, 255, 0.3);
}

body.mist .footer {
    background: rgba(221, 160, 221, 0.1);
    border-top: 1px solid rgba(221, 160, 221, 0.3);
}

body.night .footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
