/* BODY STYLES - Diseño cohesivo con los widgets */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Efecto de partículas de fondo para todo el body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    background-size: 50% 50%, 50% 50%, 50% 50%;
    background-position: 0 0, 100% 0, 50% 100%;
    animation: backgroundShift 15s ease-in-out infinite;
    z-index: -2;
}

@keyframes backgroundShift {
    0%, 100% {
        background-position: 0 0, 100% 0, 50% 100%;
    }
    50% {
        background-position: 100% 100%, 0 100%, 50% 0;
    }
}

/* Efecto de ruido sutil */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* Contenedor principal para el contenido */
body > main {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Estilos para el header */
body > header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body > header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos para el footer */
body > footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Tipografía cohesiva */
body {
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

hr {
    height: 1px;
    border: none;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, .1) 0%,
        rgba(255, 255, 255, .2) 20%,
        rgba(255, 255, 255, .3) 33%,
        rgba(255, 255, 255, .5) 50%,
        rgba(255, 255, 255, .3) 66%,
        rgba(255, 255, 255, .2) 80%,
        rgba(255, 255, 255, .1) 100%
    );
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Enlaces con estilo cohesivo */
a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

a:hover {
    color: #e2e8f0;
}

a:hover::after {
    width: 100%;
}

/* Scrollbar personalizado para navegadores webkit */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Estados de carga */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Efectos de transición para elementos interactivos */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before,
    body::after {
        animation: none !important;
    }
}

/* Modo oscuro mejorado */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    body::before {
        background: 
            radial-gradient(circle at 20% 80%, rgba(74, 85, 104, 0.4) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(45, 55, 72, 0.4) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(113, 128, 150, 0.3) 0%, transparent 50%);
    }
    
    body {
        color: #e2e8f0;
    }
    
    h1 {
        background: linear-gradient(135deg, #e2e8f0 0%, #a0aec0 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    body > main {
        padding: 1rem 0.5rem;
        min-height: calc(100vh - 100px);
    }
    
    body > header {
        padding: 1rem;
    }
    
    body > footer {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Estilos para mensajes del sistema */
.system-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem auto;
    max-width: 500px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Efecto de brillo sutil en elementos interactivos */
.interactive-element {
    position: relative;
}

.interactive-element::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interactive-element:hover::before {
    opacity: 0.3;
}