/* style.css - Estilos para CALIGO con mejoras SEO y accesibilidad */

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

header {
    margin-bottom: 5px;
}

form {
    margin-bottom: 10px;
}

/* Clase para ocultar visualmente pero mantener accesible para lectores de pantalla */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
}

/* Mejorar contraste para accesibilidad */
a {
    color: #00ff41;
    text-decoration: underline;
}

a:hover, a:focus {
    color: #fff;
    text-decoration: none;
}

/* Focus visible para accesibilidad */
*:focus {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}

/* Efecto de matriz de fondo */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.container {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #ff0000, #ff6600, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px #ff0000); }
    to { filter: drop-shadow(0 0 20px #ff6600); }
}

.counter-container {
    margin: 3rem 0;
    position: relative;
    margin-bottom: 8px;
}

.counter {
    font-family: 'Orbitron', monospace;
    font-size: 5rem;
    font-weight: 700;
    color: #00ff41;
    text-shadow: 0 0 20px #00ff41;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.counter.decrement-animation {
    transform: scale(1.1);
    color: #ff4444;
    text-shadow: 0 0 30px #ff4444;
}

.mystery-text {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2rem;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.action-button {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 1rem 0;
}

.action-button:hover:not(:disabled) {
    background: linear-gradient(45deg, #cc0000, #ff0000);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,0,0,0.3);
}

.action-button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stats {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #333;
    font-size: 0.9rem;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.stats dl {
    margin: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #222;
}

.stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stat-item dt {
    font-weight: normal;
}

.stat-item dd {
    margin: 0;
}

.stat-value {
    color: #00ff41;
    font-weight: bold;
}

.milestones {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 2rem 0;
    flex-wrap: wrap;
    margin-top: 20px;
}

.milestone-item {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 180px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.milestone-item.completed {
    background: rgba(0,255,65,0.1);
    border-color: #00ff41;
}

.milestone-number {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 5px;
}

.milestone-status {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #ffffff;
}

.milestone-item.completed .milestone-status {
    color: #00ff00;
}

    .milestone-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
    }

.countdown-container {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255,100,0,0.1);
    border: 1px solid #ff6600;
    border-radius: 8px;
}

.countdown-text {
    font-size: 1rem;
    color: #ff6600;
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6600;
    text-shadow: 0 0 10px #ff6600;
    display: block;
}

.progress-bar {
    margin-bottom: 10px;
    width: 100%;
    max-width: 800px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    margin: 2rem 0;
    overflow: hidden;
    justify-content: center;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0080ff);
    border-radius: 15px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

.warning-text {
    color: #ff6600;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
    opacity: 0.8;
}

.success-message {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    animation: fadeIn 0.5s ease;
}

.ip-limit-message {
    background: rgba(255, 100, 0, 0.1);
    border: 1px solid #ff6600;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.debug-info {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    color: #666;
    font-family: monospace;
}

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

/* Responsive - Mobile First */
@media (max-width: 768px) {
    .counter {
        font-size: 3rem;
    }
    .logo {
        font-size: 1.8rem;
        letter-spacing: 0.2rem;
    }
    .stats {
        position: static;
        margin: 2rem auto 0;
        width: 90%;
        max-width: 400px;
    }
    .milestones {
        gap: 0.5rem;
    }
    .milestone-item {
        min-width: 100px;
        max-width: 130px;
        padding: 8px;
    }
    .milestone-number {
        font-size: 1rem;
    }
    .milestone-status {
        font-size: 0.7rem;
    }
    .container {
        padding: 10px;
    }
    .debug-info {
        display: none;
    }
    .progress-bar 
    {
        max-width: 95%;
        margin: 0 auto 10px;
    }
}

@media (max-width: 480px) {
    .counter {
        font-size: 2.5rem;
    }
    .logo {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .milestones {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    .milestone-item {
        width: 100%;
        max-width: 200px;
    }
    .action-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .countdown-timer {
        font-size: 1.2rem;
    }
}

/* Preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo oscuro (ya es oscuro por defecto) */
@media (prefers-color-scheme: light) {
    /* Opcionalmente, podrías añadir estilos para modo claro aquí */
}

/* Print styles */
@media print {
    .matrix-bg, .debug-info {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .logo, .counter {
        -webkit-text-fill-color: black;
        text-shadow: none;
    }
}

