/* ────────────────────────────────────────────────────────────────
   BocheTV — Estilos
   ──────────────────────────────────────────────────────────────── */

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

:root {
  --bg:         #08090f;
  --card-bg:    rgba(14, 17, 30, 0.85);
  --accent:     #e8292f;
  --accent2:    #ff6c35;
  --border:     rgba(255,255,255,0.09);
  --text:       #f0f2f8;
  --muted:      #5c677d;
  --radius:     18px;
  --font:       'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Screens ─────────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Background glows ────────────────────────────────────────── */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}
.bg-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,41,47,0.18) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: drift1 12s ease-in-out infinite alternate;
}
.bg-glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(30,60,200,0.14) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation: drift2 15s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(40px, 40px); } }
@keyframes drift2 { to { transform: translate(-40px, -30px); } }

/* CRT scanlines overlay */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
}

/* ── Register screen layout ──────────────────────────────────── */
.register-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  gap: 28px;
}

/* ── Logo ────────────────────────────────────────────────────── */
.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#logo-img {
  max-width: 220px;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(232,41,47,0.55));
}

.logo-fallback {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -2px;
  color: #fff;
  text-shadow: 0 0 40px rgba(232,41,47,0.5);
  line-height: 1;
}
.logo-fallback span { color: var(--accent); }

.signal-dots {
  display: flex;
  gap: 6px;
}
.signal-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s ease-in-out infinite;
}
.signal-dots span:nth-child(2) { animation-delay: .2s; opacity: .7; }
.signal-dots span:nth-child(3) { animation-delay: .4s; opacity: .4; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

/* ── Access card ─────────────────────────────────────────────── */
.access-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
}

.card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.live-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,41,47,0.15);
  border: 1px solid rgba(232,41,47,0.4);
  color: #ff5b5b;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.5s ease-in-out infinite;
  flex-shrink: 0;
  display: inline-block;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,41,47,.6); }
  50%       { box-shadow: 0 0 0 5px rgba(232,41,47,0); }
}

.access-card h1 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.3px;
}

.subtitle {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ── Form ────────────────────────────────────────────────────── */
.field-wrap {
  position: relative;
  margin-bottom: 14px;
}
.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
#input-email {
  width: 100%;
  padding: 15px 16px 15px 46px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#input-email:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,41,47,.18);
}
#input-email::placeholder { color: #3a4259; }

.msg-error {
  color: #fc8585;
  font-size: .82rem;
  min-height: 18px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.btn-watch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent2) 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 6px 24px rgba(232,41,47,.38);
}
.btn-watch svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-watch:hover  { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(232,41,47,.48); }
.btn-watch:active { transform: translateY(0); }
.btn-watch:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.privacy {
  color: #303850;
  font-size: .75rem;
  text-align: center;
  margin-top: 18px;
  line-height: 1.5;
}

/* ── Player screen ───────────────────────────────────────────── */
#screen-player {
  background: #000;
  flex-direction: column;
}

.player-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.82) 0%, transparent 100%);
  transition: opacity .3s;
}
.player-bar.hidden { opacity: 0; pointer-events: none; }

.bar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-logo img  { height: 30px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(232,41,47,.5)); }
.bar-logo span { font-size: 1.05rem; font-weight: 800; color: #fff; }
.bar-logo b    { color: var(--accent); }

.bar-live {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(232,41,47,.9);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 4px;
}

.btn-exit {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .2s;
  flex-shrink: 0;
}
.btn-exit svg { width: 16px; height: 16px; }
.btn-exit:hover { background: rgba(255,255,255,.2); }

.player-wrap {
  position: absolute;
  inset: 0;
}

.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #000;
  color: var(--muted);
  z-index: 5;
  font-size: .9rem;
  transition: opacity .3s;
}
.player-loading.hidden { opacity: 0; pointer-events: none; }

.spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* ── PWA install toast ───────────────────────────────────────── */
.pwa-toast {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom), 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: rgba(20,22,38,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: #c0c8e0;
  white-space: nowrap;
  backdrop-filter: blur(20px);
  z-index: 999;
  cursor: pointer;
  transition: opacity .4s, transform .4s;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.pwa-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pwa-toast span { font-size: 1.2rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 420px) {
  .logo-fallback { font-size: 2.6rem; }
  .access-card   { padding: 26px 18px 22px; }
  .register-wrap { padding: 16px; gap: 20px; }
}
@media (max-height: 600px) {
  .logo-area { gap: 6px; }
  .logo-fallback { font-size: 2rem; }
  .signal-dots { display: none; }
  .register-wrap { gap: 14px; }
  .access-card { padding: 20px 18px 18px; }
  .subtitle { display: none; }
}

/* ── Player controls (bottom bar) ────────────────────────────── */
.player-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
  transition: opacity .3s;
}
.player-controls.hidden { opacity: 0; pointer-events: none; }

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
  padding: 0;
}
.ctrl-btn:hover  { background: rgba(255,255,255,.26); }
.ctrl-btn:active { transform: scale(.92); }
.ctrl-btn svg    { width: 18px; height: 18px; pointer-events: none; }

/* Volume slider */
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff 100%, rgba(255,255,255,.25) 100%);
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.6);
  transition: transform .1s;
}
.vol-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.vol-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 420px) {
  .vol-slider { width: 70px; }
  .ctrl-btn   { width: 36px; height: 36px; }
}
/* === Stats bar === */
.stats-bar { display:flex; align-items:center; gap:8px; margin-top:14px; padding:8px 12px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07); border-radius:8px; font-size:.72rem; color:#778; text-align:center; justify-content:center; line-height:1.4; word-break:break-word; }
.stats-dot { width:6px; height:6px; background:#22c55e; border-radius:50%; flex-shrink:0; animation:pulse 2s infinite; }
.stats-cards{display:none;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px;width:100%}.stat-card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:14px 8px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;}.stat-num{font-size:1.6rem;font-weight:700;color:#fff;line-height:1}.stat-lbl{font-size:.65rem;color:#778;text-transform:uppercase;letter-spacing:.06em}.input-error{border:1.5px solid #e53e3e !important;animation:shake .3s ease}@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}.bar-center{display:flex;flex-direction:column;align-items:center;gap:5px}.bar-viewers{display:flex;align-items:center;gap:4px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.12);border-radius:99px;padding:2px 9px;font-size:.7rem;color:#ddd;backdrop-filter:blur(4px)}/* === PWA Install Banner === */
.pwa-banner{position:fixed;bottom:0;left:0;right:0;z-index:9999;display:flex;align-items:center;gap:12px;padding:14px 16px;background:linear-gradient(135deg,#1a1d2e,#0f1120);border-top:1px solid rgba(255,255,255,.12);box-shadow:0 -4px 24px rgba(0,0,0,.6);transform:translateY(110%);transition:transform .4s cubic-bezier(.34,1.56,.64,1);font-family:system-ui,sans-serif}
.pwa-banner-show{transform:translateY(0)}
.pwa-banner-icon{width:48px;height:48px;border-radius:12px;flex-shrink:0}
.pwa-banner-info{flex:1;min-width:0}
.pwa-banner-info strong{display:block;color:#fff;font-size:.95rem}
.pwa-banner-info span{color:#888;font-size:.75rem}
.pwa-btn-install{flex-shrink:0;background:#e53e3e;color:#fff;border:none;border-radius:8px;padding:8px 18px;font-size:.85rem;font-weight:600;cursor:pointer;transition:background .2s}
.pwa-btn-install:hover{background:#c53030}
.pwa-btn-dismiss{flex-shrink:0;background:none;border:none;color:#666;font-size:1.1rem;cursor:pointer;padding:4px 8px;line-height:1}
.pwa-btn-dismiss:hover{color:#aaa}.pwa-banner-ios .pwa-banner-info span{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ios-share-icon{width:16px;height:16px;vertical-align:middle;display:inline-block}.ios-share-icon path,.ios-share-icon polyline,.ios-share-icon line{stroke:#e53e3e}.pwa-banner-info em{color:#fff;font-style:normal;font-weight:600}.ios-arrow-down{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #1a1d2e}