/* ═══════════════════════════════════════════════════════════════════════════
   Dunia.cam — watch.css
   Styles for the standalone video player page (does not use layout.php).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --accent:     #E8611A;
  --accent-dim: rgba(232,97,26,0.18);
  --bg:         #0C0C0C;
  --surface:    #161616;
  --surface2:   #1e1e1e;
  --border:     rgba(255,255,255,0.08);
  --text-hi:    #F0EDE8;
  --text-lo:    rgba(240,237,232,0.45);
  --bar-bg:     rgba(12,12,12,0.92);
  --radius:     8px;
}
[data-theme="light"] {
  --bg:      #F2EFE9;
  --surface: #E8E4DC;
  --surface2:#DEDAD2;
  --border:  rgba(0,0,0,0.09);
  --text-hi: #111111;
  --text-lo: rgba(17,17,17,0.45);
  --bar-bg:  rgba(242,239,233,0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: var(--text-hi); font-family: 'DM Sans', sans-serif; overflow: hidden; }

.app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  flex-shrink: 0; height: 48px;
  background: var(--bar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1rem; gap: .75rem; z-index: 10;
}
.topbar .logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: .04em; color: var(--text-hi); text-decoration: none; flex-shrink: 0; }
.topbar .logo span { color: var(--accent); }
.topbar .cam-title { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; color: var(--text-lo); }
.badge-live { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent); flex-shrink: 0; }
.live-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(.7); } }
.topbar .timer { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 700; color: var(--text-hi); flex-shrink: 0; }
.back-btn { display: flex; align-items: center; gap: .3rem; color: var(--text-lo); font-size: .78rem; text-decoration: none; flex-shrink: 0; padding: .3rem .55rem; border-radius: 6px; border: 1px solid var(--border); transition: color .15s; }
.back-btn:hover { color: var(--text-hi); text-decoration: none; }
.back-btn svg { width: 13px; height: 13px; }
.theme-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; color: var(--text-lo); background: none; cursor: pointer; flex-shrink: 0; border-radius: 6px; border: 1px solid var(--border); transition: color .15s; }
.theme-btn:hover { color: var(--text-hi); }
.theme-btn svg { width: 15px; height: 15px; }

/* ── Video area ──────────────────────────────────────────────────────────── */
.video-area {
  flex: 1; min-height: 0; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
}
#video { width: 100%; height: 100%; object-fit: contain; display: block; }

.fullscreen-btn {
  position: absolute; bottom: .75rem; right: .75rem;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15);
  color: #fff; width: 34px; height: 34px; border-radius: 7px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 5;
}
.fullscreen-btn:hover { background: rgba(0,0,0,.8); }
.fullscreen-btn svg { width: 17px; height: 17px; }

.session-overlay {
  display: none; position: absolute; inset: 0;
  /* Always a dark scrim, so all text/buttons below are light-on-dark REGARDLESS
     of the site theme — theme tokens (which flip dark in light mode) would make
     this near-invisible. */
  background: rgba(0,0,0,.92); z-index: 20;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
}
.session-overlay.visible { display: flex; }
.session-overlay-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  max-width: 440px;
  animation: session-overlay-in .25s ease-out;
}
@keyframes session-overlay-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.session-overlay h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem; line-height: 1; letter-spacing: .03em;
  color: #fff; margin: 0;
}
.session-overlay p {
  color: rgba(255,255,255,.88); font-size: 1.02rem; line-height: 1.5; margin: 0;
}
.overlay-cooldown {
  font-size: 3rem; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1; margin: .1rem 0;
}
.overlay-actions {
  display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem;
}
.overlay-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.6rem; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: filter .15s, background .15s, color .15s;
}
.overlay-btn-primary   { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.overlay-btn-primary:hover { filter: brightness(1.12); }
.overlay-btn-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.65); }
.overlay-btn-secondary:hover { background: #fff; color: #111; }

/* ── Video info bar ──────────────────────────────────────────────────────── */
.video-info {
  flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.info-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.info-handle { font-size: .78rem; color: var(--accent); font-weight: 700; letter-spacing: .02em; }
.info-title  { font-size: .95rem; font-weight: 700; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-meta   { font-size: .75rem; color: var(--text-lo); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.info-meta a { color: var(--accent); text-decoration: none; }
.info-meta a:hover { text-decoration: underline; }
.meta-sep { opacity: .4; }
.info-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.vote-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text-lo); cursor: pointer; transition: all .15s;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.vote-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.vote-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.share-btn {
  display: flex; align-items: center; gap: .35rem;
  padding: .35rem .85rem; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: .82rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text-lo); cursor: pointer; transition: all .15s;
}
.share-btn:hover { border-color: var(--text-lo); color: var(--text-hi); }
.share-btn svg { width: 15px; height: 15px; }
.share-btn.copied { border-color: #27ae60; color: #27ae60; background: rgba(39,174,96,.12); }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  html, body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; overflow: visible; }
  .video-area { aspect-ratio: 16/9; flex: none; }
  #video { width: 100%; height: 100%; }
  .fullscreen-btn { display: none; }
  .video-info { padding: .65rem 1rem; }
  .info-right { width: 100%; justify-content: flex-start; }
}
