/* =========================================================
   ISTORIEN — SCENARIO.CSS
   Panel izquierdo (Fijo + Scroll) + Dock Inferior
   ========================================================= */

:root {
  --bg-main: #060b1a;
  --bg-alt: #0d1324;
  --accent-gold: #d4af37;
  --accent-gold-light: rgba(212, 175, 55, 0.16);
  --text-main: #f5f0e8;
  --text-muted: #c2b9aa;
  --border-soft: rgba(244,236,222,0.14);
  --radius-xl: 24px;
}

/* RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(circle at top, #101632 0, #02040A 45%, #000 100%);
  color: var(--text-main);
  height: 100vh; 
  overflow: hidden; 
  display: flex;
  flex-direction: column;
}

.app-wrapper {
  flex: 1; display: flex; justify-content: center; align-items: stretch;
  padding: 16px; height: 100%; overflow: hidden;
}

.app-shell {
  width: 96%; max-width: 1800px;
  height: 95vh;
  border-radius: 32px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, rgba(212,175,55,0.09), transparent 55%),
              linear-gradient(135deg, rgba(12,19,40,0.96), rgba(5,8,20,0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02);
  padding: 18px; display: flex; flex-direction: column; overflow: hidden; height: 100%; 
  margin: auto;
}

/* HEADER */
.top-bar { display: flex; align-items: center; justify-content: space-between; height: 50px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-logo { width: 40px; height: 40px; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-family: 'Cinzel', serif; letter-spacing: 0.2em; font-size: 13px; text-transform: uppercase; }
.brand-tagline { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); }

/* LANGUAGE SWITCH */
.lang-switch { display: flex; gap: 6px; background: rgba(7, 12, 30, 0.9); border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); padding: 3px; }
.lang-btn { border: none; background: transparent; color: var(--text-muted); font-size: 11px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.lang-btn.active { background: var(--accent-gold-light); color: var(--accent-gold); }

/* MAIN LAYOUT */
.scenario-main {
  display: flex; margin-top: 12px; border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top, rgba(14, 23, 55, 0.9), rgba(5, 8, 20, 0.96));
  flex: 1; min-height: 0; overflow: hidden; position: relative; 
}

/* =========================================
   PANEL IZQUIERDO (REESTRUCTURADO Y COMPACTO)
   ========================================= */

.scenario-panel {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  
  /* 1. SOLUCIÓN AL "TRIÁNGULO" (ESQUINAS) */
  border-top-left-radius: var(--radius-xl);
  border-bottom-left-radius: var(--radius-xl);
  
  /* 2. SOLUCIÓN AL DORADO (MÁS FUERTE) */
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.15), transparent 60%),
    rgba(5,8,20,0.96);
  
  border-right: 1px solid rgba(244,236,222,0.18);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  
  /* Esto ayuda a que el navegador recorte bien los bordes */
  -webkit-mask-image: -webkit-radial-gradient(white, black); 
  mask-image: radial-gradient(white, black);                 
  backdrop-filter: blur(10px); 
}

/* 1. CABECERA FIJA (Padding Reducido) */
.sc-fixed-header {
  padding: 20px 20px 10px 20px;
  background: transparent; 
  border-bottom: none; 
  box-shadow: 0 5px 20px -10px rgba(0,0,0,0.5);
  z-index: 10;
  flex-shrink: 0;
}

/* 2. CUERPO SCROLLEABLE */
.sc-scrollable-content {
  background: transparent; 
  padding: 5px 20px 30px 20px;
  overflow-y: auto;
  flex: 1;
}

/* TEXTOS GENERALES */
.sc-title-row {
  display: flex;
  justify-content: space-between; 
  align-items: center;            
  margin-bottom: 2px;             
}

.sc-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0; 
  line-height: 1.2;
}

/* --- AQUÍ ESTÁ LA CONFIGURACIÓN CORRECTA DEL TOOLTIP (IZQUIERDA) --- */
.sc-route-icon {
  font-size: 18px;
  cursor: pointer;
  position: relative; /* Necesario para ubicar el cartel */
  transition: transform 0.3s ease;
  margin-left: 10px;
  display: flex;
  align-items: center; 
}

