/* ============================================
   EL ARCHIVO INFINITO - ESTILOS PRINCIPALES
   ============================================ */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos del body */
body {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Efecto de escaneo de terminal */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 255, 0, 0) 0%,
        rgba(0, 255, 0, 0.02) 50%,
        rgba(0, 255, 0, 0) 100%
    );
    background-size: 100% 3px;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100vh; }
}

/* Partículas de fondo */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #0f0;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Contenedor principal */
.container {
    max-width: 600px;
    text-align: center;
    animation: fadeIn 2s ease-in;
    position: relative;
    z-index: 10;
}

/* Animación de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Código de acceso */
.access-code {
    font-size: 0.8em;
    opacity: 0.5;
    margin-bottom: 10px;
    letter-spacing: 2px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 0.5; }
    25%, 75% { opacity: 0.2; }
}

/* Título con efecto glitch mejorado */
.glitch {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #f0f;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #0ff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    20% { clip: rect(85px, 9999px, 140px, 0); }
    40% { clip: rect(20px, 9999px, 60px, 0); }
    60% { clip: rect(50px, 9999px, 90px, 0); }
    80% { clip: rect(5px, 9999px, 25px, 0); }
    100% { clip: rect(70px, 9999px, 110px, 0); }
}

/* Timestamp */
.timestamp {
    font-size: 0.85em;
    opacity: 0.6;
    margin-bottom: 20px;
    font-family: monospace;
}

/* Mensaje principal con efecto typing */
.message {
    font-size: 1.2em;
    margin-bottom: 40px;
    opacity: 0.9;
    min-height: 120px;
}

.typing-text {
    display: inline-block;
    border-right: 2px solid #0f0;
    animation: cursor-blink 0.7s infinite;
}

@keyframes cursor-blink {
    0%, 50% { border-color: #0f0; }
    51%, 100% { border-color: transparent; }
}

/* Contenedor del formulario */
.form-container {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #0f0;
    padding: 30px;
    margin-top: 30px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.form-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, #0f0, transparent, #0f0);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-container:hover::before {
    opacity: 0.3;
    animation: border-glow 2s infinite;
}

@keyframes border-glow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Estado de conexión */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85em;
    opacity: 0.7;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #0f0;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px #0f0; }
    50% { opacity: 0.5; box-shadow: 0 0 10px #0f0; }
}

/* Input de email */
input[type="email"] {
    width: 100%;
    padding: 15px;
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    margin-bottom: 15px;
    outline: none;
    transition: all 0.3s;
}

input[type="email"]:focus {
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    border-color: #0ff;
}

input[type="email"]::placeholder {
    color: rgba(0, 255, 0, 0.5);
}

/* Botón de suscripción mejorado */
button {
    width: 100%;
    padding: 15px;
    background: #0f0;
    color: #000;
    border: none;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    box-shadow: 0 0 20px #0f0;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.button-text,
.button-icon {
    position: relative;
    z-index: 1;
}

.button-icon {
    font-size: 0.8em;
}

/* Mensaje de advertencia */
.warning {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.7;
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.warning-icon {
    font-size: 1.2em;
    animation: warning-pulse 2s infinite;
}

@keyframes warning-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Símbolo decorativo mejorado */
.symbol {
    font-size: 3em;
    margin: 20px 0;
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.3s;
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.3));
}

.symbol:hover {
    opacity: 0.6;
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.6));
}

/* Contador de suscriptores */
.subscriber-count {
    margin-top: 20px;
    font-size: 0.85em;
    opacity: 0.5;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
}

#subscriberCount {
    font-weight: bold;
    color: #0ff;
    font-size: 1.2em;
}

/* Mensaje encriptado en footer */
.footer-message {
    margin-top: 30px;
    opacity: 0.3;
    font-size: 0.75em;
    transition: opacity 0.3s;
}

.footer-message:hover {
    opacity: 0.7;
}

.encrypted-text {
    cursor: help;
    letter-spacing: 1px;
}

/* Mensajes de estado */
#status {
    margin-top: 15px;
    padding: 10px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

.success {
    color: #0f0;
    border: 1px solid #0f0;
    background: rgba(0, 255, 0, 0.1);
}

.error {
    color: #f00;
    border: 1px solid #f00;
    background: rgba(255, 0, 0, 0.1);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .glitch {
        font-size: 2em;
    }
    
    .message {
        font-size: 1em;
        min-height: 100px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .symbol {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .glitch {
        font-size: 1.5em;
    }
    
    .message {
        font-size: 0.9em;
        min-height: 80px;
    }
    
    input[type="email"],
    button {
        font-size: 0.9em;
        padding: 12px;
    }
    
    .access-code {
        font-size: 0.7em;
    }
}
