/* ============================================================
   halaman-link/style.css — UI feed video vertikal
   Proyek Koneksi Perangkat | JKA DiStore
   Terakhir diubah: 2026-09-14
   ============================================================ */

:root {
  --merah: #FE2C55;
  --biru: #25F4EE;
  --latar: #000000;
  --teks: #ffffff;
  --teks-lembut: rgba(255, 255, 255, 0.55);
  --garis: rgba(255, 255, 255, 0.10);
  --radius: 12px;
  --bayangan: 0 18px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #0b0b10;
  color: var(--teks);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ---------- Bingkai ponsel ---------- */
.ponsel {
  position: relative;
  width: min(100vw, 100vh * 9 / 16);
  height: min(100vh, 100vw * 16 / 9);
  max-width: 480px;
  max-height: 854px;
  background: var(--latar);
  overflow: hidden;
  box-shadow: var(--bayangan);
}
@media (max-width: 520px), (max-height: 560px) {
  body { align-items: stretch; justify-content: stretch; }
  .ponsel {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    box-shadow: none;
  }
}

/* ---------- Video ---------- */
.video-wrap {
  position: absolute;
  inset: 0;
  background: #05050c;
}
.video-utama {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 14%, transparent 55%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- Bilah atas ---------- */
.atas {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 0.9rem 1rem 0.4rem;
  font-size: 0.95rem;
}
.atas__tab {
  color: var(--teks-lembut);
  font-weight: 600;
  padding: 0.2rem 0.1rem;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.95rem;
}
.atas__tab--aktif { color: var(--teks); }
.atas__tab--aktif::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.45rem;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--teks);
}
.atas__aksi {
  position: absolute;
  right: 0.9rem;
  top: 0.85rem;
  display: flex;
  gap: 0.9rem;
  color: var(--teks);
}
.atas__aksi button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.1rem;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* ---------- Chip status ---------- */
.chip-status {
  position: absolute;
  top: 3.4rem;
  left: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teks-lembut);
}
.chip-status__titik {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.chip-status--menghubungkan { color: var(--biru); }
.chip-status--menghubungkan .chip-status__titik { animation: denyut 0.9s infinite alternate; }
.chip-status--terhubung { color: #2ecc71; }
.chip-status--terputus { color: var(--merah); }

@keyframes denyut {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

/* ---------- Rail aksi kanan ---------- */
.rail {
  position: absolute;
  right: 0.55rem;
  bottom: 5.4rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}
.rail__tombol {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: none;
  border: none;
  color: var(--teks);
  cursor: pointer;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55));
}
.rail__angka {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teks);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.rail__tombol .ikon-hati { color: var(--teks); transition: transform 0.15s, color 0.15s; }
.rail__tombol.suka .ikon-hati { color: var(--merah); }
.rail__tombol:active .ikon-hati { transform: scale(1.2); }

/* Avatar + tombol ikuti */
.rail__avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--teks);
  overflow: visible;
  margin-bottom: 0.4rem;
}
.rail__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.rail__ikuti {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.05rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--merah);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.rail__ikuti.mengikuti {
  background: #2c2f3e;
  transform: translateX(-50%) rotate(45deg) scale(0.85);
}

/* Disc musik */
.rail__disc {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      #333 0%, #333 22%,
      #111 23%, #111 38%,
      #2a2a2a 39%, #2a2a2a 55%,
      #111 56%, #111 100%);
  border: 7px solid #1c1c28;
  position: relative;
  animation: putar 6s linear infinite;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  overflow: hidden;
}
.rail__disc img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.9;
}
@keyframes putar { to { transform: rotate(360deg); } }

/* ---------- Panel bawah ---------- */
.bawah {
  position: absolute;
  left: 0;
  right: 5.2rem;
  bottom: 4.6rem;
  z-index: 10;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}
.bawah > * { pointer-events: auto; }
.bawah__pengguna {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.02rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.bawah__verifikasi {
  color: var(--biru);
  display: grid;
  place-items: center;
}
.bawah__keterangan {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.bawah__keterangan .label {
  color: var(--teks-lembut);
  margin-right: 0.15rem;
}
.bawah__tag {
  color: #fff;
  font-weight: 600;
}
.bawah__musik {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.92);
  max-width: 100%;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.bawah__musik svg { flex-shrink: 0; }
.bawah__musik .judul-musik {
  white-space: nowrap;
  animation: marquee 14s linear infinite;
  display: inline-block;
  padding-right: 2.2rem;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-52%); }
}

/* Tombol ikuti versi teks */
.tautan-ikuti {
  background: none;
  border: 1px solid rgba(255,255,255,0.55);
  color: var(--teks);
  border-radius: 6px;
  padding: 0.15rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.15rem;
  transition: background 0.2s, color 0.2s;
}
.tautan-ikuti.mengikuti {
  background: rgba(255,255,255,0.18);
  border-color: transparent;
}

/* ---------- Progress bar ---------- */
.progres {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.85rem;
  z-index: 11;
  height: 3px;
  background: rgba(255,255,255,0.18);
  cursor: pointer;
}
.progres__isi {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.92);
  border-radius: 0 3px 3px 0;
}

