/* =============================================================================
   Church Streaming Player - White-label theming via CSS custom properties
   :root { --brand-primary, --brand-accent, --brand-bg, --brand-text, --brand-font }
   ============================================================================= */
:root {
  --brand-primary: #1E3A8A;
  --brand-accent: #F59E0B;
  --brand-bg: #0F172A;
  --brand-text: #F8FAFC;
  --brand-font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--brand-font);
  height: 100%;
}

a { color: var(--brand-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.player-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}

.header img.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-text);
}

.header p.sub {
  margin: 2px 0 0;
  opacity: 0.7;
  font-size: 0.9rem;
}

.live-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239,68,68,0.3);
}
.live-badge.on {
  background: #DC2626;
  color: white;
  border-color: #B91C1C;
  animation: pulse 2s infinite;
}
.live-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* Video container */
.video-shell {
  position: relative;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* Off-air slate */
.offair-slate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--brand-primary) 0%, transparent 60%),
              linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.7)),
              var(--brand-bg);
  color: var(--brand-text);
  z-index: 2;
}

.offair-slate.hidden { display: none; }

.offair-slate .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.offair-slate h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  font-weight: 800;
}

.offair-slate p {
  margin: 0;
  opacity: 0.8;
  max-width: 520px;
  line-height: 1.5;
}

.countdown {
  margin-top: 16px;
  display: inline-flex;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.countdown span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 72px;
}
.countdown span b {
  display: block;
  font-size: 1.4rem;
  color: var(--brand-accent);
}
.countdown span i {
  font-style: normal;
  font-size: 0.7rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.retry-note {
  margin-top: 14px;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Controls bar */
.meta-bar {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.btn-primary {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--brand-text);
  border-color: rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }

.status {
  margin-left: auto;
  opacity: 0.6;
  font-size: 0.8rem;
}

/* P2P stats */
.p2p-stats {
  margin-top: 10px;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* VOD list */
.vod-section {
  margin-top: 24px;
}
.vod-section h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.vod-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  transition: background .15s;
}
.vod-card:hover { background: rgba(255,255,255,0.07); }
.vod-card h4 { margin: 0 0 6px; font-size: 0.95rem; }
.vod-card p { margin: 0; opacity: 0.7; font-size: 0.85rem; line-height: 1.4; }

.footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem;
  opacity: 0.5;
  text-align: center;
}

/* Video.js theming overrides */
.video-js .vjs-big-play-button {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.video-js .vjs-control-bar { background: rgba(0,0,0,0.7) !important; }
.video-js .vjs-play-progress { background: var(--brand-accent) !important; }
