/* 1rem = 1/96 lebar layar → tampilan sama di TV 720p/1080p. Tanpa animasi/bayangan berat (box RAM 1 GB). */
:root { --bg: #0d1512; --panel: #16221d; --panel2: #1e2e27; --text: #eef3f0; --muted: #9db3a8; --accent: #2fbf71; --gold: #e9c46a; }
* { box-sizing: border-box; }
html { font-size: calc(100vw / 96); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: default; }
[hidden] { display: none !important; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 2rem 3.5rem 1rem; }
.brand { font-size: 2.6rem; font-weight: 700; color: var(--accent); }
.hbtn { cursor: pointer; font-size: 1.7rem; font-weight: 600; color: var(--text); background: var(--panel); border-radius: .8rem;
  padding: .6rem 1.2rem; margin-right: 1.2rem; vertical-align: middle; border: .3rem solid transparent; }
.hbtn:hover, .hbtn.focus { border-color: var(--accent); }
.logo { height: 6.5rem; display: block; }
.clock { font-size: 2.6rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Beranda */
.bigbtns { display: flex; gap: 3rem; padding: 1rem 3.5rem 2rem; flex: 0 0 auto; }
.big { flex: 1; height: 13rem; background: var(--panel); border-radius: 1.4rem; border: .35rem solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 1.6rem; font-size: 2.8rem; font-weight: 600; color: var(--muted); }
.big .ri { width: 3.6rem; height: 3.6rem; }
.focus { border-color: var(--accent) !important; background: var(--panel2) !important; }
.big.focus { color: var(--text); }
.big.focus .ri { color: var(--accent); }
.ri { width: 1.2em; height: 1.2em; fill: currentColor; flex: 0 0 auto; }
.hbtn, .obtn { display: inline-flex; align-items: center; gap: .6rem; }

.cont { margin: 1rem 3.5rem; display: flex; gap: 2rem; align-items: center; background: var(--panel); border-radius: 1.2rem;
  padding: 1.2rem; border: .4rem solid transparent; }
.cont img { width: 22rem; height: 12.4rem; object-fit: cover; border-radius: .8rem; background: #000; }
.cinfo { flex: 1; min-width: 0; }
.clabel { color: var(--gold); font-size: 1.6rem; font-weight: 600; }
.ctitle { font-size: 2.2rem; font-weight: 600; margin: .4rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmeta { color: var(--muted); font-size: 1.6rem; margin-bottom: .8rem; }

.bar { height: .5rem; background: rgba(255,255,255,.2); border-radius: .3rem; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; width: 0; background: #e53935; }

/* Daftar */
.listbody { flex: 1; display: flex; min-height: 0; padding: 0 3.5rem 2rem 2rem; gap: 2rem; }
.side { width: 19rem; flex: 0 0 auto; display: flex; flex-direction: column; gap: .6rem; }
.tab { padding: 1.1rem 1.4rem; border-radius: .9rem; font-size: 1.75rem; color: var(--muted); border: .35rem solid transparent; }
.tab.sel { color: var(--text); background: var(--panel); font-weight: 600; }
.gridwrap { flex: 1; overflow: hidden; position: relative; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; padding: .6rem; }
.card { background: var(--panel); border-radius: 1rem; overflow: hidden; border: .35rem solid transparent; }
.card.focus { transform: scale(1.04); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; }
.thumb .done { position: absolute; top: .5rem; right: .5rem; background: rgba(0,0,0,.75); color: var(--accent); font-size: 1.2rem; padding: .2rem .6rem; border-radius: .4rem; }
.ct { padding: .7rem .9rem .9rem; }
.ct .t { font-size: 1.45rem; font-weight: 600; line-height: 1.3; height: 3.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct .m { font-size: 1.2rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { font-size: 2rem; color: var(--muted); padding: 3rem; }

/* Pemutar */
#player { background: #000; }
#yt, #player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.osd { position: absolute; left: 0; right: 0; bottom: 0; padding: 6rem 3.5rem 2.5rem; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.9)); }
.shield { position: absolute; inset: 0; z-index: 1; }   /* klik/mouse tetap di halaman, tidak masuk iframe */
.osd { z-index: 2; }
.obtns { display: flex; gap: 1.2rem; margin-bottom: 1.4rem; }
.obtn { pointer-events: auto; cursor: pointer; background: rgba(255,255,255,.15); border-radius: .8rem; padding: .7rem 1.4rem; font-size: 1.6rem; }
.obtn:hover { background: var(--accent); }
.otitle { font-size: 2.6rem; font-weight: 700; }
.ometa { font-size: 1.6rem; color: var(--muted); margin: .4rem 0 1.2rem; }
.otime { display: flex; align-items: center; gap: 1.4rem; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.ohint { margin-top: 1.2rem; font-size: 1.35rem; color: var(--muted); }

.msg { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 70rem; text-align: center;
  background: rgba(10,18,15,.95); border: .3rem solid var(--gold); border-radius: 1.2rem; padding: 2.4rem 3.5rem; font-size: 2.2rem; z-index: 9; }

/* Jadwal sholat di beranda */
.sholat { margin: 0 3.5rem 1rem; display: flex; align-items: stretch; gap: 1.2rem; }
.kotabtn { display: flex; align-items: center; gap: .7rem; padding: 0 1.6rem; background: var(--panel); border-radius: 1.2rem;
  border: .35rem solid transparent; font-size: 1.6rem; color: var(--muted); cursor: pointer; max-width: 22rem; }
.kotabtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kotabtn.focus { color: var(--text); }
.kotabtn.focus .ri { color: var(--accent); }
.ptimes { flex: 1; display: flex; background: var(--panel); border-radius: 1.2rem; overflow: hidden; }
.pt { flex: 1; text-align: center; padding: 1.1rem .5rem; border-right: .15rem solid var(--bg); }
.pt:last-child { border-right: 0; }
.pt .n { font-size: 1.4rem; color: var(--muted); }
.pt .v { font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.pt.next { background: var(--panel2); }
.pt.next .n, .pt.next .v { color: var(--accent); }
.pt .c { font-size: 1.2rem; color: var(--gold); margin-top: .2rem; }
.pt-empty { padding: 1.6rem; font-size: 1.6rem; color: var(--muted); }

/* Pita jadwal di atas video */
.pbar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: .4rem;
  padding: .8rem 2.5rem; background: rgba(8,14,12,.62); font-variant-numeric: tabular-nums; }
.pbar .pk { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; color: var(--muted); margin-right: 1.2rem; white-space: nowrap; }
.pbar .pk .ri { color: var(--accent); }
.pbar .pi { padding: .3rem 1.1rem; border-radius: .7rem; font-size: 1.5rem; color: var(--text); white-space: nowrap; }
.pbar .pi b { font-weight: 400; color: var(--muted); margin-right: .5rem; }
.pbar .pi.next { background: rgba(47,191,113,.25); color: var(--accent); font-weight: 600; }
.pbar .pi.next b { color: var(--accent); }
.pbar .pc { margin-left: auto; font-size: 1.5rem; color: var(--gold); white-space: nowrap; }
.pbar.soon { background: rgba(20,70,45,.75); }

/* Pilih kota */
.search { font-size: 1.8rem; color: var(--gold); min-width: 20rem; text-align: right; }
.klist { flex: 1; overflow: hidden; margin: 0 3.5rem; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: min-content; gap: .6rem 1.2rem; align-content: start; }
.krow { font-size: 1.7rem; padding: .8rem 1.2rem; border-radius: .8rem; border: .3rem solid transparent; color: var(--muted); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.krow.sel { color: var(--accent); }
.krow.focus { color: var(--text); }
.khint { padding: 1.2rem 3.5rem 2rem; font-size: 1.35rem; color: var(--muted); }

/* Layar adzan */
.adzan { position: fixed; inset: 0; z-index: 8; background: rgba(8,14,12,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.adzan .ri { width: 6rem; height: 6rem; color: var(--accent); }
.aname { font-size: 5rem; font-weight: 700; margin-top: 1.5rem; }
.atime { font-size: 3rem; color: var(--gold); margin-top: .5rem; font-variant-numeric: tabular-nums; }
.ahint { font-size: 1.8rem; color: var(--muted); margin-top: 3rem; }

/* Video berikutnya */
.upnext { position: fixed; right: 3rem; bottom: 3rem; z-index: 7; width: 52rem; display: flex; gap: 1.4rem; align-items: center;
  background: rgba(8,14,12,.92); border: .3rem solid var(--accent); border-radius: 1.2rem; padding: 1.2rem; cursor: pointer; }
.upnext img { width: 18rem; height: 10.1rem; object-fit: cover; border-radius: .7rem; background: #000; }
.uinfo { flex: 1; min-width: 0; }
.ulabel { font-size: 1.5rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.utitle { font-size: 1.8rem; font-weight: 600; margin: .4rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.uhint { font-size: 1.3rem; color: var(--muted); }
