/* Variables Globales y Colores */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-code: #0f172a;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    background-color: var(--bg-card);
    max-width: 650px;
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 48px;
    border: 1px solid var(--border);
    margin: 20px auto;
}

/* --- ESTILOS DE LA CABECERA (Lo que se había perdido) --- */
.header { text-align: center; margin-bottom: 40px; }
.header img.logo { 
    width: 90px; /* Aquí está el remedio para el logo gigante */
    margin-bottom: 20px; 
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)); 
}
.header h1 { font-size: 2rem; color: var(--primary); margin-bottom: 12px; font-weight: 800; letter-spacing: -0.025em; }
.header p { color: var(--text-muted); font-size: 1.1rem; }

/* --- BLOQUES DE CÓDIGO Y JSON --- */
.code-wrapper { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.code-block {
    background-color: var(--bg-code);
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

pre { 
    padding: 32px; 
    overflow-x: auto; 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 0.95rem; 
    color: #cbd5e1; 
    background: var(--bg-code);
}

.json-key { color: #f472b6; }
.json-string { color: #34d399; }
.json-num { color: #fbbf24; }

/* Botones y Acciones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    gap: 8px;
    text-decoration: none;
}

.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: var(--accent); transform: translateY(-1px); }

.btn.secondary { background: var(--border); color: var(--text-main); }
.btn.secondary:hover { background: #cbd5e1; }

.btn.danger { background: var(--danger); color: white; }
.btn.danger:hover { background: var(--danger-hover); transform: translateY(-1px); }

.btn.full-width { width: 100%; }

/* Modales */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; animation: fadeIn 0.3s ease; }

.modal-content {
    background: var(--bg-code);
    width: 100%;
    max-width: 500px;
    border-radius: 14px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.03);
    color: white;
}

.modal-body { padding: 24px; color: #cbd5e1; }

.close-btn { color: #64748b; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.close-btn:hover { color: white; }

/* Notificaciones Toast */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--primary-light);
    color: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid var(--accent);
    animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* Disclaimer y Alertas */
.disclaimer {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.footer { text-align: center; border-top: 1px solid var(--border); padding-top: 24px; font-size: 0.9rem; color: var(--text-muted); }

/* Animaciones */
@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut { to { opacity: 0; transform: scale(0.95); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-out { animation: fadeOut 0.3s ease forwards; }