/* ==========================================================================
   Variables globales
   ========================================================================== */
:root{
  --bg:#070A12;
  --text:#EAF0FF;
  --muted:rgba(234,240,255,.70);
  --glass:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.12);
  --accent:#7AB0FF;
  --accent2:#B07CFF;
  --radius:18px;
  --shadow: 0 14px 50px rgba(0,0,0,.38);
}

/* ==========================================================================
   Reset y base
   ========================================================================== */
*{box-sizing:border-box}
html{background:var(--bg)}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:transparent;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
.muted{color:var(--muted)}
.small{font-size:.92rem}

/* ==========================================================================
   Fondo: vídeo + overlay
   ========================================================================== */
/* Video de fondo global */
.bgVideo{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  object-fit:cover;
  opacity:.22;
  z-index:-3;
  pointer-events:none;
  filter:saturate(1.05) contrast(1.08);
  transform: translateZ(0) scale(1.03);
}

/* Overlay para legibilidad */
.bgOverlay{
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(circle at 25% 25%, rgba(122,176,255,.14), transparent 45%),
    radial-gradient(circle at 70% 40%, rgba(176,124,255,.10), transparent 55%),
    linear-gradient(to bottom, rgba(7,10,18,.25), rgba(7,10,18,.88));
}

/* ==========================================================================
   Header / navegación
   ========================================================================== */
/* Header */
.header{
  position:sticky;
  top:0;
  z-index:50;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  padding:14px 24px;
  background: rgba(7,10,18,.55);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

.headerLeft{display:flex;align-items:center}
.headerRight{display:flex;justify-content:flex-end;align-items:center}

.copyright{
  font-weight:700;
  letter-spacing:.02em;
  color: rgba(234,240,255,.85);
}

.headerTag{
  font-size:.85rem;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.85);
}