.sc-route-icon:hover {
  transform: scale(1.2);
}

.sc-route-icon::after {
  content: attr(data-label); 
  
  /* --- POSICIÓN: IZQUIERDA --- */
  position: absolute;
  top: 50%;           
  right: 125%;        /* Lo empuja hacia la izquierda */
  transform: translateY(-50%); 
  
  /* --- ESTÉTICA --- */
  background: rgba(5, 8, 20, 0.98); 
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-family: 'Cinzel', serif;
  font-size: 9px;    
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 8px;  
  border-radius: 6px;
  white-space: nowrap; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.8); 
  pointer-events: none;
  z-index: 1000;      
  
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.sc-route-icon:hover::after {
  opacity: 1;
  visibility: visible;
  right: 140%; 
}
/* ------------------------------------------------------------- */

.sc-year { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.sc-subtitle {
  font-family: 'Cinzel', serif; font-size: 13px; color: var(--text-muted);
  margin-bottom: 3px; border-bottom: 1px solid var(--border-soft);
  padding-bottom: 5px; line-height: 1.4;
}
.sc-body {
  font-family: 'Inter', sans-serif; font-weight: 300; font-size: 14px; color: #e6e0d4; 
  line-height: 1.8; letter-spacing: 0.03em; text-align: left; hyphens: auto; opacity: 0.95; 
  white-space: pre-line; margin-bottom: 15px;
}
.sc-body::first-letter {
  float: left; font-family: 'Cinzel', serif; font-size: 3.5em; line-height: 0.75;
  padding-right: 8px; padding-top: 4px; color: var(--accent-gold); text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* =========================================
   HERRAMIENTAS DE CABECERA (OPTIMIZADAS 2 COLUMNAS)
   ========================================= */
.sc-header-tools {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 8px;
  margin-top: 10px;
}

.tool-chip {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-soft);
  border-radius: 8px; cursor: pointer; transition: all 0.3s ease; text-decoration: none;
}
.tool-chip:hover { background: rgba(212, 175, 55, 0.1); border-color: var(--accent-gold); transform: translateY(-2px); }

.chip-icon {
  width: 24px; height: 24px; /* Icono más compacto */
  border-radius: 50%; border: 1px solid var(--accent-gold);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--accent-gold);
}

