:root {
  --brand: #00469e;
  --gold: #f6b400;
  --gold-2: #ffcc33;
  --bg: #050b18;
  --panel: #0d1830;
  --line: rgba(255,255,255,.1);
  --text: rgba(255,255,255,.86);
  --muted: rgba(255,255,255,.55);
  --bar-h: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; }

/* top bar */
.bar { height: var(--bar-h); display: flex; align-items: center; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #071226; }
.bar-brand img { height: 28px; width: auto; display: block; }
.bar-info { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-info .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; flex: none; }
.bar-info #roomTxt { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.bar-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.langs { display: flex; gap: 6px; background: rgba(255,255,255,.06); padding: 4px; border-radius: 999px; }
.langs button { display: flex; align-items: center; gap: 6px; border: 0; cursor: pointer; padding: 5px 10px 5px 5px; border-radius: 999px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 600; }
.langs button img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.langs button.on { background: #fff; color: #0d1730; }
.langs button:hover:not(.on) { color: #fff; background: rgba(255,255,255,.08); }
.uilang { display: flex; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); padding: 3px; }
.uilang button { border: 0; background: transparent; color: var(--muted); font: 700 .72rem/1 Inter, sans-serif; padding: 7px 9px; border-radius: 999px; cursor: pointer; }
.uilang button.on { background: var(--gold); color: #1b1300; }
.lbl { font-size: .75rem; color: var(--muted); margin-left: 4px; }
.b { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem; text-decoration: none; color: #fff; background: rgba(255,255,255,.1); white-space: nowrap; }
.b:hover { background: rgba(255,255,255,.18); }
.b-gold { background: var(--gold); color: #1b1300; }
.b-gold:hover { background: var(--gold-2); }
.b.icon { padding: 9px; }
.b.ghost { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); background: transparent; }

/* layout */
.main { height: calc(100% - var(--bar-h)); display: flex; }
.stage-wrap { flex: 1; min-width: 0; display: grid; place-items: center; padding: 18px; }
.sizer { position: relative; }
.sizer { box-shadow: 0 20px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; }
.stage { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: #000; overflow: hidden; }
/* Halaman TV dirender di 1280x720 CSS px seperti WebView TV/STB 1080p (skala 1,5x), lalu dibesarkan ke panggung 1920x1080 */
.stage iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; border: 0; background: #000; transform: scale(1.5); transform-origin: 0 0; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.stage video.on { display: block; }
.skip { position: absolute; right: 40px; bottom: 40px; z-index: 5; border: 0; cursor: pointer; font-size: 26px; padding: 14px 30px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.hidden { display: none !important; }

/* power screen */
.power { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% 30%, #0f3a80 0%, transparent 70%), #03070f; text-align: center; }
.power-in { width: 1100px; }
.power-mark { width: 120px; margin: 0 auto 36px; opacity: .95; }
.power h1 { font: 700 64px/1.1 "Space Grotesk", Inter, sans-serif; color: #fff; margin: 0 0 22px; }
.power p { font-size: 28px; color: var(--muted); margin: 0 0 40px; }
.pw-name { display: inline-flex; flex-direction: column; gap: 12px; text-align: left; font-size: 22px; color: var(--muted); margin-bottom: 44px; }
.pw-name input { width: 620px; font: 500 30px/1.2 Inter, sans-serif; color: #fff; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.2); border-radius: 18px; padding: 18px 24px; }
.pw-name input:focus { outline: none; border-color: var(--gold); }
.pw-btn { display: flex; align-items: center; gap: 18px; margin: 0 auto; border: 0; cursor: pointer; font: 700 34px/1 Inter, sans-serif; padding: 28px 56px; border-radius: 999px; background: var(--gold); color: #1b1300; box-shadow: 0 20px 60px -15px rgba(246,180,0,.7); transition: transform .15s; }
.pw-btn:hover, .pw-btn:focus { transform: scale(1.04); background: var(--gold-2); outline: none; }
.pw-btn[disabled] { opacity: .6; cursor: progress; }
.power .pw-hint { margin: 40px 0 0; font-size: 21px; }

/* toast inside TV */
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; max-width: 1200px; background: rgba(8,16,34,.94); border: 2px solid rgba(246,180,0,.6); color: #fff; font-size: 30px; line-height: 1.35; padding: 26px 40px; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.6); text-align: center; }
.toast b { color: var(--gold-2); }

/* remote */
.remote { width: 230px; flex: none; border-left: 1px solid var(--line); background: var(--panel); padding: 20px 18px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.r-title { font: 700 .75rem/1 Inter, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dpad { position: relative; width: 180px; height: 180px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, #1c2a49 0 40%, #142039 41%); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(0,0,0,.4); }
.dpad button { position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer; width: 56px; height: 56px; border-radius: 50%; font-size: 16px; }
.dpad button:hover { background: rgba(255,255,255,.08); }
.dpad button:active { background: rgba(246,180,0,.25); }
.dpad .up { top: 4px; left: 62px; }
.dpad .down { bottom: 4px; left: 62px; }
.dpad .left { left: 4px; top: 62px; }
.dpad .right { right: 4px; top: 62px; }
.dpad .ok { left: 50px; top: 50px; width: 80px; height: 80px; background: var(--gold); color: #1b1300; font-weight: 700; font-size: 18px; }
.dpad .ok:hover { background: var(--gold-2); }
.r-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.r-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; cursor: pointer; padding: 12px 6px; border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; font-size: .78rem; font-weight: 600; }
.r-btn:hover { background: rgba(255,255,255,.14); }
.r-tips { margin-top: auto; font-size: .8rem; color: var(--muted); }
.r-tips p { margin: 0 0 10px; }
.r-tips b { color: #fff; }

.rotate { display: none; }

@media (max-width: 900px) {
  .remote { display: none; }
  .hide-sm { display: none; }
  .bar-info { display: none; }
  .langs button span { display: none; }
  .langs button { padding: 4px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .rotate { display: block; position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 30; background: rgba(246,180,0,.95); color: #1b1300; font-size: .85rem; font-weight: 600; text-align: center; padding: 10px 14px; border-radius: 12px; }
  .bar { gap: 8px; padding: 0 10px; }
  .bar-brand img { height: 22px; }
  .bar .b-gold span { display: none; }
  .bar .b-gold { padding: 9px; }
  .stage-wrap { padding: 10px; }
}
@media (max-height: 500px) {
  :root { --bar-h: 48px; }
  .remote { display: none; }
  .stage-wrap { padding: 6px; }
}

/* ---------- Kontainer aplikasi (bisa diputar 90° di HP tegak) ---------- */
.app { height: 100%; }
.app.rot { position: fixed; top: 0; left: 0; transform-origin: top left; transform: rotate(90deg) translateY(-100%); }
/* Halaman sekarang memutar diri sendiri di HP, jadi petunjuk "putar ponsel" tidak dipakai lagi */
.rotate { display: none !important; }


