:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: rgba(21, 32, 51, 0.10);
  --text: #141820;
  --muted: #667085;
  --brand: #152033;
  --accent: #c4a574;
  --green: #18e29a;
  --danger: #c23b4a;
  --radius: 16px;
  --shadow: 0 18px 44px rgba(21, 32, 51, 0.08);
  --font: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: linear-gradient(180deg, #fafbfc, var(--bg)); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1180px, 92vw); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav { min-height: 68px; display: flex; align-items: center; gap: 18px; }
.logo { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -.04em; }
.logo b { color: var(--accent); }
.nav-note { margin-inline-start: auto; color: var(--muted); font-size: .86rem; }
.watch-wrap { padding: 34px 0 72px; }
.watch-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.watch-title { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.watch-subtitle { margin: 6px 0 0; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(24,226,154,.09); color: #087953; border: 1px solid rgba(24,226,154,.24); font-size: .8rem; font-weight: 700; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.player-shell { position: relative; background: #000; aspect-ratio: 16/9; display: grid; place-items: center; }
.player-shell video { width: 100%; height: 100%; background: #000; display: block; }
.player-overlay { position: absolute; inset: auto 14px 14px; display: flex; justify-content: space-between; pointer-events: none; }
.player-status { background: rgba(3,8,18,.72); color: white; padding: 7px 10px; border-radius: 9px; font-size: .76rem; backdrop-filter: blur(10px); }
.panel-body { padding: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.info-item { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.info-item small { display: block; color: var(--muted); margin-bottom: 5px; }
.side-card { padding: 18px; }
.side-card h2 { margin: 0 0 10px; font-size: 1rem; }
.side-card p { margin: 0; color: var(--muted); line-height: 1.7; font-size: .88rem; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.telemetry { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; white-space: pre-wrap; background: #0b1020; color: #dce6ff; min-height: 320px; padding: 16px; overflow: auto; }
.lab-controls { display: grid; gap: 10px; padding: 16px; }
.lab-controls input { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: white; }
.lab-controls button { min-height: 44px; border: 0; border-radius: 10px; background: var(--brand); color: white; cursor: pointer; font-weight: 700; }
@media (max-width: 900px) {
  .layout, .lab-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .nav-note { display: none; }
}

.catalog-card { overflow: hidden; }
.catalog-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--border); }
.catalog-head h2 { margin: 0; font-size: 1rem; }
.catalog-head p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.catalog-controls { display: grid; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.catalog-controls input, .catalog-controls select { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 11px; background: white; color: var(--text); font: inherit; }
.catalog-list { max-height: min(68vh, 720px); overflow-y: auto; padding: 6px; }
.channel-row { width: 100%; display: grid; gap: 4px; text-align: start; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 11px 10px; cursor: pointer; color: var(--text); }
.channel-row:last-child { border-bottom: 0; }
.channel-row:hover { background: var(--surface-2); }
.channel-row.is-active { background: rgba(24,226,154,.08); }
.channel-row strong { font-size: .88rem; line-height: 1.35; }
.channel-row span { color: var(--muted); font-size: .72rem; direction: ltr; text-align: start; }
.catalog-more { width: calc(100% - 24px); min-height: 42px; margin: 0 12px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
@media (max-width: 900px) { .catalog-list { max-height: 52vh; } }
