:root {
    --bg-color: #0d0101;
    --panel-bg: rgba(20, 2, 2, 0.8);
    --primary: #e60000;
    --primary-hover: #ff1a1a;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --border: rgba(255, 255, 255, 0.1);
    --error: #e74c3c;
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(230, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 2rem;
}

/* Efectos de Iluminación */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

#orb1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

#orb2 {
    width: 500px;
    height: 500px;
    background: #3498db;
    bottom: -150px;
    right: -100px;
}

/* Contenedor Principal */
.portal-container {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.ascii-art {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.32rem; /* Miniaturización óptica (140cols == 500px) */
    color: #cccccc;
    text-align: center;
    line-height: 1.1;
    white-space: pre;
    margin-bottom: 2rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    letter-spacing: 0;
}

.ascii-accent {
    color: var(--primary);
}

.zls-ascii-white {
    color: #a0a0a0;
}

.zls-ascii-red {
    color: #cc0000;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.5);
}

/* Formulario */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    color: var(--primary);
    font-size: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* Zona de Subida */
.drop-zone {
    width: 100%;
    height: 180px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 1.5rem;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(46, 204, 113, 0.05);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.drop-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Botón Subir */
.submit-btn {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.submit-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Barra de Progreso */
.progress-container {
    display: none;
    margin-top: 1.5rem;
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px var(--primary);
}

.progress-percent {
    text-align: right;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.3rem;
    font-weight: 600;
}

/* Animaciones Ciberpunk (ASCII Flicker) */
@keyframes glitch-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}

.flicker-1 { animation: glitch-flicker 4.2s infinite ease-in-out; }
.flicker-2 { animation: glitch-flicker 3.1s infinite ease-in-out 1.2s; }
.flicker-3 { animation: glitch-flicker 5.5s infinite ease-in-out 0.6s; }

/* Alertas */
.alert {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    display: none;
    text-align: center;
}

.alert.success {
    display: block;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.alert.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

@media (max-width: 500px) {
    body {
        padding: 1rem;
    }
    
    .portal-container {
        padding: 1.5rem;
    }

    .ascii-art {
        font-size: 1.1vw; 
        margin-bottom: 1.5rem;
    }
    
    .zls-title {
        font-size: 1.5rem;
    }
}