.chip-info { display: flex; flex-direction: column; align-items: flex-start; }
.chip-label { font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.chip-value { font-family: 'Cinzel', serif; font-size: 10px; color: var(--text-main); font-weight: 700; line-height: 1.2; }

.tool-chip.version-btn { border-color: rgba(212, 175, 55, 0.3); background: linear-gradient(90deg, rgba(212,175,55,0.05), transparent); }
.tool-chip.version-btn .chip-value { color: var(--accent-gold); }


/* AREA VISUAL DERECHA */
.scenario-visual {
  flex: 1; background: rgba(0,0,0,0.35); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: 14px;
  padding: 0 !important; overflow: hidden; position: relative; 
}
#panorama { width: 100%; height: 100%; position: relative; background-color: #000; }

/* LISTAS Y BOTONES TEXTO */
.sc-cat-title { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: var(--text-main); margin-top: 12px; margin-bottom: 4px; text-transform: uppercase; opacity: 0.8; }
.sc-list { list-style: none; margin-left: 4px; margin-bottom: 15px; }
.sc-list li { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 6px; position: relative; padding-left: 14px; }
.sc-list li::before { content: "•"; color: var(--accent-gold); position: absolute; left: 0; top: 0; }
.read-more-btn { display: inline-block; margin-top: 12px; margin-bottom: 8px; background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 11px; padding: 8px 16px; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; }
.read-more-btn:hover { background: var(--accent-gold-light); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.hidden-content { display: none; animation: fadeIn 0.5s ease-in-out; }
.hidden-content.visible { display: block; }

/* ACORDEON */
.accordion-header { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-soft); outline: none; cursor: pointer; padding: 17px 10px 17px 0; text-align: left; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.accordion-header:hover { background: rgba(255, 255, 255, 0.03); padding-left: 10px; }
.acc-title { font-family: 'Cinzel', serif; font-size: 14px; color: var(--accent-gold); text-transform: uppercase; }
.acc-icon { color: var(--text-muted); font-size: 10px; transition: transform 0.3s ease; }
.accordion-header.open .acc-icon { transform: rotate(180deg); color: var(--accent-gold); }
.accordion-header.open { border-bottom: 1px solid var(--accent-gold); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; opacity: 0; }
.accordion-content.open { opacity: 1; padding-bottom: 0; }
.accordion-inner { padding: 15px 5px 5px 5px; }


/* NAVEGACION FOOTER */
.sc-nav-group { margin-top: 10px; padding-top: 0; display: flex; justify-content: space-between; gap: 8px; }
.sc-nav-btn { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.sc-nav-btn.secondary { background: transparent; border: 1px solid var(--border-soft); color: var(--text-muted); }
.sc-nav-btn.secondary:hover { border-color: var(--text-muted); color: var(--text-main); background: rgba(255, 255, 255, 0.03); }
.sc-nav-btn.primary { background: rgba(212, 175, 55, 0.1); border: 1px solid var(--accent-gold); color: var(--accent-gold); }
.sc-nav-btn.primary:hover { background: var(--accent-gold); color: #000; box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); }

/* =========================================
   RIGHT DOCK (REDISEÑADO - BARRA INFERIOR)
   ========================================= */

.right-dock {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: row; gap: 12px;
  
  /* Glassmorphism */
  background: rgba(16, 22, 50, 0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 10px 20px; border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100; transition: all 0.3s ease;
  animation: floatUp 0.6s ease-out; 
}
@keyframes floatUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.dock-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: transparent; border: 1px solid transparent;
  color: var(--accent-gold); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; 
}
.dock-btn svg { width: 20px; height: 20px; opacity: 0.8; transition: opacity 0.3s; }
.dock-btn:hover { background: rgba(212, 175, 55, 0.2); border-color: var(--accent-gold); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(212,175,55,0.2); z-index: 1000; }
.dock-btn:hover svg { opacity: 1; }

/* Tooltips de los botones flotantes (POSICIÓN ARRIBA) */
.dock-btn::after {
  content: attr(data-label); 
  position: absolute;
  
  /* --- POSICIONAMIENTO ARRIBA --- */
  bottom: 135%; /* Lo empuja hacia arriba (100% es el borde, 135% deja un hueco) */
  left: 50%;    /* Lo ubica al centro horizontal del botón */
  transform: translateX(-50%); /* Ajuste fino para centrar el cartel perfectamente */
  
  /* Reseteamos propiedades viejas por seguridad */
  top: auto;
  right: auto;
  
  /* --- ESTILO VISUAL --- */
  background: rgba(5,8,20,0.95);
  color: var(--accent-gold);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  text-transform: uppercase;
  border: 1px solid var(--accent-gold);
  white-space: nowrap; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  
  /* --- ANIMACIÓN --- */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10000; 
}

/* Estado Hover */
.dock-btn:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: 150%; /* Pequeña animación: sube un poco más al aparecer */
}
.dock-btn.camera-btn:hover { background: var(--accent-gold); color: #000; }

/* RIGHT DRAWERS & SOCIAL */
.right-drawer { position: absolute; top: 20px; bottom: 20px; right: -350px; width: 320px; background: rgba(5, 8, 20, 0.95); backdrop-filter: blur(10px); border-left: 1px solid var(--accent-gold); border-radius: 20px 0 0 20px; z-index: 200; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.5); }
.right-drawer.open { right: 0; }
.drawer-header { padding: 20px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h3 { font-family: 'Cinzel', serif; color: var(--accent-gold); font-size: 16px; margin: 0; }
.close-drawer { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.drawer-content { padding: 20px; flex: 1; overflow-y: auto; }

/* SOCIAL */
.social-comment { margin-bottom: 20px; border-bottom: 1px solid var(--border-soft); padding-bottom: 15px; }
.sc-user { font-size: 12px; color: var(--accent-gold); font-weight: 700; margin-bottom: 4px; display: flex; justify-content: space-between; }
.sc-text { font-size: 13px; color: var(--text-main); line-height: 1.5; margin-bottom: 8px; }
.sc-actions { display: flex; align-items: center; gap: 15px; }
.sc-vote-btn { background: none; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,0.02); }
.sc-vote-btn:hover { background: rgba(255,255,255,0.08); }
.sc-vote-btn.like:hover { color: #4ade80; }
.sc-reply-trigger { background: none; border: none; color: var(--accent-gold); font-size: 11px; cursor: pointer; font-weight: 600; margin-left: auto; }
.sc-replies-container { display: none; margin-top: 15px; margin-left: 40px; padding-left: 20px; border-left: 3px solid rgba(212, 175, 55, 0.3); background: rgba(255, 255, 255, 0.02); border-radius: 0 8px 8px 0; }
.sc-replies-container.show { display: block; }
.fake-input { margin-top: 20px; background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; color: var(--text-muted); font-size: 12px; font-style: italic; border: 1px dashed var(--border-soft); }

/* GAME ITEMS */
.game-item { border-bottom: 1px solid var(--border-soft); }
.game-trigger { width: 100%; padding: 18px 10px; background: transparent; border: none; color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 14px; text-transform: uppercase; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.game-trigger:hover { background: rgba(255, 255, 255, 0.03); padding-left: 15px; }
.game-details { display: none; padding: 0 10px 20px 10px; }
.game-details.show { display: block; }
.game-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; font-style: italic; }
.start-mission-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0,0,0,0.4)); border: 1px solid var(--accent-gold); color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 11px; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; }
.start-mission-btn:hover { background: var(--accent-gold); color: #000; box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); }
.game-item.locked { opacity: 0.6; }
.game-item.locked .start-mission-btn { cursor: not-allowed; border-color: var(--text-muted); color: var(--text-muted); background: transparent; }

/* FEEDBACK FORM */
.feedback-label { display: block; color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700; margin-bottom: 8px; margin-top: 15px; }
.feedback-input { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-soft); color: var(--text-main); padding: 12px; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 13px; outline: none; }
.feedback-input:focus { border-color: var(--accent-gold); background: rgba(255, 255, 255, 0.08); }

/* CURADOR OVERLAY */
.profile-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 300; align-items: center; justify-content: center; }
.profile-overlay.show { display: flex; }
.profile-card { width: 320px; background: radial-gradient(circle at top left, #1a2035, #050814); border: 1px solid var(--accent-gold); border-radius: 16px; padding: 25px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); position: relative; text-align: center; }
.curator-photo-placeholder { width: 120px; height: 120px; background-color: #000; border: 1px solid var(--accent-gold); margin: 0 auto 15px auto; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; }
.curator-bio { font-size: 13px; line-height: 1.6; color: var(--text-main); text-align: left; opacity: 0.9; margin-bottom: 20px; }
.pc-close { position: absolute; top: 10px; right: 15px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }

/* BOTÓN VOLVER ARRIBA */
.sc-floating-reset {
  position: absolute; bottom: 30px; left: 190px; /* Centrado en 320px + margen */
  width: 45px; height: 45px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.95), #b49018);
  color: #050815; border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  cursor: pointer; z-index: 500;
  opacity: 0; pointer-events: none;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sc-floating-reset.visible { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.sc-floating-reset:hover { transform: scale(1.1); }
.sc-floating-reset svg { width: 24px; height: 24px; fill: currentColor; }

/* Animación de transición para textos */
.fade-text {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}
.fade-text.loading {
  opacity: 0;
}

/* =========================================
   ESTILOS DEL VIDEO MODAL (Agregado Final)
   ========================================= */

.video-modal {
  display: none; /* CRUCIAL: Oculto por defecto */
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.9); 
  backdrop-filter: blur(5px); 
  z-index: 2000; /* Encima de todo */
  justify-content: center; 
  align-items: center; 
  animation: fadeIn 0.3s ease;
}

.video-modal.show { 
  display: flex; /* Solo se muestra cuando tiene la clase .show */
}

.video-container {
  position: relative; 
  width: 90%; 
  max-width: 960px; 
  background: #000;
  border: 1px solid #d4af37; 
  border-radius: 8px; 
  overflow: hidden;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* Estilos para el botón de Fullscreen del Video */
.expand-video-btn {
    position: absolute; 
    top: 10px; 
    right: 50px; /* Lo ponemos a la izquierda del botón de cerrar (que está en right: 10px) */
    width: 30px; 
    height: 30px;
    background: rgba(0,0,0,0.6); 
    border: 1px solid #fff; 
    color: #fff; 
    border-radius: 50%;
    cursor: pointer; 
    z-index: 10; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.expand-video-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.expand-video-btn:hover {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    transform: scale(1.1);
}

/* Tooltip para este botón (Reutilizamos la lógica del dock) */
.expand-video-btn::after {
    content: attr(data-label);
    position: absolute;
    top: 130%; /* Abajo del botón */
    right: 0;
    background: rgba(5,8,20,0.95);
    color: var(--accent-gold);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    text-transform: uppercase;
    border: 1px solid var(--accent-gold);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.expand-video-btn:hover::after {
    opacity: 1;
}

.close-video-btn {
  position: absolute; 
  top: 10px; 
  right: 10px; 
  width: 30px; 
  height: 30px;
  background: rgba(0,0,0,0.6); 
  border: 1px solid #fff; 
  color: #fff; 
  border-radius: 50%;
  cursor: pointer; 
  z-index: 10; 
  font-size: 18px; 
  line-height: 1;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.close-video-btn:hover {
  background: #d4af37;
  color: #000;
  border-color: #d4af37;
}

/* =========================================
   HISTORIAL OVERLAY (TIME TRAVEL MODE)
   ========================================= */

.history-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
  z-index: 3000; padding: 20px;
  align-items: center; justify-content: center;
  animation: fadeIn 0.4s ease;
}
.history-overlay.show { display: flex; }

.history-shell {
  width: 100%; max-width: 1000px; height: 90vh;
  background: #080c18; border: 1px solid var(--accent-gold);
  border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* HEADER */
.history-header {
  height: 50px; background: rgba(212, 175, 55, 0.05);
  border-bottom: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px; flex-shrink: 0;
}
.hist-brand { color: var(--accent-gold); font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 2px; }
.close-history-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-muted); padding: 5px 12px; border-radius: 20px;
  font-size: 10px; cursor: pointer; text-transform: uppercase; transition: 0.3s;
}
.close-history-btn:hover { background: var(--accent-gold); color: #000; border-color: var(--accent-gold); }

/* BODY (GRID) */
.history-body { display: flex; flex: 1; overflow: hidden; }

/* SIDEBAR */
.history-sidebar {
  width: 350px; background: radial-gradient(circle at top left, rgba(212,175,55,0.1), transparent 40%);
  padding: 20px; border-right: 1px solid var(--border-soft);
  overflow-y: auto; display: flex; flex-direction: column;
}

/* TABS (Selector de años) */
.version-selector { display: flex; gap: 8px; margin-bottom: 10px; }
.ver-btn {
  flex: 1; padding: 8px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft); color: var(--text-muted);
  font-family: 'Cinzel', serif; font-size: 11px; cursor: pointer;
  transition: all 0.3s; text-transform: uppercase;
}
.ver-btn:hover { background: rgba(255,255,255,0.1); }
.ver-btn.active { background: var(--accent-gold); color: #000; border-color: var(--accent-gold); font-weight: 700; }

/* TEXT CONTENT */
.hist-section { margin-bottom: 20px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 15px; }
.hist-sect-title { font-family: 'Cinzel', serif; color: var(--accent-gold); font-size: 12px; margin-bottom: 8px; opacity: 0.8; }

.change-block {
  background: linear-gradient(135deg, #d4af37, #b49018);
  padding: 15px; border-radius: 8px; color: #000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); margin-top: 10px;
}
.change-block .sc-body { color: #1a1a1a !important; text-shadow: none; font-weight: 500; }

/* VISUAL */
.history-visual { flex: 1; position: relative; background: #000; }
.history-dock {
  position: absolute; bottom: 15px; right: 15px;
  background: rgba(0,0,0,0.7); padding: 5px 10px; border-radius: 4px;
  border: 1px solid rgba(212,175,55,0.3); pointer-events: none;
}

/* ESTILOS PARA LOS BOTONES DE VERSIÓN (TIPO CHIP) */
.ver-chip {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03); 
  border: 1px solid var(--border-soft);
  border-radius: 12px; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  text-decoration: none;
  text-align: left;
}

.ver-chip:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--accent-gold);
}

/* Estado Activo (Seleccionado) */
.ver-chip.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.ver-chip.active .chip-icon {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.ver-chip.active .chip-label { color: var(--accent-gold); }

/* =========================================
   PERFIL DE USUARIO (CURADOR) - ESTILOS
   ========================================= */

.profile-overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75); 
  backdrop-filter: blur(5px);
  z-index: 3000; /* Z-index alto para estar encima de todo */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.profile-overlay.show { display: flex; }

.profile-card {
  width: 320px;
  /* El degradado elegante que tenías en el original */
  background: radial-gradient(circle at top left, #1a2035, #050814);
  border: 1px solid var(--accent-gold);
  border-radius: 16px;
  padding: 30px 25px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9);
  position: relative;
  text-align: center;
  
  /* Animación de entrada suave hacia arriba */
  transform: translateY(20px);
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp { to { transform: translateY(0); } }

/* Botón de cerrar (X) */
.pc-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.3s;
}
.pc-close:hover { color: #fff; }

/* Avatar / Iniciales (Círculo dorado) */
/* Avatar: Contenedor circular */
.pc-avatar {
  width: 90px;  /* Un poco más grande para que luzca la foto */
  height: 90px;
  background: linear-gradient(135deg, #d4af37, #000);
  border-radius: 50%;
  margin: 0 auto 15px auto;
  
  /* Centrado para cuando sean siglas */
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-family: 'Cinzel', serif;
  font-size: 32px;
  color: #fff;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3); /* Brillo dorado elegante */
  
  overflow: hidden; /* Esto recorta la foto en círculo */
  position: relative;
}

/* La imagen real dentro del círculo */
.pc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Asegura que la foto cubra todo el círculo sin deformarse */
  display: block;
  /* Opcional: Filtro para que encaje con tu app oscura/dorada */
  filter: grayscale(100%) contrast(1.1); 
  transition: filter 0.3s ease;
}

/* Efecto al pasar el mouse: recupera el color */
.profile-card:hover .pc-avatar img {
  filter: grayscale(0%) contrast(1);
}

/* Nombre del Curador */
.pc-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: #fff;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Rol / Institución */
.pc-handle {
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contenedor de la biografía */
.pc-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-bottom: 20px;
}

/* Texto de la biografía */
.curator-bio {
  font-size: 13px;
  color: #ccc;
  line-height: 1.6;
  font-style: italic;
}

/* =========================================
   RESPONSIVE: AJUSTE PARA NOTEBOOKS PEQUEÑAS
   (Pantallas menores a 1400px de ancho)
   ========================================= */

@media (max-width: 1400px) {
  
  /* 1. Achicamos un poco el panel para que no moleste */
  .scenario-panel {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
  }

  /* 2. Re-centramos el botón flotante (mitad de 320 = 160) */
  .sc-floating-reset {
    left: 160px; 
  }
  
  /* 3. Ajustamos un poco los márgenes generales */
  .app-wrapper {
    padding: 10px; /* Menos borde blanco afuera */
  }
}

/* =========================================================
   RESPONSIVE MOBILE (CELULARES Y TABLETS VERTICALES)
   (Pantallas menores a 900px)
   ========================================================= */

@media (max-width: 960px) {

  /* 1. CONTENEDOR PRINCIPAL: Ocupar toda la pantalla sin bordes */
  .app-wrapper {
    padding: 0; /* Quitamos el margen exterior */
    height: 100vh;
  }

  .app-shell {
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 0; /* Quitamos las esquinas redondeadas externas */
    border: none;
    padding: 0; /* Aprovechamos cada pixel */
  }

  /* 2. HEADER: Más compacto */
  .top-bar {
    padding: 0 15px;
    height: 60px; /* Un poco más alto para que los dedos toquen bien */
    background: rgba(5,8,20,0.95); /* Fondo sólido para que se lea */
  }
  
  .brand-name { font-size: 14px; }
  .brand-tagline { display: none; } /* Ocultamos el tagline para ahorrar espacio */

  /* 3. LAYOUT: CAMBIO A COLUMNA (MAGIA AQUÍ) */
  .scenario-main {
    flex-direction: column; /* Apila los elementos verticalmente */
    margin-top: 0;
    border-radius: 0;
    border: none;
  }

  /* 4. VISUAL (ARRIBA) */
  .scenario-visual {
    width: 100%;
    height: 40vh; /* Ocupa el 40% superior de la pantalla */
    order: 1; /* Forzamos a que aparezca PRIMERO */
    border-bottom: 1px solid var(--accent-gold);
  }

  /* 5. PANEL DE TEXTO (ABAJO) */
  .scenario-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 60vh; /* El resto de la pantalla para el texto */
    order: 2; /* Aparece SEGUNDO */
    padding: 20px;
    background: var(--bg-main); /* Fondo sólido */
    border-right: none; /* Quitamos la línea de la derecha */
  }

  /* 6. BOTONES FLOTANTES (DOCK) */
  .right-dock {
    top: 20px; /* Los subimos para que no estorben */
    right: 10px;
    transform: none; /* Quitamos el centrado vertical */
    flex-direction: column;
  }
  
  .dock-btn {
    width: 32px; /* Un poco más chicos */
    height: 32px;
  }
  
  /* Ocultar los tooltips en celular (molestan al tocar) */
  .dock-btn::after { display: none !important; }

  /* 7. PANELES LATERALES (Juegos, Social, etc.) */
  .right-drawer {
    width: 100%; /* Que ocupen toda la pantalla */
    right: -100%; /* Se esconden totalmente a la derecha */
    border-left: none;
    border-radius: 0;
    top: 0;
    bottom: 0;
    z-index: 2000; /* Por encima de todo */
  }
  
  /* 8. MODALES (Curador, Quiz) */
  .profile-card, 
  .game-card {
    width: 90%; /* Casi todo el ancho */
    max-width: none;
    max-height: 85vh; /* Evitar que se salgan de la pantalla */
    overflow-y: auto; /* Scroll si el contenido es largo */
  }

  /* 9. BOTÓN VOLVER ARRIBA */
  .sc-floating-reset {
    left: auto;
    right: 20px; /* Lo movemos a la derecha abajo */
    bottom: 20px;
    transform: scale(0.8);
  }
  
  .sc-floating-reset.visible {
    transform: scale(1);
  }
}

/* Estilo para las opciones del desplegable */
select.feedback-input option {
  background-color: #050814; /* Fondo oscuro (azul casi negro) */
  color: #f5f0e8;            /* Texto claro */
  padding: 10px;
}

/* Asegurar que el select mismo tenga el color correcto al estar cerrado */
select.feedback-input {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   SCROLLBAR MASTER (Degradado Dorado -> Azul)
   ========================================================= */

/* 1. Ancho y Alto */
::-webkit-scrollbar {
  width: 4px;  /* Ancho vertical */
  height: 4px; /* Alto horizontal */
}

/* 2. El Carril (Fondo quieto) */
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2); /* Muy oscuro y sutil */
  border-radius: 3px;
}

/* REEMPLAZA EL BLOQUE DE LA LÍNEA 664 CON ESTO */
::-webkit-scrollbar-thumb {
  /* Usamos 'background' directo, sin recortes */
  background: linear-gradient(to bottom, #d4af37, #050814);
  
  border-radius: 10px;
  
  /* Quitamos el border y el background-clip para que el color se vea lleno */
  border: none; 
}

/* Y aseguramos el HOVER para que brille más */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #f0c952, #101632);
}

/* 5. Esquina (Donde se cruzan horizontal y vertical) */
::-webkit-scrollbar-corner {
  background: transparent;
}
