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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #028793;
    --accent-shadow: rgba(71, 255, 234, 0.364);
    --spinner-bg: rgba(0, 0, 0, 0.1);
    --particle-color: rgba(220, 53, 69, 0.1);
    --img-spinner:block;
    --img-spinner-dark:none;
}

[data-theme="dark"] {
    --bg-primary: #1e1e2f;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #028793;
    --accent-shadow: rgba(71, 255, 234, 0.4);
    --spinner-bg: rgba(255, 255, 255, 0.1);
    --particle-color: rgba(255, 71, 87, 0.1);
    --img-spinner:none;
    --img-spinner-dark:block;
}


/*body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}*/

.d14s-img-spinner{
    display: var(--img-spinner);
}
.d14s-img-spinner-dark{
    display: var(--img-spinner-dark);
}

/* Preloader */
.d14s-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.d14s-preloader.d14s-fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Container del preloader */
.d14s-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Texto D14S animado */
.d14s-text {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    text-shadow: 0 0 20px var(--accent-shadow);
    animation: d14s-glow 2s ease-in-out infinite alternate;
}

.d14s-text .d14s-letter {
    font-size: 70px!important;
    display: inline-block;
    animation: d14s-bounce 1.5s ease-in-out infinite;
}

.d14s-text .d14s-letter:nth-child(1) { animation-delay: 0s; }
.d14s-text .d14s-letter:nth-child(2) { animation-delay: 0.2s; }
.d14s-text .d14s-letter:nth-child(3) { animation-delay: 0.4s; }
.d14s-text .d14s-letter:nth-child(4) { animation-delay: 0.6s; }
.d14s-text .d14s-letter:nth-child(5) { animation-delay: 0.8s; }
.d14s-text .d14s-letter:nth-child(6) { animation-delay: 1s; }

@keyframes d14s-glow {
    0% { 
        text-shadow: 0 0 20px var(--accent-shadow);
    }
    100% { 
        text-shadow: 0 0 30px var(--accent-shadow), 
                    0 0 40px var(--accent-shadow);
    }
}

@keyframes d14s-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Spinner circular */
.d14s-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--spinner-bg);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: d14s-spin 1s linear infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.d14s-spinner::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-bottom: 3px solid var(--accent-color);
    border-radius: 50%;
    opacity: 0.5;
    animation: d14s-spin 1.5s linear infinite reverse;
}

/* Imagen estrella dentro del spinner */
.d14s-spinner-star {
    width: 30px;
    height: 30px;
    z-index: 1;
    animation: d14s-counterSpin 1s linear infinite;
}

@keyframes d14s-counterSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

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

/* Puntos de carga */
.d14s-loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.d14s-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: d14s-pulse 1.5s ease-in-out infinite;
}

.d14s-dot:nth-child(1) { animation-delay: 0s; }
.d14s-dot:nth-child(2) { animation-delay: 0.3s; }
.d14s-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes d14s-pulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Partículas de fondo */
.d14s-particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    animation: d14s-float 8s ease-in-out infinite;
}

.d14s-particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.d14s-particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 80%;
    right: 15%;
    animation-delay: 2s;
}

.d14s-particle:nth-child(3) {
    width: 3px;
    height: 3px;
    bottom: 30%;
    left: 80%;
    animation-delay: 4s;
}

.d14s-particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 50%;
    right: 70%;
    animation-delay: 6s;
}

@keyframes d14s-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
}

/* Botón de cambio de tema */
.d14s-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-shadow);
    z-index: 10000;
}

.d14s-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--accent-shadow);
}

/* Contenido principal */
.d14s-main-content {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    opacity: 0;
    transform: translateY(20px);
    animation: d14s-fadeInUp 1s ease-out 0.5s forwards;
}

@keyframes d14s-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.d14s-main-content h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-shadow);
}

.d14s-main-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.d14s-btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--accent-color);
    color: var(--bg-primary);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px var(--accent-shadow);
}

.d14s-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--accent-shadow);
    filter: brightness(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .d14s-text {
        font-size: 3rem;
    }
    
    .d14s-main-content h1 {
        font-size: 2.5rem;
    }
    
    .d14s-theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}


/*---- PRELOADERS INDEPENDIENTES -----*/
/* === PRELOADER PRINCIPAL === */
.d14s-loader-section-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.d14s-loader-section-preloader.active {
    opacity: 1;
    visibility: visible;
}

/* === VARIANTES DEL PRELOADER === */

/* Spinner minimalista */
.d14s-loader-spinner-minimal {
    width: 32px;
    height: 32px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: d14s-loader-spin 1s linear infinite;
}

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

/* Puntos pulsantes */
.d14s-loader-dots-loader {
    display: flex;
    gap: 8px;
    align-items: center;
}

.d14s-loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: d14s-loader-pulse 1.4s ease-in-out infinite both;
}

.d14s-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.d14s-loader-dot:nth-child(2) { animation-delay: -0.16s; }
.d14s-loader-dot:nth-child(3) { animation-delay: 0s; }

@keyframes d14s-loader-pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Línea progresiva */
.d14s-loader-line-loader {
    width: 60px;
    height: 3px;
    background: #f3f3f3;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.d14s-loader-line-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: d14s-loader-slide 1.5s ease-in-out infinite;
}

@keyframes d14s-loader-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Círculo con texto */
.d14s-loader-circle-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.d14s-loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: d14s-loader-rotate 1s linear infinite;
}

.d14s-loader-loading-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@keyframes d14s-loader-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ondas sutiles */
.d14s-loader-wave-loader {
    display: flex;
    gap: 4px;
    align-items: center;
    width: 35px;
}

.d14s-loader-wave-bar {
    width: 3px;
    height: 20px;
    background: #dc3545;
    border-radius: 2px;
    animation: d14s-loader-wave 1.2s ease-in-out infinite;
}

.d14s-loader-wave-bar:nth-child(1) { animation-delay: 0s; }
.d14s-loader-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.d14s-loader-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.d14s-loader-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.d14s-loader-wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes d14s-loader-wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.7;
    }
    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Fade elegante */
.d14s-loader-fade-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.d14s-loader-fade-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: d14s-loader-fadeScale 2s ease-in-out infinite;
}

.d14s-loader-fade-text {
    font-size: 13px;
    color: #888;
    font-weight: 400;
    animation: d14s-loader-fadeText 2s ease-in-out infinite;
}

@keyframes d14s-loader-fadeScale {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes d14s-loader-fadeText {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}