/* ---------- Navigasi bawah ---------- */
.navbar-bawah {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0.45rem 0.3rem 0.75rem;
  background: #000;
  border-top: 1px solid var(--garis);
}
.navbar-bawah__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  background: none;
  border: none;
  color: var(--teks-lembut);
  cursor: pointer;
  padding: 0.2rem 0;
}
.navbar-bawah__item span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.navbar-bawah__item--aktif { color: var(--teks); }

.navbar-bawah__tambah {
  width: 46px;
  height: 32px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--biru) 0 50%, var(--merah) 50% 100%);
  border-radius: 9px;
  color: #fff;
  position: relative;
  border: none;
  cursor: pointer;
}
.navbar-bawah__tambah::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #000;
  border-radius: 7px;
  z-index: 0;
}

.lencana-notif { position: relative; }
.lencana-notif::after {
  content: "1";
  position: absolute;
  top: -0.35rem;
  right: 0.15rem;
  background: var(--merah);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

/* ---------- Burst hati ---------- */
.burst-hati {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  color: var(--merah);
  filter: drop-shadow(0 8px 24px rgba(254, 44, 85, 0.45));
}
.burst-hati.muncul { animation: burst 0.85s ease forwards; }
@keyframes burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(4deg); }
  38% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.05); }
}

/* ---------- Selimut ---------- */
.selimut {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.selimut.tampil { opacity: 1; pointer-events: auto; }

/* ---------- Sheet ---------- */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  background: #1c1c26;
  border-radius: 18px 18px 0 0;
  padding: 0.85rem 1rem 1rem;
  transform: translateY(102%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.16, 1);
  max-height: 68%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.5);
}
.sheet.tampil { transform: translateY(0); }
.sheet__genggam {
  width: 40px;
  height: 4.5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  margin: 0 auto 0.8rem;
}
.sheet__judul {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.7rem;
}
.sheet__tutup {
  position: absolute;
  right: 0.9rem;
  top: 0.75rem;
  background: none;
  border: none;
  color: var(--teks-lembut);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0.2rem;
}
.sheet__isi {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.2rem;
}

/* ---------- Komentar ---------- */
.komentar {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.komentar__foto {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #333;
}
.komentar__badan { flex: 1; min-width: 0; }
.komentar__nama {
  font-size: 0.78rem;
  color: var(--teks-lembut);
  font-weight: 600;
}
.komentar__teks {
  margin: 0.15rem 0 0.3rem;
  font-size: 0.88rem;
  color: var(--teks);
  word-wrap: break-word;
}
.komentar__meta {
  display: flex;
  gap: 1.1rem;
  font-size: 0.72rem;
  color: var(--teks-lembut);
}
.komentar__suka {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--teks-lembut);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.2rem;
}
.komentar__suka.suka { color: var(--merah); }
.komentar__suka i { font-style: normal; font-size: 0.68rem; }

/* ---------- Input komentar ---------- */
.sheet__input {
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--garis);
  margin-top: 0.75rem;
}
.sheet__input input {
  flex: 1;
  background: #2c2f3e;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: var(--teks);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}
.sheet__input input:focus {
  box-shadow: 0 0 0 2px rgba(37, 244, 238, 0.45);
}
.sheet__input button {
  background: none;
  border: none;
  color: var(--biru);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 0.4rem;
}
.sheet__input button:disabled {
  color: var(--teks-lembut);
  cursor: default;
}

/* ---------- Sheet bagikan ---------- */
.bagikan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 0.5rem;
  padding: 0.4rem 0.2rem 0.9rem;
  overflow-y: auto;
}
.bagikan-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  color: var(--teks);
  cursor: pointer;
  font-size: 0.7rem;
}
.bagikan-item__ikon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: #2c2f3e;
}
.bagikan-item span:last-child {
  color: var(--teks-lembut);
  font-weight: 500;
}
.bagikan-item:nth-child(1) .bagikan-item__ikon { background: #07c160; }
.bagikan-item:nth-child(2) .bagikan-item__ikon { background: #0088cc; }
.bagikan-item:nth-child(3) .bagikan-item__ikon { background: #1877f2; }
.bagikan-item:nth-child(4) .bagikan-item__ikon { background: #0f172a; border: 1px solid var(--garis); }
.bagikan-item:nth-child(5) .bagikan-item__ikon { background: #ef4444; }
.bagikan-item:nth-child(6) .bagikan-item__ikon { background: #6366f1; }
.bagikan-item:nth-child(7) .bagikan-item__ikon { background: #161823; border: 1px solid var(--garis); }
.bagikan-item:nth-child(8) .bagikan-item__ikon { background: #161823; border: 1px solid var(--garis); }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 7.5rem;
  transform: translateX(-50%) translateY(12px);
  background: rgba(28, 28, 38, 0.95);
  color: var(--teks);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  box-shadow: var(--bayangan);
}
.toast.tampil {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rail__disc,
  .bawah__musik .judul-musik,
  .chip-status--menghubungkan .chip-status__titik {
    animation: none !important;
  }
  .burst-hati { animation-duration: 0.3s !important; }
}