/* Vortex 4K TV — a 1920×1080 stage driven only by the remote (no mouse). */
:root {
  --bg: #06070b;
  --bg-1: #0d0f16;
  --bg-2: #141722;
  --bg-3: #1d2130;
  --line: #262b3a;
  --text: #eef0f6;
  --dim: #a3a8b8;
  --muted: #6f7486;
  --brand: #7c5cff;
  --brand-2: #22d3c5;
  --gold: #fbbf24;
  --danger: #ff5c7a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--text); }
body {
  font-family: "Samsung One Arabic", "SamsungOneArabic", "LG Smart UI", "Noto Sans Arabic", Tahoma, "Segoe UI", sans-serif;
  font-size: 28px; line-height: 1.4; -webkit-user-select: none; user-select: none;
}
img { display: block; }
[hidden] { display: none !important; }

/* The stage is laid out at 1920×1080 and scaled to the TV's viewport. */
#stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  transform-origin: 0 0;
  background: radial-gradient(ellipse at 70% -10%, #1a1640 0%, var(--bg) 55%, #000 100%);
}
#screens, .screen { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.screen { overflow: hidden; }

/* ------------------------------------------------------------ sidebar */
.side {
  position: absolute; top: 0; bottom: 0; right: 0; width: 128px; z-index: 5;
  background: linear-gradient(to left, #0b0d14 70%, rgba(11, 13, 20, .0));
  padding: 34px 0; display: flex; flex-direction: column; align-items: stretch;
  transition: width .18s ease-out;
}
.side .brand { display: flex; align-items: center; padding: 0 30px 40px; height: 110px; }
.side .brand img { width: 68px; height: 68px; flex: none; border-radius: 16px; }
.side .brand b { font-size: 30px; white-space: nowrap; opacity: 0; transition: opacity .15s; }
.side .si {
  display: flex; align-items: center; height: 86px; margin: 4px 18px; padding: 0 22px;
  border-radius: 18px; color: var(--dim); white-space: nowrap; overflow: hidden;
}
.side .si svg { width: 46px; height: 46px; flex: none; }
.side .si span { opacity: 0; transition: opacity .15s; font-size: 30px; }
.side .si.sel { color: var(--text); }
.side .si.sel svg { color: var(--brand); }
.side .foot { margin-top: auto; padding: 0 30px; color: var(--muted); font-size: 22px; white-space: nowrap; opacity: 0; }
.side.active { width: 400px; background: #0b0d14; box-shadow: -30px 0 60px rgba(0, 0, 0, .6); }
.side.active .brand b, .side.active .si span, .side.active .foot { opacity: 1; }
.side.active .si.cur { background: var(--brand); color: #fff; }
.side.active .si.cur svg { color: #fff; }

/* ------------------------------------------------------------ page */
.page { position: absolute; top: 0; bottom: 0; left: 0; right: 128px; padding: 40px 56px 0 56px; }
.ph { display: flex; align-items: center; height: 80px; margin-bottom: 26px; }
.ph h1 { font-size: 46px; font-weight: 800; }
.ph .sub { margin-right: 22px; color: var(--muted); font-size: 28px; }
.ph .clock { margin-right: auto; color: var(--dim); font-size: 34px; font-variant-numeric: tabular-nums; direction: ltr; }
.cols { display: flex; height: 870px; }
.hint {
  position: absolute; left: 56px; right: 56px; bottom: 22px; display: flex; color: var(--muted); font-size: 23px; justify-content: center;
}
.hint b { color: var(--dim); font-weight: 600; }
.hint i { display: inline-block; width: 20px; height: 20px; border-radius: 50%; vertical-align: -2px; margin-left: 8px; }
.hint .red { background: #e5383b; } .hint .green { background: #2fbf71; } .hint .yellow { background: #f2c94c; } .hint .blue { background: #3d7eff; }

/* ------------------------------------------------------------ lists */
.panel { background: rgba(13, 15, 22, .82); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; position: relative; }
.vlist { position: relative; overflow: hidden; }
.vlist .in { position: absolute; left: 0; right: 0; top: 0; }
.row {
  position: absolute; left: 12px; right: 12px; display: flex; align-items: center; padding: 0 24px; border-radius: 16px; color: var(--dim); white-space: nowrap; overflow: hidden;
}
.row .t { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 29px; }
.row .n { color: var(--muted); font-size: 24px; font-variant-numeric: tabular-nums; min-width: 64px; }
.row .c { color: var(--muted); font-size: 22px; }
.row .logo { width: 96px; height: 60px; flex: none; border-radius: 10px; background: #fff1; object-fit: contain; }
.row .star { color: var(--gold); font-size: 26px; }
.row .play { color: var(--brand-2); font-size: 26px; }
.row.cur { background: var(--bg-3); color: var(--text); }
.zone.active .row.cur { background: var(--brand); color: #fff; box-shadow: 0 10px 30px rgba(124, 92, 255, .35); }
.zone.active .row.cur .n, .zone.active .row.cur .c { color: #e8e3ff; }
.empty { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 28px; text-align: center; padding: 40px; }

/* ------------------------------------------------------------ grid */
.grid { position: relative; overflow: hidden; }
.grid .in { position: absolute; top: 0; right: 0; bottom: auto; left: 0; }
.cell { position: absolute; padding: 14px; }
.card { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: var(--bg-2); position: relative; border: 3px solid transparent; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card.logo-card img { object-fit: contain; padding: 22px; background: #fff1; }
.card .ph-t { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; color: var(--dim); font-size: 26px; }
.card .cap {
  position: absolute; top: auto; right: 0; bottom: 0; left: 0; padding: 40px 16px 14px; font-size: 23px; line-height: 1.3;
  background: linear-gradient(transparent, rgba(0, 0, 0, .92)); color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .tag { position: absolute; top: 12px; right: 12px; padding: 2px 14px; border-radius: 999px; background: rgba(0, 0, 0, .7); font-size: 19px; color: var(--brand-2); }
.card .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: #ffffff30; }
.card .prog i { display: block; height: 100%; background: var(--danger); }
.zone.active .cell.cur .card { border-color: #fff; transform: scale(1.06); box-shadow: 0 18px 44px rgba(0, 0, 0, .7), 0 0 0 6px rgba(124, 92, 255, .55); z-index: 2; }
.zone.active .cell.cur { z-index: 2; }

/* ------------------------------------------------------------ buttons rows */
.btns { display: flex; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 78px; padding: 0 40px;
  border-radius: 18px; background: var(--bg-3); color: var(--text); font-size: 29px; font-weight: 700; white-space: nowrap;
  border: 3px solid transparent;
}
.btn.primary { background: #2a2350; }
.zone.active .btn.cur { background: var(--brand); color: #fff; border-color: #fff; transform: scale(1.05); }
.btn.fav-on { color: var(--gold); }
.zone.active .btn.cur.fav-on { color: #fff; }

/* ------------------------------------------------------------ home */
.tiles { display: flex; height: 300px; margin-bottom: 40px; }
.tile {
  flex: 1; border-radius: 30px; position: relative; overflow: hidden; padding: 40px; display: flex; flex-direction: column;
  justify-content: flex-end; border: 4px solid transparent;
}
.tile svg { position: absolute; top: 34px; left: 40px; width: 110px; height: 110px; opacity: .9; }
.tile b { font-size: 50px; font-weight: 800; }
.tile span { color: #ffffffb0; font-size: 26px; }
.tile.t-live { background: linear-gradient(135deg, #7c5cff, #3b1fa8); }
.tile.t-movies { background: linear-gradient(135deg, #ff5c7a, #9b1d4a); }
.tile.t-series { background: linear-gradient(135deg, #22d3c5, #0e6e8c); }
.tile.t-search { background: linear-gradient(135deg, #364152, #1b2230); flex: .6; }
.zone.active .tile.cur { border-color: #fff; transform: scale(1.04); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.shelf h2 { font-size: 32px; margin: 0 6px 6px; color: var(--dim); }
.shelf { margin-bottom: 18px; }
.hrow { position: relative; overflow: hidden; height: 270px; }
.hrow .in { position: absolute; top: 0; bottom: 0; right: 0; display: flex; transition: transform .2s ease-out; }
.hrow .cell { position: relative; flex: none; }

/* ------------------------------------------------------------ live */
.preview { flex: 1; display: flex; flex-direction: column; padding: 46px; }
.preview .big { height: 300px; border-radius: 24px; background: #ffffff0d; display: flex; align-items: center; justify-content: center; margin-bottom: 34px; }
.preview .big img { max-width: 70%; max-height: 72%; object-fit: contain; }
.preview .big .ini { font-size: 90px; font-weight: 800; color: var(--muted); }
.preview .num { color: var(--brand-2); font-size: 30px; font-variant-numeric: tabular-nums; }
.preview h2 { font-size: 42px; line-height: 1.25; margin: 6px 0 10px; }
.preview .cat { color: var(--dim); font-size: 27px; margin-bottom: 30px; }
.preview .btns { margin-top: auto; }

/* ------------------------------------------------------------ details */
.details { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.details .bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-size: cover; background-position: center; filter: blur(30px) brightness(.35); transform: scale(1.15); }
.details .shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to left, rgba(6, 7, 11, .3), rgba(6, 7, 11, .95) 75%); }
.details .body { position: absolute; top: 70px; right: 90px; bottom: 70px; left: 90px; display: flex; }
.details .poster { width: 460px; height: 690px; flex: none; border-radius: 26px; overflow: hidden; background: var(--bg-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.details .poster img { width: 100%; height: 100%; object-fit: cover; }
.details .info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.details h1 { font-size: 60px; line-height: 1.2; margin-bottom: 18px; }
.details .meta { display: flex; flex-wrap: wrap; color: var(--dim); font-size: 27px; margin-bottom: 26px; }
.details .meta span { background: #ffffff14; padding: 4px 18px; border-radius: 999px; }
.details .plot { color: #d5d8e2; font-size: 29px; line-height: 1.6; max-height: 280px; overflow: hidden; margin-bottom: 36px; }
.details .cast { color: var(--muted); font-size: 24px; margin-bottom: 30px; max-height: 70px; overflow: hidden; }
.seasons { margin: 10px 0 8px; flex-wrap: wrap; }
.seasons .btn { margin-bottom: 12px; }
.seasons .btn { height: 64px; padding: 0 30px; font-size: 26px; }
.seasons .btn.sel { box-shadow: inset 0 -4px 0 var(--brand-2); }
.eps { flex: 1; }

/* ------------------------------------------------------------ search / login keyboard */
.kb { width: 760px; flex: none; padding: 26px; }
.kb .field {
  height: 92px; border-radius: 18px; background: #000a; border: 2px solid var(--line); padding: 0 28px; display: flex; align-items: center;
  font-size: 36px; margin-bottom: 22px; overflow: hidden; white-space: nowrap;
}
.kb .field .caret { display: inline-block; width: 3px; height: 44px; background: var(--brand-2); margin: 0 3px; animation: blink 1s steps(1) infinite; }
.kb .field .ph-t { color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
.keys { position: relative; }
.key {
  position: absolute; height: 74px; border-radius: 14px; background: var(--bg-3); display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--text); border: 3px solid transparent;
}
.key.fn { background: #262b3d; font-size: 25px; color: var(--dim); }
.key.ok { background: #2a2350; color: #fff; }
.zone.active .key.cur { background: var(--brand); color: #fff; border-color: #fff; transform: scale(1.08); z-index: 1; }

.login { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; }
.login .intro { width: 640px; }
.login .intro img { width: 150px; height: 150px; border-radius: 34px; margin-bottom: 30px; }
.login .intro h1 { font-size: 64px; margin-bottom: 10px; }
.login .intro p { color: var(--dim); font-size: 30px; margin-bottom: 40px; }
.login .fields .lf {
  height: 100px; border-radius: 20px; background: #000a; border: 3px solid var(--line); padding: 0 30px; margin-bottom: 22px;
  display: flex; align-items: center; font-size: 34px; white-space: nowrap; overflow: hidden;
}
.login .fields .lf small { color: var(--muted); font-size: 24px; width: 170px; flex: none; }
.login .fields .lf .v { direction: ltr; text-align: right; flex: 1; overflow: hidden; }
.login .fields .lf.on { border-color: var(--brand-2); }
.zone.active .lf.cur { border-color: #fff; background: #1b1840; }
.login .fields .go { width: 100%; height: 96px; font-size: 34px; }
.login .err { color: var(--danger); font-size: 27px; min-height: 44px; margin-top: 10px; }
.login .kb { background: rgba(13, 15, 22, .85); border: 1px solid var(--line); border-radius: 28px; }

/* ------------------------------------------------------------ player */
.player { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #000; }
.player video, .player object { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; background: #000; }
.player.av { background: transparent; }
.osd {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 80px 90px 60px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .9) 45%); transition: opacity .25s;
}
.osd.gone { opacity: 0; }
.osd .lv { display: flex; align-items: center; }
.osd .lv .num { font-size: 64px; font-weight: 800; color: var(--brand-2); font-variant-numeric: tabular-nums; min-width: 120px; }
.osd .lv .logo { width: 170px; height: 104px; border-radius: 16px; background: #ffffff14; object-fit: contain; padding: 8px; }
.osd .lv h2 { font-size: 50px; line-height: 1.2; }
.osd .lv .cat { color: var(--dim); font-size: 28px; }
.osd .lv .clock { margin-right: auto; font-size: 44px; color: var(--dim); direction: ltr; font-variant-numeric: tabular-nums; }
.osd h2.vt { font-size: 46px; margin-bottom: 26px; }
.osd .bar { height: 12px; border-radius: 6px; background: #ffffff30; position: relative; direction: ltr; }
.osd .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--brand); }
.osd .bar b { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; }
.osd .bar s { position: absolute; top: -12px; bottom: -12px; width: 4px; background: var(--brand-2); margin-left: -2px; }
.osd .times { display: flex; justify-content: space-between; direction: ltr; margin-top: 16px; font-size: 30px; color: var(--dim); font-variant-numeric: tabular-nums; }
.osd .times .seek { color: var(--brand-2); font-weight: 700; }
.osd .keys-h { margin-top: 18px; color: var(--muted); font-size: 23px; text-align: center; }
.pmsg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 1100px; padding: 36px 56px; border-radius: 26px;
  background: rgba(0, 0, 0, .82); font-size: 32px; text-align: center; line-height: 1.6;
}
.pmsg .spin { margin: 0 auto 20px; }
.pause-ic { position: absolute; top: 50%; left: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; }
.pause-ic:before, .pause-ic:after { content: ""; width: 26px; height: 80px; background: #fff; margin: 0 12px; border-radius: 6px; }
.numbox { position: absolute; top: 60px; left: 80px; padding: 10px 40px; border-radius: 22px; background: rgba(0, 0, 0, .8); font-size: 90px; font-weight: 800; color: var(--brand-2); font-variant-numeric: tabular-nums; direction: ltr; }
.chpanel { position: absolute; top: 0; bottom: 0; right: 0; width: 760px; background: rgba(8, 9, 14, .94); padding: 40px 26px; box-shadow: -40px 0 80px rgba(0, 0, 0, .6); }
.chpanel h3 { font-size: 34px; margin: 0 16px 20px; color: var(--dim); }
.nextup { position: absolute; left: 80px; bottom: 260px; padding: 26px 40px; border-radius: 22px; background: rgba(0, 0, 0, .85); font-size: 30px; border: 3px solid var(--brand); }

/* ------------------------------------------------------------ overlays */
#dialog { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .7); display: flex; align-items: center; justify-content: center; z-index: 50; }
#dialog .box { width: 980px; padding: 56px 60px; border-radius: 32px; background: #12141d; border: 1px solid var(--line); text-align: center; box-shadow: 0 40px 100px #000; }
#dialog h2 { font-size: 44px; margin-bottom: 16px; }
#dialog p { color: var(--dim); font-size: 30px; margin-bottom: 40px; line-height: 1.6; }
#dialog .btns { justify-content: center; }
#toast { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 22px 46px; border-radius: 999px; background: rgba(20, 22, 32, .95); border: 1px solid var(--line); font-size: 29px; z-index: 60; white-space: nowrap; }
#loading { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; z-index: 40; background: rgba(0, 0, 0, .25); }
#loading i, .spin { display: block; width: 90px; height: 90px; border-radius: 50%; border: 9px solid #ffffff22; border-top-color: var(--brand); animation: spin .8s linear infinite; }
.spin { width: 64px; height: 64px; border-width: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* flex gaps as margins (old TV browsers lack flex `gap`) */
.side .brand > * + * { -webkit-margin-start: 18px; margin-inline-start: 18px; }
.side .si > * + * { -webkit-margin-start: 24px; margin-inline-start: 24px; }
.cols > * + * { -webkit-margin-start: 34px; margin-inline-start: 34px; }
.hint > * + * { -webkit-margin-start: 40px; margin-inline-start: 40px; }
.row > * + * { -webkit-margin-start: 20px; margin-inline-start: 20px; }
/* ------------------------------------------------------------ buttons rows */
.btns > * + * { -webkit-margin-start: 22px; margin-inline-start: 22px; }
.btn > * + * { -webkit-margin-start: 14px; margin-inline-start: 14px; }
/* ------------------------------------------------------------ home */
.tiles > * + * { -webkit-margin-start: 34px; margin-inline-start: 34px; }
.details .body > * + * { -webkit-margin-start: 70px; margin-inline-start: 70px; }
.details .meta > * + * { -webkit-margin-start: 18px; margin-inline-start: 18px; }
.login > * + * { -webkit-margin-start: 90px; margin-inline-start: 90px; }
.login .fields .lf > * + * { -webkit-margin-start: 24px; margin-inline-start: 24px; }
.osd .lv > * + * { -webkit-margin-start: 34px; margin-inline-start: 34px; }
