/* ═══════════════════════════════════════════════
   DesignatorX Live — dark cinematic streaming
   ═══════════════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg-0: #050912;
  --bg-1: #0b1220;
  --bg-2: #111e3d;
  --surface: rgba(20,30,55,.75);
  --surface-2: rgba(30,45,82,.90);
  --border: rgba(255,255,255,.10);
  --border-2: rgba(255,255,255,.20);
  --text: #e8eefc;
  --text-mute: #93a2c4;
  --text-dim: #6b7ea3;
  --cyan: #00E5FF;
  --cyan-2: #14B8A6;
  --cyan-soft: rgba(0,229,255,.15);
  --cyan-glow: rgba(0,229,255,.45);
  --red: #EF4444;
  --red-glow: rgba(239,68,68,.5);
  --gold: #F59E0B;
  --ok: #10B981;
  --danger: #F43F5E;
  --r: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}
html, body { min-height: 100%; background: var(--bg-0); color: var(--text); font-family: 'Cairo', system-ui, sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1200px 800px at 15% -10%, rgba(0,229,255,.13), transparent 60%), radial-gradient(900px 700px at 100% 100%, rgba(20,184,166,.10), transparent 55%), linear-gradient(180deg, var(--bg-0), #030710); background-attachment: fixed; }
body.page-watch, body.page-admin { background: var(--bg-0); }
a { color: var(--cyan); text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 5px; }

/* ─── LANDING ─── */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,9,18,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,229,255,.20), rgba(20,184,166,.10));
  border: 1px solid rgba(0,229,255,.35);
  display: grid; place-items: center;
  color: var(--cyan);
  font-weight: 900;
  font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 16px; }
.brand-name b { color: var(--cyan); font-weight: 900; }
.brand-sub { font-size: 11px; color: var(--text-mute); letter-spacing: 3px; text-transform: uppercase; }

.hero {
  padding: 90px 22px 40px;
  text-align: center;
  max-width: 900px; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: var(--r-pill);
  color: var(--red);
  font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(239,68,68,.6)} 50%{opacity:.7;box-shadow:0 0 0 10px transparent} }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  color: var(--text-mute);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 640px; margin: 0 auto 30px;
  line-height: 1.85;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features {
  max-width: 1180px; margin: 40px auto 60px; padding: 0 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: .3s var(--ease-spring);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(0,229,255,.4); }
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(0,229,255,.15);
  color: var(--cyan);
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--text-mute); font-size: 13px; line-height: 1.7; }

.cta-strip { max-width: 1180px; margin: 0 auto; padding: 20px 22px 100px; }
.cta-inner {
  background: linear-gradient(135deg, rgba(0,229,255,.10), rgba(20,184,166,.05));
  border: 1px solid rgba(0,229,255,.25);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
}
.cta-inner h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin-bottom: 12px; }
.cta-inner p { color: var(--text-mute); max-width: 560px; margin: 0 auto 22px; }

.site-footer {
  padding: 30px 22px;
  border-top: 1px solid var(--border);
  background: rgba(5,9,18,.5);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
.site-footer .foot-links { margin-top: 10px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.site-footer .foot-links a { color: var(--text-mute); font-weight: 700; }
.site-footer .foot-links a:hover { color: var(--cyan); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: .22s var(--ease);
  text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: rgba(255,255,255,.10); transform: translateY(-2px); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 15px; font-weight: 800; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #001218; border-color: transparent;
  box-shadow: 0 12px 30px -10px var(--cyan-glow);
}
.btn-primary:hover { color: #001218; filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--cyan); color: var(--cyan); }
.btn-outline:hover { background: var(--cyan-soft); }
.btn-ghost { background: transparent; color: var(--text-mute); }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ─── WATCH PAGE ─── */
body.page-watch { background: #000; height: 100vh; height: 100dvh; overflow: hidden; }
#a-scene, .aframe-canvas { position: fixed !important; inset: 0 !important; z-index: 1 !important; }

.watch-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.75), transparent);
  display: flex; align-items: center; gap: 12px;
  pointer-events: none;
}
.watch-hud > * { pointer-events: auto; }
.hud-back {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: .18s;
}
.hud-back:hover { background: rgba(0,229,255,.25); border-color: var(--cyan); }
.hud-title { flex: 1; min-width: 0; }
.hud-title strong {
  color: #fff; font-size: 15px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,.7);
  display: block;
}
.hud-title small { color: rgba(255,255,255,.7); font-size: 11px; text-shadow: 0 2px 6px rgba(0,0,0,.7); }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(239,68,68,.85);
  color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.live-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.offline-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(107,126,163,.6);
  color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
}
.viewer-count {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff; font-size: 12px; font-weight: 700;
}

