* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --bg: #0b0f19;
  --panel: #111927;
  --panel-2: #161c2a;
  --border: rgba(255,255,255,.08);
  --accent: #00d9d9;
  --accent-ink: #06222a;
  --text: #f5f7fb;
  --text-soft: #a6b0c3;
  --green: #10b981;
  --amber: #ffca28;
  --red: #ff5c5c;
}
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
}
.back-link { color: var(--text-soft); text-decoration: none; font-size: .85rem; }
.back-link:hover { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }

.intro { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.intro-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.intro h1 { font-size: 1.9rem; margin: 0 0 14px; line-height: 1.25; }
.intro p { color: var(--text-soft); line-height: 1.6; font-size: .96rem; }
.intro-actions { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }

.btn-play {
  background: linear-gradient(135deg, var(--accent), #00b8b8);
  color: var(--accent-ink); border: none; border-radius: 10px;
  padding: 13px 26px; font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn-play:hover { transform: translateY(-1px); }
.btn-play:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.subtitle-toggle {
  display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-soft); cursor: pointer;
}
.subtitle-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Contenedor del reel: SIEMPRE vertical (9:16) ---------- */
.reel-wrap { max-width: 420px; margin: 0 auto; position: relative; }
.reel-wrap:fullscreen,
.reel-wrap.pseudo-fullscreen {
  max-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #000;
}
.reel-wrap.pseudo-fullscreen { position: fixed; inset: 0; z-index: 9999; }
/* Fix del margen/aspect-ratio en pantalla completa (doc69): forzar solo la altura y dejar el
   ancho en auto -- si se deja width:100% el canvas pierde la proporción 9:16 en desktop y el
   contenido queda recortado fuera del área visible. */
.reel-wrap:fullscreen .reel-canvas,
.reel-wrap.pseudo-fullscreen .reel-canvas {
  width: auto;
  height: min(100vh, 780px);
  max-width: 100%;
}
body.pseudo-fullscreen-lock { overflow: hidden; }

.btn-reel-fullscreen {
  position: absolute; top: 10px; right: 10px; z-index: 20;
  background: rgba(10,14,22,.75); border: 1px solid var(--border); color: var(--text-soft);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: .95rem;
}
.btn-reel-fullscreen:hover { color: var(--accent); border-color: var(--accent); }

.reel-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 34px;
  border: 10px solid #1c2536;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--border);
  overflow: hidden;
}

.reel-scene { position: absolute; inset: 0; display: flex; flex-direction: column; }
.reel-phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px; background: #05070c; border-radius: 0 0 14px 14px; z-index: 5;
}

/* ---------- Escena A: gancho (sitio genérico, contraste "antes") ---------- */
.reel-scene-hook { background: #05070c; }
.hook-site-mock { position: absolute; inset: 0; padding: 44px 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hook-site-topbar { align-self: stretch; height: 10px; width: 40%; background: rgba(255,255,255,.1); border-radius: 4px; margin-bottom: 8px; }
.hook-site-line { align-self: flex-start; height: 12px; background: rgba(255,255,255,.07); border-radius: 4px; }
.hook-site-line.w70 { width: 70%; }
.hook-site-line.w40 { width: 40%; }
.hook-call-btn {
  margin-top: 40px; padding: 14px 22px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.25);
  color: #7d8798; font-size: .85rem; font-weight: 600; letter-spacing: .01em;
  transition: transform .12s ease;
}
.hook-call-btn.shaking { animation: hookShake .4s ease; border-color: var(--red); color: var(--red); }
@keyframes hookShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.hook-error-x {
  margin-top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,92,92,.14); color: var(--red); font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
  opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .2s ease;
}
.hook-error-x.show { opacity: 1; transform: scale(1); }