.menu{
  display:flex;
  gap:14px;
  padding:8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.menu a{
  padding:8px 12px;
  border-radius:999px;
  color: rgba(234,240,255,.85);
  transition: background .15s ease, transform .15s ease;
}
.menu a:hover{
  background: rgba(122,176,255,.14);
  transform: translateY(-1px);
}

/* ==========================================================================
   Layout general y utilidades
   ========================================================================== */
/* Layout general */
.container{
  width:min(1100px,92%);
  margin:0 auto;
  padding: 24px 0 60px;
}

.section{
  padding: 28px 0;
}

.sectionHead{
  margin-bottom:14px;
}

.sectionHead h2{
  margin:0 0 6px;
  font-size:1.55rem;
}

/* Contenedor tipo "glass" reutilizable */
.glass{
  background:var(--glass);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* ==========================================================================
   Intro
   ========================================================================== */
/* Intro */
.intro{
  padding: 26px 0 10px;
}
.introCard{
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.introCard h1{
  margin:0 0 10px;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
}
.introCard p{
  margin: 0 0 12px;
  color: rgba(234,240,255,.78);
  line-height:1.55;
}

/* ==========================================================================
   Sección F1 (grid + hover piloto)
   ========================================================================== */
/* F1 grid */
.f1Grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.f1Card{
  position:relative;
  border-radius: 20px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  transform-style: preserve-3d;
  transition: transform .16s ease, box-shadow .16s ease;
}

.f1Card:hover{
  box-shadow: 0 18px 70px rgba(0,0,0,.50);
}

.f1Card .car{
  width:100%;
  height: 180px;
  object-fit: cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
}

.f1Card .pilot{
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  object-fit: contain;
  opacity:0;
  transform: translateY(18px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events:none;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.55));
}

.f1Card:hover .pilot{
  opacity:1;
  transform: translateY(0);
}

.f1Label{
  padding:10px 12px 12px;
  background: linear-gradient(to top, rgba(7,10,18,.72), rgba(7,10,18,0));
  position:absolute;
  left:0;
  right:0;
  bottom:0;
}

.f1Title{
  font-weight:800;
  font-size:.98rem;
}

.f1Sub{
  font-size:.84rem;
  color: rgba(234,240,255,.72);
}

/* Texto de nota bajo secciones */
.note{
  margin-top:10px;
  color: rgba(234,240,255,.70);
  font-size:.92rem;
}

/* ==========================================================================
   Música (playlist + player + letra)
   ========================================================================== */
/* Música */
.musicLayout{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

.playlist{
  padding:14px;
}

.playlistHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.pill{
  font-size:.80rem;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  letter-spacing:.06em;
}

.trackList{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.trackItem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
}

.trackItem:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
}

.trackItem.active{
  border-color: rgba(122,176,255,.40);
  box-shadow: 0 0 0 5px rgba(122,176,255,.08);
}

.trackCover{
  width:44px;
  height:44px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(122,176,255,.55), rgba(176,124,255,.55));
  border:1px solid rgba(255,255,255,.12);
  background-size:cover;
  background-position:center;
}

.trackMeta{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.trackTitle{
  font-weight:800;
  font-size:.95rem;
}

.trackSub{
  font-size:.84rem;
  color: rgba(234,240,255,.70);
}

.player{
  padding:14px;
   overflow:hidden;
}

.nowPlaying{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.npCover{
  width:58px;
  height:58px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, rgba(122,176,255,.55), rgba(176,124,255,.55));
  box-shadow: 0 0 40px rgba(122,176,255,.18);
  background-size:cover;
  background-position:center;
}

.npMeta{
  flex:1;
}

.npTitle{
  font-weight:900;
}

.npSub{
  font-size:.92rem;
}

.npBadge{
  font-size:.80rem;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.playerControls{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.time{
  margin-left:auto;
  display:flex;
  gap:8px;
  font-variant-numeric: tabular-nums;
}

/* Range reutilizable */
.range{
  width:100%;
}

.playerBottom{
  margin-top:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.vol{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:190px;
}

/* Letra dentro del panel del reproductor */
.lyricsPanel{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}

.lyricsHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.lyricsTitle{
  font-weight:900;
}

.lyricsViewport{
  position: relative;
  height: 270px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  padding: 12px 14px;
}

.lyricsList{
  position: relative;         
  left: 0;
  right: 0;
  top: 0;                     
  transform: translateY(0);  
  display:flex;
  flex-direction:column;
  gap:10px;
  transition: transform .20s ease;
  will-change: transform;
}


.lyLine{
  line-height: 1.35;
  font-weight: 800;
  color: rgba(234,240,255,.78);
  opacity: .52;
  transform: scale(.92);
  transform-origin: left center;
  transition: opacity .18s ease, transform .18s ease;
  user-select:none;
  white-space: pre-wrap;
}

.lyLine.prev,
.lyLine.next{
  opacity: .34;
  transform: scale(.86);
}

.lyLine.active{
  opacity: 1;
  transform: scale(1);
  color: rgba(234,240,255,1);
  text-shadow: 0 10px 28px rgba(0,0,0,.55);
}

.lyFaderTop,
.lyFaderBottom{
  pointer-events:none;
  position:absolute;
  left:0;
  right:0;
  height:60px;
  z-index:2;
}

.lyFaderTop{
  top:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.42), transparent);
}

.lyFaderBottom{
  bottom:0;
  background: linear-gradient(to top, rgba(0,0,0,.42), transparent);
}

/* Botones reutilizables */
.btn{
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
  user-select:none;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
}
.btn:active{
  transform: translateY(0);
}
.btn.big{
  padding:12px 14px;
  font-weight:800;
}
.btn.ghost{
  background: transparent;
}

/* ==========================================================================
   Gestor de notas
   ========================================================================== */
/* Gestor de notas */
.notes{
  padding:14px;
}

.notesTop{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}

.notesInput{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}

.notesTextarea{
  width:100%;
  resize: vertical;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
  line-height:1.45;
  margin-bottom:12px;
}

.notesList{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.noteItem{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.noteMeta{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.noteTitle{
  font-weight:900;
  color: rgba(234,240,255,.95);
}

.noteText{
  color: rgba(234,240,255,.72);
  font-size:.92rem;
  line-height:1.35;
  max-width: 720px;
  white-space: pre-wrap;
}

.noteActions{
  display:flex;
  gap:8px;
  align-items:center;
}

/* Variantes de botones usadas en notas */
.btn.small{
  padding:8px 10px;
  border-radius:12px;
  font-weight:700;
}

.btn.danger{
  border-color: rgba(255,120,120,.35);
  background: rgba(255,120,120,.10);
}
.btn.danger:hover{
  background: rgba(255,120,120,.16);
}

/* ==========================================================================
   Pregunta final
   ========================================================================== */
/* Pregunta */
.questionBox{
  padding:16px;
  position:relative;
  min-height: 220px;
}

.qTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.qTitle{
  font-weight:900;
}

.qStatus{
  font-size:.82rem;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.qButtons{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}

.result{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  min-height: 140px;
}

.result img{
  width:170px;
  height:170px;
  object-fit:contain;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 70px rgba(0,0,0,.55);
}

.resultText{
  font-weight:900;
  text-align:center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer{
  margin-top: 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 18px 0 0;
  color: rgba(234,240,255,.70);
  border-top: 1px solid rgba(255,255,255,.10);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px){
  .header{grid-template-columns: 1fr}
  .headerRight{display:none}
  .menu{justify-content:center}
  .f1Grid{grid-template-columns:1fr}
  .musicLayout{grid-template-columns:1fr}
}