/* ============================================
   HYPER.CSS - GALERÍA v7
   ============================================ */

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

:root {
    --bg-primary: #F8F5F2;
    --text-primary: #1B3022;
    --gold-matte: #C5A059;
    --text-muted: rgba(27, 48, 34, 0.7);
    --bg-overlay: rgba(27, 48, 34, 0.92);
    --border-gold: rgba(197, 160, 89, 0.3);
    --shadow-gold: rgba(197, 160, 89, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
}

.panel-izquierdo {
    width: 40%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    border-right: 2px solid var(--border-gold);
    display: flex;
    flex-direction: column;
}

.panel-derecho {
    width: 60%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* ===== OVERLAY INICIAL ===== */
#overlayInicial {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 1.5s ease;
}

#overlayInicial.oculto {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    max-width: 700px;
    padding: 40px;
}

.titulo-arte h1 {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 8px;
    line-height: 1.1;
    color: var(--text-primary);
}

.titulo-arte h1:last-child {
    color: var(--gold-matte);
    margin-bottom: 20px;
}

.subtitulo-arte {
    font-size: 18px;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.referentes-arte {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.referentes-arte span {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid var(--border-gold);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 300;
}

.btn-iniciar {
    background: transparent;
    color: var(--gold-matte);
    border: 2px solid var(--gold-matte);
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.btn-iniciar:hover {
    background: var(--gold-matte);
    color: var(--bg-primary);
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--shadow-gold);
}

.duracion {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* ===== PERSONAJE - 20% ===== */
#personajeContainer {
    position: relative;
    width: 100%;
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    background: radial-gradient(ellipse at center, #F8F5F2 0%, #EDE8E2 100%);
}

#personajeImg {
    max-width: 60%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 60px rgba(197, 160, 89, 0.25));
}

/* ===== NOTIFICACIONES - 8% ===== */
#zonaNotificaciones {
    position: relative;
    width: 100%;
    height: 8%;
    flex-shrink: 0;
    overflow: hidden;
    padding: 3px 12px;
    background: rgba(248, 245, 242, 0.6);
    z-index: 3;
    border-bottom: 1px solid var(--border-gold);
}

#notificaciones {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0;
    overflow: hidden;
}

#notificaciones .notif-item {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-gold);
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 10px;
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    height: 20px;
    line-height: 20px;
    animation: notifSlide 0.3s ease;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

/* NOTIFICACIONES BORROSAS - deterioro mental */
#notificaciones .notif-item.blurred {
    filter: blur(2px) brightness(0.7);
    opacity: 0.6;
}

#notificaciones .notif-item.very-blurred {
    filter: blur(4px) brightness(0.5);
    opacity: 0.4;
}

#notificaciones .notif-item.extreme-blurred {
    filter: blur(8px) brightness(0.3);
    opacity: 0.2;
}

#notificaciones .notif-item.distractor { border-left: 3px solid #faa61a; }
#notificaciones .notif-item.exito { border-left: 3px solid #43b581; }
#notificaciones .notif-item.fallo { border-left: 3px solid #ed4245; }

@keyframes notifSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== TAREAS - GALERÍA - 62% ===== */
#zonaTareas {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 8px 12px 8px 12px;
    background: radial-gradient(ellipse at center, #F8F5F2 0%, #EDE8E2 100%);
    min-height: 0;
    z-index: 2;
}

#listaTareas {
    height: 100%;
    overflow-y: auto;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-content: start;
}

#listaTareas::-webkit-scrollbar {
    width: 4px;
}

#listaTareas::-webkit-scrollbar-track {
    background: rgba(197, 160, 89, 0.08);
    border-radius: 2px;
}

#listaTareas::-webkit-scrollbar-thumb {
    background: var(--gold-matte);
    border-radius: 2px;
}

.tarea-item {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    min-height: 65px;
}

.tarea-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tarea-item:active {
    transform: scale(0.95);
}

.tarea-item .tarea-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    flex-wrap: wrap;
}

.tarea-item .tarea-header .categoria {
    font-size: 7px;
    padding: 0 4px;
    border-radius: 6px;
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-matte);
}

.tarea-item .tarea-header .tiempo-restante {
    font-size: 9px;
    font-weight: 700;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(27, 48, 34, 0.06);
}

