/* ============================================================
   nonton/style.css — Halaman HP kedua via nonton
   Proyek Koneksi Perangkat | JKA DiStore
   Terakhir diubah: 2026-09-14

   Empat lapisan:
     1. .pemutar       — video fullscreen
     2. .kartu-izin    — bottom sheet elegan
     3. .layar-siluman — hitam total (mode siluman)
     4. .layar-ditutup — owner memutus akses
   ============================================================ */

:root {
  --latar: #000;
  --teks: #fff;
  --redup: rgba(255, 255, 255, 0.55);
  --emas: #d4af37;
  --champagne: #f7e7b4;
  --merah: #f87171;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--latar);
  color: var(--teks);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

[hidden] { display: none !important; }

/* ============================================================
   1. PEMUTAR — video fullscreen
   ============================================================ */

.pemutar {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #000;
}

.pemutar__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Bar atas tipis */
.bar-atas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
  z-index: 5;
  pointer-events: none;
}

.bar-atas__logo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--champagne);
}

.bar-atas__judul {
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: var(--redup);
}

/* Tombol suara kecil */
.tombol-suara {
  position: absolute;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, border-color 0.2s, color 0.2s;
}

.tombol-suara:active { transform: scale(0.92); }

.tombol-suara.penyuara {
  border-color: rgba(212, 175, 55, 0.65);
  color: var(--champagne);
}

/* ============================================================
   2. KARTU IZIN — bottom sheet
   ============================================================ */

.kartu-izin {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  transform: translateY(115%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  background:
    linear-gradient(180deg, rgba(24, 22, 16, 0.94), rgba(8, 8, 10, 0.985)),
    #0a0a10;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.65);
  padding: 10px 24px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
}

.kartu-izin.muncul { transform: translateY(0); }

.kartu-izin__pegang {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 16px;
}

.kartu-izin__lencana {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--emas);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
  background: rgba(212, 175, 55, 0.08);
}

.kartu-izin__judul {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(120deg, #fff 30%, var(--champagne));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kartu-izin__teks {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--redup);
}

.kartu-izin__teks b {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.kartu-izin__tombol {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px 20px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #17130a;
  background: linear-gradient(135deg, var(--champagne), var(--emas) 55%, #b8942a);
  box-shadow: 0 12px 34px rgba(212, 175, 55, 0.28);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.kartu-izin__tombol:active { transform: scale(0.97); }
.kartu-izin__tombol:disabled { opacity: 0.65; cursor: wait; }

.kartu-izin__ulang {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  letter-spacing: 0.4px;
  padding: 10px;
  cursor: pointer;
}

.kartu-izin__ulang:active { color: rgba(255, 255, 255, 0.8); }

.pesan-gagal {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #ffb3c0;
  background: rgba(254, 44, 85, 0.1);
  border: 1px solid rgba(254, 44, 85, 0.28);
  padding: 10px 14px;
  border-radius: 12px;
  display: none;
}

.pesan-gagal.tampil { display: block; }

/* ============================================================
   3. LAYAR SILUMAN
   ============================================================ */

.layar-siluman {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  overflow: hidden;
}

.layar-siluman video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: 0;
  top: 0;
}

/* ============================================================
   4. LAYAR DITUTUP
   ============================================================ */

.layar-ditutup {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.layar-ditutup__ikon {
  color: var(--emas);
  margin-bottom: 14px;
}

.layar-ditutup h1 {
  font-size: 21px;
  margin: 0 0 8px;
}

.layar-ditutup p {
  color: var(--redup);
  max-width: 320px;
  line-height: 1.6;
  font-size: 14px;
  margin: 0 0 22px;
}

.layar-ditutup__tombol {
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  color: var(--champagne);
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.layar-ditutup__tombol:active {
  transform: scale(0.97);
  background: rgba(212, 175, 55, 0.15);
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .kartu-izin { transition: none; }
}