/* ==========================================
   Variables CSS
   ========================================== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-warning: #f59e0b;
    --border-color: #334155;
    --shadow-sm: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.2);
    --shadow-lg: rgba(0, 0, 0, 0.4);
}

/* ==========================================
   Reset y Estilos Base
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 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;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    -o-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline-style: none;
}

/* Patrón de fondo sutil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   Container Principal
   ========================================== */
.maintenance-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0;
    animation: fadeInUp 0.8s ease-out;
}

/* ==========================================
   Animación con Logo CanGú
   ========================================== */
.logo-maintenance {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.logo-img {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 10px 40px rgba(59, 130, 246, 0.3));
    animation: logoFloat 4s ease-in-out infinite;
}

.glow-circle {
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.2) 0%,
        rgba(96, 165, 250, 0.1) 30%,
        transparent 70%
    );
    animation: glowPulse 3s ease-in-out infinite;
    z-index: 1;
}

.maintenance-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.icon-float {
    position: absolute;
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
    opacity: 0.9;
}

.icon-1 {
    top: 10%;
    left: 15%;
    animation: orbit1 8s linear infinite;
}

.icon-2 {
    top: 15%;
    right: 10%;
    animation: orbit2 10s linear infinite;
}

.icon-3 {
    bottom: 15%;
    left: 10%;
    animation: orbit3 12s linear infinite;
}

.icon-4 {
    bottom: 10%;
    right: 15%;
    animation: orbit4 9s linear infinite;
}

/* ==========================================
   Animación Lottie
   ========================================== */
.animation-container {
    width: 100%;
    max-width: 500px;
    height: 500px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px var(--shadow-md));
}

/* ==========================================
   Contenido de Texto
   ========================================== */
.text-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 15px;
}

.title .icon {
    font-size: 2.5rem;
    animation: rotate 3s ease-in-out infinite;
    flex-shrink: 0;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

/* ==========================================
   Caja de Información
   ========================================== */
.info-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow-sm);
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
}

.info-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.info-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-text strong {
    color: var(--accent-secondary);
    font-weight: 600;
}

#countdown {
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    letter-spacing: 1px;
    color: var(--accent-primary);
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

/* ==========================================
   Información Adicional
   ========================================== */
.additional-info {
    padding: 20px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
}

.additional-info p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.additional-info strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 5px;
}

.additional-info a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.additional-info a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ==========================================
   Indicador de Estado
   ========================================== */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50px;
    width: fit-content;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-warning);
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.pulsing {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}

.status-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: auto;
}

/* ==========================================
   Animaciones
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes rotateClockwise {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateCounterClockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes orbit1 {
    0% {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    0% {
        transform: rotate(90deg) translateX(100px) rotate(-90deg);
    }
    100% {
        transform: rotate(450deg) translateX(100px) rotate(-450deg);
    }
}

@keyframes orbit3 {
    0% {
        transform: rotate(180deg) translateX(100px) rotate(-180deg);
    }
    100% {
        transform: rotate(540deg) translateX(100px) rotate(-540deg);
    }
}

@keyframes orbit4 {
    0% {
        transform: rotate(270deg) translateX(100px) rotate(-270deg);
    }
    100% {
        transform: rotate(630deg) translateX(100px) rotate(-630deg);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .content-wrapper {
        gap: 40px;
    }

    .animation-container {
        max-width: 400px;
        height: 400px;
    }

    .title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .animation-container {
        max-width: 350px;
        height: 350px;
        order: -1;
    }

    .logo-wrapper {
        width: 250px;
        height: 250px;
    }

    .icon-float {
        font-size: 2rem;
    }

    .title {
        font-size: 2rem;
        justify-content: center;
    }

    .text-content {
        gap: 25px;
    }

    .info-box {
        padding: 25px;
    }

    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .status-indicator {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .animation-container {
        max-width: 280px;
        height: 280px;
    }

    .logo-wrapper {
        width: 200px;
        height: 200px;
    }

    .icon-float {
        font-size: 1.75rem;
    }

    .title {
        font-size: 1.75rem;
        gap: 10px;
    }

    .title .icon {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .info-box {
        padding: 20px;
        gap: 15px;
    }

    .info-icon {
        width: 45px;
        height: 45px;
        font-size: 1.75rem;
    }

    .info-text h3 {
        font-size: 1rem;
    }

    .info-text p {
        font-size: 0.9375rem;
    }

    .additional-info {
        padding: 15px;
    }

    .additional-info p {
        font-size: 0.875rem;
    }

    .status-indicator {
        padding: 12px 16px;
    }

    .status-text {
        font-size: 0.875rem;
    }

    .footer {
        font-size: 0.8125rem;
        padding: 20px 15px;
    }
}

@media (max-width: 360px) {
    .animation-container {
        max-width: 250px;
        height: 250px;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

/* ==========================================
   Mejoras de Accesibilidad
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1a1a1a;
        --bg-card: #1a1a1a;
        --text-primary: #ffffff;
        --border-color: #666666;
    }
}