.tarea-item .tarea-header .tiempo-restante.verde { color: #43b581; }
.tarea-item .tarea-header .tiempo-restante.naranja { color: #faa61a; }
.tarea-item .tarea-header .tiempo-restante.rojo { color: #ed4245; }
.tarea-item .tarea-header .tiempo-restante.negativo { color: #ed4245; background: rgba(237, 66, 69, 0.15); }

.tarea-item .tarea-descripcion {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.7;
    line-height: 1.2;
}

.tarea-item .barra-progreso {
    height: 4px;
    background: rgba(27, 48, 34, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}

.tarea-item .barra-progreso .fill-progreso {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.tarea-item .barra-progreso .fill-progreso.verde { background: #43b581; }
.tarea-item .barra-progreso .fill-progreso.naranja { background: #faa61a; }
.tarea-item .barra-progreso .fill-progreso.rojo { background: #ed4245; }

.tarea-item .clicks-info {
    font-size: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.tarea-item .clicks-info .clicks-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 1px;
}

.tarea-item.incompleta {
    border-color: #ed4245;
    border-style: dashed;
    opacity: 0.7;
}

.tarea-item.incompleta .tiempo-restante {
    background: rgba(237, 66, 69, 0.15) !important;
    color: #ed4245 !important;
}

.tarea-item.eliminando {
    animation: tareaEliminar 0.5s ease forwards;
}

@keyframes tareaEliminar {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }
}

/* ===== MÉTRICAS - 10% ===== */
#metricasArte {
    position: relative;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 5px 14px 7px 14px;
    border-top: 1px solid var(--gold-matte);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
    width: 100%;
    z-index: 2;
    height: auto;
    min-height: 65px;
}

.metrica-arte {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    padding: 1px 0;
}

.metrica-arte .label {
    min-width: 55px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 8px;
    letter-spacing: 0.5px;
}

.metrica-arte .barra-arte {
    flex: 1;
    height: 5px;
    background: rgba(27, 48, 34, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.metrica-arte .barra-arte .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.metrica-arte .barra-arte .fill.atencion { background: #3498DB; }
.metrica-arte .barra-arte .fill.plasticidad { background: #9B59B6; }

.metrica-arte .valor {
    min-width: 38px;
    text-align: right;
    font-weight: 700;
    font-size: 10px;
    color: var(--text-primary);
}

.titulo-fragmentacion {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-matte);
    text-align: center;
    margin-bottom: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border-gold);
}

#fragmentacionDetalle {
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid var(--border-gold);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* ===== PANEL DERECHO - CEREBRO FRAGMENTADO ===== */
#brainCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #ffffff;
}

#indicador {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 11px;
    z-index: 100;
    border: 1px solid var(--gold-matte);
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: none;
}

#indicador span { color: var(--text-primary); }

.btn-reiniciar-arte {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-gold);
    padding: 2px 8px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    margin-left: 5px;
    pointer-events: auto;
}

.btn-reiniciar-arte:hover {
    color: var(--gold-matte);
    border-color: var(--gold-matte);
}

/* ===== TEXTO HOLZER ===== */
.texto-holzer {
    position: absolute;
    z-index: 40;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 20px;
    color: rgba(197, 160, 89, 0.08);
    pointer-events: none;
    transition: all 2s ease;
    max-width: 300px;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 1px;
}

.texto-holzer.activo {
    color: rgba(197, 160, 89, 0.4);
}

/* ===== COLAPSO ===== */
#colapsoModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

#colapsoModal.visible {
    display: flex;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.colapso-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--gold-matte);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.colapso-arte .texto-colapso h1 { font-size: 72px; margin-bottom: 10px; }
.colapso-arte .texto-colapso h2 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: #C0392B;
    letter-spacing: 8px;
    margin-bottom: 15px;
}
.colapso-arte .texto-colapso p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.cita-arte {
    background: rgba(197, 160, 89, 0.08);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 3px solid var(--gold-matte);
}

.cita-arte p {
    font-style: italic;
    font-size: 15px !important;
    margin-bottom: 5px !important;
    color: var(--text-primary) !important;
}
.cita-arte span { font-size: 12px; color: var(--text-muted); }

.estadisticas-finales {
    margin: 20px 0;
    text-align: left;
    background: rgba(197, 160, 89, 0.06);
    padding: 15px 20px;
    border-radius: 8px;
}

.estadisticas-finales p {
    margin: 5px 0 !important;
    font-size: 14px !important;
    color: var(--text-primary);
}

.estadisticas-finales p strong { color: var(--gold-matte); }

.btn-reiniciar-grande {
    background: var(--gold-matte);
    color: var(--bg-primary);
    border: none;
    padding: 14px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-reiniciar-grande:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 30px var(--shadow-gold);
    background: var(--accent-hover);
}

/* ===== CANVAS PARTÍCULAS ===== */
#canvasParticulas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .panel-izquierdo { width: 35%; }
    .panel-derecho { width: 65%; }
    #listaTareas { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    body { flex-direction: column; }
    .panel-izquierdo {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 2px solid var(--border-gold);
    }
    .panel-derecho {
        width: 100%;
        height: 50vh;
    }
    #listaTareas { grid-template-columns: 1fr 1fr; gap: 4px; }
    .tarea-item { padding: 6px 8px; min-height: 55px; }
    .tarea-item .tarea-header { font-size: 9px; }
    .tarea-item .tarea-descripcion { font-size: 8px; }
    #metricasArte { padding: 4px 10px; min-height: 55px; }
    .metrica-arte .label { min-width: 45px; font-size: 7px; }
    .metrica-arte .valor { font-size: 8px; min-width: 30px; }
    .titulo-fragmentacion { font-size: 8px; }
    #fragmentacionDetalle { font-size: 7px; }
    .texto-holzer { font-size: 14px; max-width: 150px; }
    #indicador { font-size: 9px; padding: 4px 10px; top: 8px; }
}

@media (max-width: 480px) {
    #listaTareas { grid-template-columns: 1fr; }
    .tarea-item { min-height: 50px; }
    #personajeContainer { height: 15%; }
    #zonaNotificaciones { height: 10%; }
    #zonaTareas { padding: 4px 6px; }
    .texto-holzer { font-size: 12px; max-width: 120px; }
}