.watch-hud-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  padding: 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  pointer-events: none;
}
.watch-hud-bottom > * { pointer-events: auto; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: .18s;
}
.hud-btn:hover { background: rgba(0,229,255,.25); border-color: var(--cyan); color: #fff; }
.hud-btn.wa { background: rgba(37,211,102,.85); border-color: rgba(37,211,102,1); }
.hud-btn.wa:hover { background: rgba(37,211,102,1); }

/* ─── Offline / password gate ─── */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background:
    radial-gradient(600px 500px at 50% 30%, rgba(0,229,255,.10), transparent 60%),
    linear-gradient(180deg, #030710, #000);
  padding: 24px;
}
.overlay-card {
  max-width: 460px; width: 100%;
  background: var(--surface-2);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 44px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.overlay-emoji { font-size: 52px; margin-bottom: 16px; opacity: .9; }
.overlay-card h2 { font-size: 24px; margin-bottom: 10px; }
.overlay-card p { color: var(--text-mute); font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.overlay-card input {
  width: 100%; padding: 14px 16px;
  border-radius: 10px; border: 1px solid var(--border-2);
  background: rgba(0,0,0,.4); color: var(--text);
  font-family: inherit; font-size: 15px; text-align: center;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.overlay-card input:focus { outline: none; border-color: var(--cyan); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ─── ADMIN ─── */
.admin-layout {
  display: grid; grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--bg-1);
  border-inline-start: 1px solid var(--border);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--text-mute); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: .18s;
  border: 1px solid transparent;
}
.admin-nav-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.admin-nav-item.active {
  background: var(--cyan-soft); color: var(--cyan); border-color: rgba(0,229,255,.30);
}
.admin-main { padding: 28px; overflow: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.admin-header h1 { font-size: 22px; }
.admin-header .sub { color: var(--text-mute); font-size: 13px; margin-top: 4px; }

.card {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 20px; margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-mute); margin-bottom: 6px; letter-spacing: .5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: rgba(0,0,0,.35); color: var(--text);
  font-family: inherit; font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { color: var(--text-mute); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.data-table tr:hover { background: rgba(255,255,255,.03); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge-live { background: rgba(239,68,68,.15); color: var(--red); }
.badge-off  { background: rgba(107,126,163,.20); color: var(--text-mute); }
.badge-en   { background: rgba(16,185,129,.15); color: var(--ok); }
.badge-dis  { background: rgba(245,158,11,.15); color: var(--gold); }

.copy-field {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--border);
  border-radius: 10px;
}
.copy-field code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  word-break: break-all;
  min-width: 0;
}
.copy-field button {
  padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--border-2);
  background: rgba(0,0,0,.3); color: var(--text);
  cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 700;
  transition: .18s;
}
.copy-field button:hover { background: var(--cyan-soft); color: var(--cyan); border-color: var(--cyan); }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); backdrop-filter: blur(18px);
  border: 1px solid var(--border-2);
  color: var(--text); padding: 12px 22px;
  border-radius: 999px; font-weight: 700; font-size: 13px;
  z-index: 1000; opacity: 0; transition: .22s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
.toast.err { border-color: var(--danger); color: var(--danger); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: var(--surface-2); backdrop-filter: blur(18px);
  border: 1px solid var(--border-2); border-radius: 22px;
  padding: 38px 30px; max-width: 400px; width: 100%; text-align: center;
}
.login-card .brand-mark { margin: 0 auto 20px; }
.login-card h1 { font-size: 22px; margin-bottom: 8px; }
.login-card .sub { color: var(--text-mute); font-size: 13px; margin-bottom: 24px; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    flex-direction: row; overflow-x: auto; gap: 4px; padding: 12px;
    border-inline-start: 0; border-bottom: 1px solid var(--border);
  }
  .admin-nav-item { flex-shrink: 0; padding: 8px 12px; font-size: 13px; }
  .admin-main { padding: 18px 14px; }
  .data-table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .nav-inner { padding: 12px 14px; }
  .hero { padding: 50px 18px 30px; }
  .cta-inner { padding: 30px 20px; }
  .watch-hud { padding: 10px 12px; }
  .live-badge, .offline-badge, .viewer-count { padding: 4px 10px; font-size: 10px; }
}