/* ---------- Escena B: editor de código (integración) ---------- */
.reel-scene-editor { background: #05070c; align-items: center; justify-content: center; padding: 0 18px; }
.code-editor-window {
  width: 100%; background: #0d1420; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; box-shadow: 0 0 0 1px rgba(0,217,217,0); transition: box-shadow .3s ease;
}
.code-editor-window.glow { box-shadow: 0 0 0 1px rgba(0,217,217,.5), 0 0 26px rgba(0,217,217,.35); }
.code-editor-head {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #111927; border-bottom: 1px solid var(--border);
}
.code-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.code-dot.red { background: #ff5f56; } .code-dot.amber { background: #ffbd2e; } .code-dot.green { background: #27c93f; }
.code-editor-title { margin-left: 8px; font-size: .68rem; color: var(--text-soft); }
.code-editor-body {
  padding: 16px 14px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .62rem; line-height: 1.6;
  color: var(--accent); word-break: break-all; min-height: 70px;
}
.code-line-num { color: #445069; margin-right: 10px; user-select: none; }
.code-cursor { display: inline-block; margin-left: 1px; animation: blink 1s step-end infinite; color: var(--text); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Escena C: widget real de Reservas (sobre el sitio del cliente) ---------- */
.reel-scene-phone { background: #05070c; }
.reel-site-mock { position: absolute; inset: 0; padding: 30px 16px 16px; }
.reel-site-mock-topbar { height: 10px; width: 40%; background: rgba(255,255,255,.12); border-radius: 4px; margin-bottom: 22px; }
.reel-site-mock-hero { display: flex; flex-direction: column; gap: 10px; }
.reel-site-mock-line { height: 12px; background: rgba(255,255,255,.08); border-radius: 4px; }
.reel-site-mock-line.w70 { width: 70%; }
.reel-site-mock-line.w40 { width: 40%; }

/* réplica del tema "oscuro estándar" real del widget (reservas_window.php) */
.aurell-reserva-card {
  position: absolute; left: 14px; right: 14px; bottom: 14px; top: 90px;
  background: #161c2a; border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  padding: 16px 16px 14px; display: flex; flex-direction: column; overflow: hidden;
  animation: popIn .25s ease; box-shadow: 0 14px 40px rgba(0,0,0,.4);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.aurell-reserva-head { font-size: .82rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.aurell-reserva-body { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.aurell-reserva-field label { display: block; font-size: .62rem; font-weight: 600; color: #c7d0de; margin-bottom: 6px; }

.aurell-calendario-mount { position: relative; }
.aurell-cal-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: #0f172a; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  padding: 9px 11px; color: var(--text); font-size: .68rem; cursor: default;
}
.aurell-cal-icon { opacity: .7; font-size: .8rem; }
.aurell-cal-placeholder { color: #8a95a8; }
.aurell-cal-panel {
  margin-top: 6px; background: #0f172a; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  padding: 8px; display: none;
}
.aurell-cal-panel.open { display: block; animation: popIn .18s ease; }
.aurell-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.aurell-cal-head button { background: none; border: none; color: var(--text-soft); font-size: .7rem; }
.aurell-cal-head span { font-size: .6rem; font-weight: 700; text-transform: capitalize; color: var(--text); }
.aurell-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.aurell-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 5px; font-size: .56rem; color: var(--text); background: transparent;
}
.aurell-cal-day.today:not(.selected) { color: #00b8b8; font-weight: 700; }
.aurell-cal-day.selected { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.aurell-cal-day.muted { color: #3c4658; }

.aurell-slots-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.aurell-slot-btn {
  background: #0f172a; border: 1px solid rgba(255,255,255,.12); border-radius: 7px;
  padding: 6px 10px; font-size: .6rem; color: var(--text);
}
.aurell-slot-btn.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

.aurell-precio-box {
  display: flex; align-items: center; justify-content: space-between;
  background: #0f172a; border-radius: 8px; padding: 9px 11px; font-size: .62rem; color: var(--text);
}
.aurell-precio-box strong { color: var(--accent); font-size: .72rem; }

.aurell-form-submit {
  margin-top: 2px; background: var(--accent); color: var(--accent-ink); border: none;
  border-radius: 8px; padding: 10px; font-weight: 700; font-size: .68rem; text-align: center;
}

.aurell-reserva-thanks { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3px; animation: popIn .25s ease; }
.aurell-reserva-thanks-icon {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(0,217,217,.14); color: #00d9d9;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.aurell-reserva-thanks-icon svg { width: 22px; height: 22px; }
.aurell-reserva-thanks h3 { margin: 0 0 6px; font-size: .82rem; color: var(--text); }
.aurell-reserva-thanks p { color: #a9b4c9; margin: 2px 0; font-size: .64rem; }
.aurell-reserva-thanks-precio { font-weight: 700; font-size: .74rem; color: var(--accent) !important; margin-top: 6px !important; }

/* ---------- Escena D: mockup de laptop, panel de la empresa ---------- */
.reel-scene-laptop { background: #05070c; align-items: center; justify-content: center; padding: 0 14px; }
.reel-laptop-mock { width: 100%; animation: popIn .25s ease; }
.reel-laptop-screen {
  background: var(--panel); border: 2px solid #263047; border-radius: 8px 8px 2px 2px;
  aspect-ratio: 16 / 10; overflow: hidden; display: flex; flex-direction: column;
}
.reel-laptop-base { height: 8px; background: linear-gradient(180deg, #263047, #1c2536); border-radius: 0 0 6px 6px; margin: 0 -6px; }
.reel-laptop-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.reservas-mini-panel { padding: 8px 10px; }
.reservas-mini-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .58rem; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.reservas-mini-bell { position: relative; font-size: .7rem; }
.reservas-mini-bell-badge {
  position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff;
  font-size: .46rem; font-weight: 800; border-radius: 50%; width: 13px; height: 13px;
  display: flex; align-items: center; justify-content: center; animation: badgePulse .8s ease;
}
@keyframes badgePulse { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

.reservas-mini-body { flex: 1; display: flex; gap: 8px; min-height: 0; }
.reservas-mini-cal {
  flex: 1.1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; align-content: start;
  background: var(--panel-2); border-radius: 6px; padding: 6px; border: 1px solid var(--border);
}
.reservas-mini-cal-day {
  aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,.03);
  display: flex; align-items: center; justify-content: center; position: relative;
  font-size: .42rem; color: var(--text-soft);
}
.reservas-mini-cal-day.active { background: rgba(0,217,217,.14); color: var(--accent); font-weight: 700; }
.cal-dia-badge {
  position: absolute; bottom: 1px; right: 1px; background: var(--accent); color: var(--accent-ink);
  font-size: .38rem; font-weight: 800; border-radius: 50%; width: 9px; height: 9px;
  display: flex; align-items: center; justify-content: center;
}

.reservas-mini-dia-card { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px; display: flex; flex-direction: column; min-height: 0; }
.reservas-mini-dia-head { font-size: .5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.reservas-mini-dia-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.reservas-mini-dia-item {
  display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.03);
  border-radius: 4px; padding: 4px 5px; font-size: .44rem; color: var(--text);
}
.reservas-mini-dia-item.entering { animation: itemPulse 1s ease; }
@keyframes itemPulse { 0% { background: rgba(0,217,217,.35); } 100% { background: rgba(255,255,255,.03); } }
.reservas-mini-dia-hora { color: var(--accent); font-weight: 700; }

/* ---------- Escena final ---------- */
.reel-scene-outro {
  background: radial-gradient(circle at 50% 40%, #101c2c, #05070c 70%);
  align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px;
  animation: popIn .3s ease;
}
.outro-logo { width: 64px; height: auto; margin-bottom: 4px; }
.outro-brand { font-size: 1.3rem; font-weight: 800; }
.outro-brand span { color: var(--accent); }
.outro-tag { font-size: .7rem; color: var(--text-soft); }
.outro-cta { margin-top: 10px; font-size: .72rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }

/* ---------- Subtítulos ---------- */
.reel-subtitle-bar {
  position: absolute; left: 10px; right: 10px; bottom: 14px; z-index: 10;
  text-align: center; font-size: .82rem; line-height: 1.45; color: var(--text);
  background: rgba(10, 14, 22, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 9px 12px;
  animation: subtitleIn .2s ease;
}
.reel-subtitle-bar.reel-subtitle-top { top: 30px; bottom: auto; }
@keyframes subtitleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.replay-wrap { text-align: center; margin-top: 20px; }
.btn-replay { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

.footnote { max-width: 640px; margin: 36px auto 0; text-align: center; }
.footnote p { color: var(--text-soft); font-size: .78rem; line-height: 1.6; }
.footnote a { color: var(--accent); }

.aurell-reserva-body, .reservas-mini-dia-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
