/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.screen {
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ========== PANTALLA DE LOGIN ========== */
.login-container {
    max-width: 400px;
    margin: 10vh auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #667eea;
    font-size: 2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* ========== BOTONES ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== MENSAJES DE ERROR ========== */
.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
}

/* ========== PANTALLA PRINCIPAL ========== */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #667eea;
    font-size: 1.5em;
}

.main-content {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
}

/* ========== PANEL DE CONTROLES ========== */
.controls-panel {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 20px;
    align-items: end;
}

@media (max-width: 768px) {
    .controls-panel {
        grid-template-columns: 1fr;
    }
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group .btn {
    flex: 1;
}

/* ========== VISUALIZADOR DE LOGS ========== */
.log-viewer {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.log-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-info {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.loading {
    color: #667eea;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.log-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-content:empty::before {
    content: 'No hay contenido para mostrar...';
    color: #888;
}

/* Scrollbar personalizado */
.log-content::-webkit-scrollbar {
    width: 12px;
}

.log-content::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.log-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .login-container {
        margin: 5vh 20px;
        padding: 30px 20px;
    }
    
    .main-content {
        padding: 0 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .controls-panel {
        padding: 20px;
    }
}

