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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --green: #25d366;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --glass: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
}

html, body {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

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

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: floatParticle linear infinite;
    mix-blend-mode: multiply;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.maintenance-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 1.5vh, 1.2rem);
    padding: 1.5rem;
    padding-top: clamp(2rem, 5vh, 4rem);
    padding-bottom: 1rem;
    width: 100%;
    max-width: 700px;
    height: 100vh;
    overflow: hidden;
}

/* ===== LOGO + NOMBRE EN LÍNEA ===== */
.brand-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    animation: fadeInDown 1s ease-out;
}

.brand-logo {
    width: clamp(60px, 12vw, 90px);
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 2px 10px var(--accent-glow));
    flex-shrink: 0;
}

.company-name {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.company-name span {
    color: var(--accent);
    font-weight: 600;
}

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

/* ===== TEXTO DE MANTENIMIENTO ===== */
.maintenance-text {
    text-align: center;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

.maintenance-text h1 {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.maintenance-text p {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

/* Puntos suspensivos animados */
.dots span {
    animation: blink 1.4s infinite;
    -webkit-text-fill-color: var(--accent);
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

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

/* ===== BARRA DE PROGRESO ===== */
.progress-bar-container {
    width: 60%;
    max-width: 350px;
    height: 4px;
    background: var(--glass);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    animation: fadeIn 1.5s ease-out 0.6s both;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent));
    background-size: 200% 100%;
    border-radius: 100px;
    animation: progressFill 3s ease-out 1s forwards, shimmer 2s linear infinite;
}

@keyframes progressFill {
    to { width: 65%; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== SECCION DEL PERRITO ===== */
.dog-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 1.8s ease-out 0.9s both;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 420px;
}

#canvas1 {
    width: min(270px, 40vh);
    height: min(270px, 40vh);
    image-rendering: pixelated;
    border-radius: 12px;
}

.dog-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.dog-controls label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.dog-controls select {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    padding: 0.45rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555570' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
}

.dog-controls select:hover,
.dog-controls select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.dog-controls select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===== BOTON DE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: bounceIn 1s ease-out 1.5s both;
}

.whatsapp-float i {
    font-size: 34px;
    color: #fff;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

/* Pulso del botón de WhatsApp */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--green);
    z-index: -1;
    animation: whatsappPulse 2s ease-out infinite;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .maintenance-container {
        padding: 1rem;
        padding-top: 1.5rem;
        justify-content: flex-start;
        gap: clamp(0.6rem, 1.5vh, 1rem);
    }

    .brand-logo {
        width: clamp(70px, 18vw, 100px);
    }

    .company-name {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    #canvas1 {
        width: min(220px, 33vh);
        height: min(220px, 33vh);
    }

    .dog-controls {
        flex-direction: column;
        gap: 0.3rem;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float i {
        font-size: 26px;
    }
}

@media (max-width: 400px) {
    .maintenance-container {
        padding: 0.75rem;
        padding-top: 1.2rem;
    }

    .brand-logo {
        width: clamp(60px, 16vw, 85px);
    }

    .company-name {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem);
    }

    .maintenance-text h1 {
        font-size: 1.2rem;
    }

    #canvas1 {
        width: min(200px, 30vh);
        height: min(200px, 30vh);
    }

    .dog-controls select {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
    }
}
