/* ============================================================
   Website Pacaran — Style
   Tema: romantis, lembut, pink/peach
   ============================================================ */

:root {
  --pink: #ff5c8a;
  --pink-dark: #e23e6f;
  --peach: #ffd6e0;
  --cream: #fff5f7;
  --ink: #4a2c38;
  --muted: #9b7b86;
  --card: #ffffff;
  --bg1: #ffe3ec;
  --bg2: #fff5f7;
  --bg3: #ffe9f0;
  --shadow: 0 8px 30px rgba(226, 62, 111, 0.14);
  --shadow-sm: 0 2px 10px rgba(226, 62, 111, 0.10);
  --grad: linear-gradient(135deg, #ff6f9c 0%, #ff5c8a 50%, #ff7eb0 100%);
  --radius: 18px;
}

/* ---------- Dark mode ---------- */
body.dark {
  --pink: #ff77a0;
  --pink-dark: #ff9bbb;
  --peach: #3a2531;
  --cream: #2a1922;
  --ink: #f5e2ea;
  --muted: #b890a0;
  --card: #241019;
  --bg1: #1a0d12;
  --bg2: #241019;
  --bg3: #2a121d;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
body.dark .donate-hero {
  background: linear-gradient(145deg, #2d1f0a 0%, #3a2508 50%, #2d1f0a 100%);
  border-color: #92400e;
  box-shadow: 0 6px 28px rgba(0,0,0,.5);
}
body.dark .dh-title { color: #fbbf24; }
body.dark .dh-sub { color: #d97706; }
body.dark .dh-divider { color: #fbbf24; }
body.dark .dh-divider::before, body.dark .dh-divider::after { background: #92400e; }
body.dark .td-item { background: rgba(0,0,0,.3); border-color: #78350f; }
body.dark .td-name { color: #fde68a; }
body.dark .td-amount { color: #fca5a5; }
body.dark .donation-ticker { background: #1c1000; border-color: #92400e; color: #fbbf24; }
body.dark .td-empty { color: #d97706; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; }
button, input, textarea, a { max-width: 100%; }

/* Scrollbar manis */
* { scrollbar-width: thin; scrollbar-color: var(--pink) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

body {
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

input, button { font-family: inherit; }

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 92, 138, .38); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(255, 92, 138, .5); transform: translateY(-1px); }
.btn-secondary { background: var(--card); color: var(--pink-dark); border: 2px solid var(--peach); }
.btn-secondary:hover { background: var(--peach); }
.btn-mini { padding: 7px 14px; font-size: 13px; background: var(--card); color: var(--pink-dark); border: 1.5px solid var(--peach); }
.btn-mini:hover { background: var(--peach); }

input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--peach);
  border-radius: 14px;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  outline: none;
  transition: border-color .15s;
}
input[type="text"]:focus { border-color: var(--pink); }
input::placeholder { color: #c9a9b4; }

.hidden { display: none !important; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing { display: flex; align-items: center; justify-content: center; padding: 24px; }
.hero { width: 100%; max-width: 460px; position: relative; z-index: 2; }
.hero-card {
  background: var(--card);
  border-radius: 28px;
  padding: 38px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.logo { font-size: 64px; line-height: 1; margin-bottom: 6px; animation: bounce 2.4s infinite ease-in-out; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.hero-card h1 { font-size: 30px; color: var(--pink-dark); margin-bottom: 6px; }
.subtitle { color: var(--muted); margin-bottom: 26px; font-size: 15px; }

.form { text-align: left; }
.form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.divider { text-align: center; margin: 20px 0 14px; position: relative; color: var(--muted); font-size: 13px; }
.divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--peach); z-index: 0; }
.divider span { background: var(--card); padding: 0 12px; position: relative; z-index: 1; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; text-transform: uppercase; }
.join-row .btn { white-space: nowrap; }
#createBtn { width: 100%; }

.features { display: flex; justify-content: space-around; margin-top: 26px; gap: 8px; }
.feature { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 26px; color: var(--pink-dark); }
.feature span { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; }
.foot { text-align: center; color: var(--muted); margin-top: 22px; font-size: 13px; }
.home-nav { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* Floating hearts background */
.hearts-bg { position: fixed; inset: 0; overflow: hidden; z-index: 1; pointer-events: none; }
.heart {
  position: absolute; bottom: -40px; font-size: 22px;
  animation: floatUp linear infinite; opacity: .6;
}
@keyframes floatUp {
  to { transform: translateY(-110vh) rotate(40deg); opacity: 0; }
}

/* ============================================================
   ROOM PAGE
   ============================================================ */
.room { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--card);
  box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--peach);
  flex-wrap: wrap; gap: 10px 14px; z-index: 5; position: relative;
}
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.brand { font-size: 19px; font-weight: 700; color: var(--pink-dark); letter-spacing: .2px; }
.room-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-code, .countdown, .session-timer, .users-pill {
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: var(--cream); color: var(--muted); border: 1px solid var(--peach);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.room-code strong { color: var(--pink-dark); letter-spacing: 1px; margin-left: 3px; }
.session-timer { color: var(--pink-dark); font-variant-numeric: tabular-nums; }
.users-pill { background: var(--peach); color: var(--pink-dark); }

.layout { flex: 1; display: flex; min-height: 0; }

/* Stage / player */
.stage { flex: 1; display: flex; flex-direction: column; padding: 16px; min-width: 0; }
.source-bar { background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); margin-bottom: 14px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  border: none; background: var(--cream); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(255,92,138,.35); }
.source-panel { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-direction: column; }
.source-panel input { flex: 1; min-width: 200px; }
.video-input-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; }
.video-input-row input { flex: 1; min-width: 200px; }
#stopVideoBtn { width: 100%; }
.hint { font-size: 12px; color: var(--muted); }

.player-wrap {
  flex: 1; background: #1a0d12; border-radius: var(--radius); overflow: hidden;
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 0;
}
.player { width: 100%; height: 100%; border: none; }
#ytPlayerWrap > div, #ytPlayerWrap iframe { width: 100%; height: 100%; border: none; display: block; }
#htmlPlayer, #screenPlayer { object-fit: contain; background: #000; }
.placeholder { text-align: center; color: #ffd6e0; padding: 30px; }
.ph-emoji { font-size: 60px; margin-bottom: 10px; }
.placeholder p { font-size: 18px; margin-bottom: 6px; }
.placeholder small { color: #c98ba0; }

.sync-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; min-height: 16px; }

/* Tombol layar penuh */
.fs-btn {
  position: absolute; top: 12px; right: 12px; z-index: 9;
  width: 42px; height: 42px; border: none; border-radius: 12px;
  background: rgba(0,0,0,.5); color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .55; transition: opacity .15s, background .15s; backdrop-filter: blur(2px);
}
.fs-btn:hover { opacity: 1; background: rgba(255,92,138,.85); }

/* Tombol stop nonton bareng */
.stop-watch-btn {
  position: absolute; top: 12px; left: 12px; z-index: 9;
  border: none; border-radius: 12px; padding: 9px 14px;
  background: rgba(214,51,51,.85); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; opacity: .9; transition: opacity .15s, background .15s; backdrop-filter: blur(2px);
}
.stop-watch-btn:hover { opacity: 1; background: #d63333; }
@media (max-width: 600px) { .stop-watch-btn { padding: 7px 11px; font-size: 12px; } }

.video-unmute-btn {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 10; border: none; border-radius: 999px;
  padding: 11px 22px;
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; backdrop-filter: blur(6px);
  animation: pulse 1.5s ease-in-out infinite;
  white-space: nowrap;
}

/* Saat fullscreen, pemutar mengisi penuh layar */
.player-wrap:fullscreen, .player-wrap:-webkit-full-screen {
  width: 100vw; height: 100vh; border-radius: 0; background: #000;
}
.player-wrap:fullscreen .player, .player-wrap:-webkit-full-screen .player { width: 100%; height: 100%; }
.player-wrap:fullscreen .fs-btn, .player-wrap:-webkit-full-screen .fs-btn { top: 18px; right: 18px; }

/* Chat */
.chat { width: 320px; background: var(--card); display: flex; flex-direction: column; box-shadow: -2px 0 14px rgba(226,62,111,.08); }
.chat-head { padding: 14px 18px; font-weight: 700; color: var(--pink-dark); border-bottom: 1px solid var(--peach); }
.chat-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 8px 13px; border-radius: 14px; font-size: 14px; line-height: 1.35; word-wrap: break-word; }
.msg .who { font-size: 11px; font-weight: 700; opacity: .7; display: block; margin-bottom: 2px; }
.msg.them { background: var(--cream); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--pink); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; font-style: italic; text-align: center; }

.chat-input { border-top: 1px solid var(--peach); padding: 10px; }
.emoji-quick { display: flex; gap: 4px; margin-bottom: 8px; }
.emoji-quick button { border: none; background: var(--cream); border-radius: 8px; padding: 5px 8px; font-size: 16px; cursor: pointer; }
.emoji-quick button:hover { background: var(--peach); }
.chat-send { display: flex; gap: 6px; }
.chat-send input { flex: 1; padding: 10px 12px; }
.chat-send .btn { padding: 10px 16px; }

/* Typing indicator */
.typing-indicator {
  padding: 5px 16px 4px;
  font-size: 12px; color: var(--muted); font-style: italic;
  display: flex; align-items: center; gap: 6px;
  animation: fadeIn .2s ease;
}
.typing-indicator::after {
  content: "●●●";
  font-style: normal; font-size: 10px; letter-spacing: 2px;
  animation: typingDot 1.2s infinite;
}
@keyframes typingDot {
  0%,100% { opacity: .3; } 50% { opacity: 1; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Tombol upload gambar di chat */
.img-upload-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 12px; font-size: 18px; cursor: pointer;
  transition: background .12s; user-select: none;
}
.img-upload-btn:hover { background: var(--peach); }

/* Gambar dalam chat */
.chat-img {
  display: block; max-width: 100%; max-height: 200px;
  border-radius: 10px; margin-top: 6px; cursor: pointer;
  object-fit: contain;
}
.msg.msg-img { padding-bottom: 8px; }

/* Tombol keluar */
.btn-leave { background: #fff0f0 !important; color: #d63333 !important; border: 1.5px solid #ffd0d0 !important; }
.btn-leave:hover { background: #ffe0e0 !important; }
body.dark .btn-leave { background: #3a1f24 !important; color: #ff9a9a !important; border-color: #5a2b30 !important; }

/* Tombol Skip (cari pasangan lain) */
.btn-skip { background: linear-gradient(135deg,#a855f7,#ec4899) !important; color: #fff !important; border: none !important; box-shadow: 0 4px 14px rgba(168,85,247,.4) !important; font-weight: 700; }
.btn-skip:hover { filter: brightness(1.08); transform: translateY(-1px); }

.modal-text { text-align: center; color: var(--muted); margin: 6px 0 4px; font-size: 14px; line-height: 1.45; }

/* Popup notifikasi */
.popup-notif {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-140%);
  background: var(--card); color: var(--ink); border-radius: 16px; padding: 14px 20px;
  box-shadow: 0 12px 40px rgba(226,62,111,.3); display: flex; align-items: center; gap: 14px;
  z-index: 250; min-width: 280px; max-width: 92vw; cursor: pointer;
  border: 2px solid var(--peach); transition: transform .35s cubic-bezier(.2,1.2,.3,1), opacity .35s;
  opacity: 0; pointer-events: none;
}
.popup-notif.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.pn-emoji { font-size: 34px; line-height: 1; animation: bounce 1.6s infinite ease-in-out; }
.pn-title { font-weight: 700; color: var(--pink-dark); font-size: 15px; }
.pn-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   DONASI — kartu besar, mencolok, mobile-first
   ============================================================ */
.donate-hero {
  margin-top: 16px;
  background: linear-gradient(145deg, #fff8f0 0%, #fff3e0 50%, #fff8f0 100%);
  border: 2px solid #fbbf24;
  border-radius: 22px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: 0 6px 28px rgba(251,191,36,.25);
  position: relative;
  overflow: hidden;
}
/* Kilap tipis di sudut */
.donate-hero::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b);
}

.dh-icon { font-size: 42px; line-height: 1; margin-bottom: 6px; }
.dh-title {
  font-size: 20px; font-weight: 700; color: #92400e;
  margin-bottom: 4px;
}
.dh-sub {
  font-size: 13px; color: #b45309; margin-bottom: 16px; line-height: 1.5;
}

/* Tombol donasi — besar & mencolok */
.btn-donate-big {
  display: block; width: 100%;
  padding: 16px 20px; font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff; border-radius: 16px; text-decoration: none;
  box-shadow: 0 6px 22px rgba(239,68,68,.38);
  transition: transform .15s, filter .15s, box-shadow .15s;
  font-family: inherit; letter-spacing: .3px;
  animation: donatePulse 2.5s ease-in-out infinite;
}
.btn-donate-big:hover, .btn-donate-big:active {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.08);
  box-shadow: 0 10px 28px rgba(239,68,68,.48);
  animation: none;
}
@keyframes donatePulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(239,68,68,.38); }
  50%       { box-shadow: 0 6px 30px rgba(239,68,68,.6); }
}

/* Pemisah top donors */
.dh-divider {
  font-weight: 700; font-size: 14px; color: #92400e;
  margin: 18px 0 10px;
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.dh-divider::before, .dh-divider::after {
  content: ""; flex: 1; height: 1px; background: #fcd34d;
}

/* Ticker donasi live */
.donation-ticker {
  display: flex; align-items: center; gap: 8px;
  background: #fffbeb; border: 1.5px solid #fcd34d;
  border-radius: 12px; padding: 9px 14px; font-size: 13px;
  color: #92400e; font-weight: 600; margin-bottom: 14px;
  animation: fadeIn .3s ease; text-align: left;
}
.dt-dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%; background: #ef4444;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.2; } }

/* Top donors list */
.td-list { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.td-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.75); border-radius: 14px;
  padding: 11px 14px; border: 1.5px solid #fde68a;
  backdrop-filter: blur(4px);
}
.td-rank { font-size: 22px; flex-shrink: 0; width: 28px; text-align: center; }
.td-name {
  flex: 1; font-weight: 700; font-size: 14px; color: #78350f;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.td-count { font-size: 11px; color: #b45309; font-weight: 600; flex-shrink: 0; }
.td-amount {
  font-weight: 700; font-size: 14px; color: #dc2626; flex-shrink: 0;
}
.td-empty {
  text-align: center; color: #b45309; font-size: 13px;
  padding: 12px 0; font-style: italic;
}

/* Saran promo card */
.saran-promo { margin-top: 8px; }
.saran-promo-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 18px; padding: 16px 18px; text-decoration: none;
  color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
  margin-top: 8px;
}
.saran-promo-card:hover { border-color: var(--pink); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.sp-icons { font-size: 24px; flex-shrink: 0; }
.sp-text { flex: 1; min-width: 0; }
.sp-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.sp-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sp-arrow { font-size: 20px; color: var(--pink-dark); flex-shrink: 0; }

/* ============================================================
   CHAT GLOBAL (/chat)
   ============================================================ */
.gc-page {
  display: flex; flex-direction: column; height: 100dvh;
  background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
  overflow: hidden;
}

/* Header */
.gc-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--card); border-bottom: 1px solid var(--peach);
  box-shadow: 0 2px 10px rgba(226,62,111,.08);
  flex-shrink: 0; z-index: 10;
}
.gc-back {
  font-size: 20px; color: var(--pink-dark); text-decoration: none;
  font-weight: 700; padding: 4px 8px; border-radius: 8px;
  transition: background .12s; flex-shrink: 0;
}
.gc-back:hover { background: var(--peach); }
.gc-header-info { flex: 1; min-width: 0; }
.gc-title    { font-size: 17px; font-weight: 700; color: var(--pink-dark); }
.gc-subtitle { font-size: 12px; color: var(--muted); }
.gc-online-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 999px; padding: 5px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  flex-shrink: 0; white-space: nowrap;
}
.gc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
  animation: gcDotPulse 1.5s ease-in-out infinite;
}
@keyframes gcDotPulse {
  0%,100% { opacity: 1; } 50% { opacity: .4; }
}

/* Join screen */
.gc-join-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.gc-join-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--peach);
  padding: 32px 28px; width: 100%; max-width: 400px; text-align: center;
}
.gc-join-card h2 { font-size: 22px; color: var(--pink-dark); margin-bottom: 8px; }
.gc-join-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }

/* Chat area */
.gc-chat-wrap {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.gc-list {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  scroll-behavior: smooth;
}

/* Pesan */
.gc-msg { display: flex; flex-direction: column; max-width: 78%; }
.gc-me   { align-self: flex-end; align-items: flex-end; }
.gc-them { align-self: flex-start; align-items: flex-start; }
.gc-system {
  align-self: center; max-width: 100%;
  font-size: 11px; color: var(--muted);
  background: var(--cream); border-radius: 999px;
  padding: 4px 14px; text-align: center;
}
.gc-who  { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; padding: 0 4px; }
.gc-bubble {
  padding: 10px 14px; border-radius: 18px; font-size: 14px;
  line-height: 1.45; word-break: break-word; max-width: 100%;
}
.gc-me   .gc-bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.gc-them .gc-bubble {
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--peach); border-bottom-left-radius: 5px;
}
.gc-time { font-size: 10px; color: var(--muted); margin-top: 2px; padding: 0 4px; }

/* Emoji quick */
.gc-emoji-row {
  display: flex; gap: 6px; padding: 6px 14px;
  overflow-x: auto; flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--peach);
  background: var(--card);
}
.gc-emoji-row button {
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 10px; padding: 6px 10px; font-size: 18px;
  cursor: pointer; flex-shrink: 0; transition: background .12s;
}
.gc-emoji-row button:hover { background: var(--peach); }

/* Input bar */
.gc-input-bar {
  display: flex; gap: 8px; padding: 10px 14px 14px;
  background: var(--card); border-top: 1px solid var(--peach);
  flex-shrink: 0;
}
.gc-input-bar input {
  flex: 1; padding: 11px 14px; border: 2px solid var(--peach);
  border-radius: 14px; font-size: 15px; color: var(--ink);
  background: var(--cream); outline: none;
  font-family: inherit; transition: border-color .15s;
}
.gc-input-bar input:focus { border-color: var(--pink); }
.gc-send { padding: 11px 20px; font-size: 14px; flex-shrink: 0; }

/* Promo card global chat di landing */
.gc-promo-card { border-color: #a5f3fc !important; }
.gc-promo-card:hover { border-color: #0ea5e9 !important; }
.gc-promo-card .sp-title { color: #0369a1; }

/* Dark mode */
body.dark .gc-them .gc-bubble { background: var(--card); border-color: var(--peach); }
body.dark .gc-input-bar input { background: var(--card); }

/* Responsive */
@media (max-width: 600px) {
  .gc-header { padding: 10px 12px; gap: 8px; }
  .gc-title  { font-size: 15px; }
  .gc-subtitle { display: none; }
  .gc-online-pill { font-size: 12px; padding: 4px 10px; }
  .gc-bubble { font-size: 13px; padding: 9px 12px; }
  .gc-input-bar input { font-size: 16px; } /* cegah zoom iOS */
  .gc-send { padding: 11px 14px; font-size: 13px; }
}

/* ============================================================
   HALAMAN SARAN (/saran)
   ============================================================ */
.saran-page {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px 60px; min-height: 100vh;
}
.saran-card {
  width: 100%; max-width: 560px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--peach);
  padding: 28px 28px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.saran-header { text-align: center; }
.saran-back {
  display: inline-block; color: var(--muted); font-size: 13px; font-weight: 600;
  text-decoration: none; margin-bottom: 10px;
}
.saran-back:hover { color: var(--pink-dark); }
.saran-header h1 { font-size: 24px; color: var(--pink-dark); margin: 8px 0 4px; }

/* Form kirim saran */
.saran-form-box { display: flex; flex-direction: column; gap: 8px; }
.sf-tabs { display: flex; gap: 6px; }
.sf-tab {
  flex: 1; padding: 9px; border: 1.5px solid var(--peach); border-radius: 12px;
  background: var(--cream); color: var(--muted); font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: background .12s, color .12s, border-color .12s;
}
.sf-tab.active { background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(255,92,138,.3); }
.saran-form-box label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.saran-form-box textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--peach); border-radius: 14px;
  font-size: 15px; color: var(--ink); background: var(--card); outline: none;
  resize: vertical; font-family: inherit; transition: border-color .15s; min-height: 100px;
}
.saran-form-box textarea:focus { border-color: var(--pink); }
.fb-status {
  padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
  text-align: center; animation: fadeIn .2s ease;
}
.fb-status.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.fb-status.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Daftar masukan */
.saran-list-wrap { display: flex; flex-direction: column; gap: 12px; }
.sl-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.sl-title { font-weight: 700; font-size: 15px; color: var(--pink-dark); }
.sl-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.slf {
  padding: 5px 12px; border: 1.5px solid var(--peach); border-radius: 999px;
  background: var(--cream); color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .12s, color .12s;
}
.slf.active { background: var(--pink-dark); color: #fff; border-color: transparent; }

.sl-list { display: flex; flex-direction: column; gap: 10px; }
.sl-item {
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s;
}
.sl-item:hover { border-color: var(--pink); }
.sl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sl-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-saran { background: #eff6ff; color: #1d4ed8; }
.tag-fitur { background: #f5f3ff; color: #6d28d9; }
.tag-bug   { background: #fef2f2; color: #991b1b; }
.sl-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.sl-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.sl-msg { font-size: 14px; color: var(--ink); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.sl-foot { display: flex; align-items: center; gap: 8px; }
.sl-like {
  background: none; border: 1.5px solid var(--peach); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--muted); cursor: pointer;
  font-family: inherit; transition: background .12s, color .12s;
}
.sl-like:hover:not(:disabled) { background: var(--peach); color: var(--pink-dark); }
.sl-like:disabled { opacity: 0.6; cursor: default; }
.sl-loading, .sl-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }

/* ============================================================
   LANDING — Cari Pacar Online section yang lebih mencolok
   ============================================================ */
.find-section { margin-top: 8px; text-align: center; }

/* Tombol Cari Pacar — gradient ungu-pink + efek ripple */
.btn-find {
  display: block; width: 100%; padding: 16px; font-size: 17px; font-weight: 700;
  text-decoration: none; text-align: center; border-radius: 18px;
  background: linear-gradient(135deg, #a855f7, #ec4899, #ff6fa8);
  background-size: 200% 200%;
  color: #fff; border: none;
  box-shadow: 0 8px 28px rgba(168,85,247,.5), 0 0 0 0 rgba(168,85,247,.4);
  margin-top: 4px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .12s;
  animation: gradShift 4s ease infinite;
}
.btn-find:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(168,85,247,.6); }
.btn-find:active { transform: scale(.97); }
@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Pulse ring di dalam tombol */
.btn-find-pulse {
  position: absolute; inset: 0; border-radius: inherit;
  background: rgba(255,255,255,.2);
  animation: btnPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes btnPulse {
  0%   { transform: scale(.85); opacity: .8; }
  70%  { transform: scale(1.04); opacity: 0; }
  100% { transform: scale(1.04); opacity: 0; }
}

/* Badge orang online */
.find-live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1.5px solid var(--peach);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-top: 12px; box-shadow: var(--shadow-sm);
}
.fo-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; flex-shrink: 0; animation: pulse 1.2s infinite; }
.find-tagline { font-size: 12px; color: var(--muted); margin-top: 7px; }

/* Navigasi antar halaman */
.topnav { display: flex; gap: 6px; }
.navlink { text-decoration: none; color: var(--pink-dark); background: var(--cream); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--peach); transition: background .15s; }
.navlink:hover { background: var(--peach); }
.navlink.active { background: var(--pink); color: #fff; border-color: var(--pink); }

/* Music bar */
.music-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px 12px; margin-top: 10px; box-shadow: var(--shadow); }
.music-note-ico { font-size: 22px; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-now { font-weight: 600; font-size: 14px; color: var(--pink-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.music-hint { font-size: 11px; color: var(--muted); flex: 1; }
#audioPlayer { flex: 1; height: 38px; }
.music-embed { margin-top: 10px; border-radius: 14px; overflow: hidden; }
.music-embed iframe { display: block; width: 100%; max-width: 100%; border: none; border-radius: 14px; }
#ytMusic { border-radius: 12px; overflow: hidden; }
#ytMusic iframe { width: 100%; }

/* Countdown di topbar */
.countdown { color: var(--pink-dark); }
.countdown:empty { display: none; }

/* Daftar film favorit */
.fav-add { display: flex; gap: 8px; width: 100%; margin-bottom: 12px; flex-wrap: wrap; }
.fav-add input { flex: 1; min-width: 140px; }
.fav-list { width: 100%; display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.fav-item { display: flex; align-items: center; gap: 10px; background: var(--cream); padding: 10px 12px; border-radius: 12px; }
.fav-item .fav-ico { font-size: 20px; }
.fav-item .fav-info { flex: 1; min-width: 0; }
.fav-item .fav-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item .fav-by { font-size: 11px; color: var(--muted); }
.fav-item .btn-mini { padding: 6px 12px; }
.fav-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }

/* Action bar (video call + reaksi) */
.action-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.react-buttons { display: flex; gap: 4px; }
.react-buttons button { border: none; background: var(--card); border-radius: 10px; padding: 6px 9px; font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(226,62,111,.12); transition: transform .12s; }
.react-buttons button:hover { transform: scale(1.15); }
.action-bar .sync-note { margin: 0; }
.voice-status { background: var(--peach); color: var(--pink-dark); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.voice-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Floating reactions */
.reaction-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.float-react { position: absolute; bottom: 10%; font-size: 38px; animation: reactFloat 2.4s ease-out forwards; }
@keyframes reactFloat {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  15% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  100% { transform: translateY(-340px) scale(1.4); opacity: 0; }
}

.btn-mini.active { background: var(--pink) !important; color: #fff !important; border-color: var(--pink) !important; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(40,10,25,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal { background: var(--card); border-radius: 24px; padding: 26px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid var(--peach); position: relative; overflow: hidden; max-height: 90vh; overflow-y: auto; animation: modalPop .28s cubic-bezier(.2,1.1,.3,1); }
.modal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); }
@keyframes modalPop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.modal h3 { text-align: center; }
.modal h3 { color: var(--pink-dark); margin-bottom: 16px; text-align: center; }
.modal label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.modal input { width: 100%; padding: 11px 14px; border: 2px solid var(--peach); border-radius: 12px; font-size: 15px; background: var(--card); color: var(--ink); outline: none; }
.modal input:focus { border-color: var(--pink); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; }

/* ============================================================
   HALAMAN GALERI & CATATAN
   ============================================================ */
.page { display: block; min-height: 100vh; }
.page-main { max-width: 920px; margin: 0 auto; padding: 24px 18px 60px; }
.page-head { text-align: center; margin-bottom: 24px; }
.page-head h1 { color: var(--pink-dark); font-size: 28px; margin-bottom: 4px; }
.page-head p { color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty-state .ph-emoji { font-size: 54px; margin-bottom: 8px; }
.empty-state p { font-size: 18px; color: var(--ink); }

/* Upload galeri */
.upload-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 26px; }
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.upload-row input[type="text"] { flex: 1; min-width: 180px; }
.file-label { background: var(--cream); color: var(--pink-dark); border: 2px dashed var(--peach); padding: 11px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.file-label:hover { background: var(--peach); }
.preview { max-height: 180px; border-radius: 12px; margin-top: 12px; display: block; }

/* Grid foto */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.photo-card { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); position: relative; transition: transform .15s; }
.photo-card:hover { transform: translateY(-4px); }
.photo-img { width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; cursor: pointer; }
.photo-meta { padding: 10px 12px; }
.photo-caption { font-weight: 600; font-size: 14px; margin-bottom: 3px; color: var(--ink); }
.photo-by { font-size: 11px; color: var(--muted); }
.photo-del { position: absolute; top: 8px; right: 8px; border: none; background: rgba(0,0,0,.5); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; opacity: 0; transition: opacity .15s; }
.photo-card:hover .photo-del { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; }
.lb-caption { color: #fff; margin-top: 14px; font-size: 16px; text-align: center; }
.lb-close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 30px; cursor: pointer; }

/* Catatan cinta */
.note-form { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 26px; }
.note-form textarea { width: 100%; border: 2px solid var(--peach); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 15px; resize: vertical; background: var(--card); color: var(--ink); outline: none; }
.note-form textarea:focus { border-color: var(--pink); }
.note-form-row { display: flex; gap: 10px; margin-top: 10px; justify-content: space-between; flex-wrap: wrap; }
.note-form-row input[type="date"] { border: 2px solid var(--peach); border-radius: 12px; padding: 10px 14px; font-family: inherit; background: var(--card); color: var(--ink); }

.notes-list { display: flex; flex-direction: column; gap: 14px; }
.note-card { background: var(--card); border-left: 5px solid var(--pink); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.note-date { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.note-body { font-size: 16px; line-height: 1.5; color: var(--ink); }
.note-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.note-by { font-weight: 600; color: var(--pink-dark); font-size: 14px; }
.note-del { border: none; background: transparent; cursor: pointer; font-size: 15px; opacity: .5; }
.note-del:hover { opacity: 1; }

/* ============================================================
   FITUR SERU — fun bar, kangen, game, gambar, roda, zoom kamera
   ============================================================ */
.fun-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fun-btn { flex: 1 1 auto; }

/* Panel kamera peserta */
/* ---- Cam Panel ---- */
.cam-panel {
  background: var(--card);
  border: 1px solid var(--peach);
  border-radius: 16px;
  margin-top: 10px;
  padding: 10px 14px 12px;
  box-shadow: var(--shadow-sm);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
.cam-panel.show { opacity: 1; transform: translateY(0); }
.cam-panel-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cam-panel-title { font-size: 13px; font-weight: 700; color: var(--pink-dark); display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.cam-panel-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; display: inline-block; flex-shrink: 0; animation: pulse 1.4s infinite; }
.cam-panel-count { font-size: 11px; color: var(--muted); background: var(--cream); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* Preset ukuran — S M L XL */
.cam-size-presets { display: flex; gap: 4px; }
.csp-btn {
  border: 1.5px solid var(--peach); background: var(--card); color: var(--muted);
  border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.csp-btn:hover, .csp-btn.active { background: var(--pink); color: #fff; border-color: var(--pink); }

/* Grid kamera — tile ukurannya diatur via kelas size-* */
.cam-panel-grid {
  display: flex; gap: 10px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; align-items: flex-start;
}
/* Ukuran tile per preset (lebar tile; rasio 4:3 diterapkan di video) */
.cam-panel-grid.size-xs  .cpg-tile { --tw: 90px;  }
.cam-panel-grid.size-sm  .cpg-tile { --tw: 140px; }
.cam-panel-grid.size-md  .cpg-tile { --tw: 200px; }
.cam-panel-grid.size-lg  .cpg-tile { --tw: 280px; }
.cam-panel-grid.size-xl  .cpg-tile { --tw: 100%;  min-width: 0; flex: 1 1 calc(50% - 8px); }

.cpg-tile {
  position: relative;
  width: var(--tw, 200px);
  min-width: var(--tw, 200px);
  max-width: var(--tw, 100%);
  border-radius: 14px;
  overflow: hidden;
  background: #1a0d12;
  border: 2px solid var(--peach);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: width .25s, min-width .25s;
}
/* XL: tile memenuhi baris, grid jadi wrap */
.cam-panel-grid.size-xl { flex-wrap: wrap; }
.cam-panel-grid.size-xl .cpg-tile { min-width: 0; width: calc(50% - 5px); max-width: 100%; }

.cpg-video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #111; }
.cpg-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#2a1020,#1a0d12); color: var(--muted); font-size: 30px; }
.cpg-label { position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.cpg-name { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpg-mic  { font-size: 13px; flex-shrink: 0; }

/* Pinch-to-zoom: biarkan browser urus gesture pada elemen video */
.cpg-video { touch-action: pinch-zoom; }

/* Kamera tidak mirror — tampilkan seperti aslinya (bukan cermin) */
#localCam { transform: scaleX(-1); }   /* lokal: balik karena kamera depan HP secara default mirror */
#remoteCam { transform: none; }        /* pasangan: sudah benar, tidak perlu dibalik */

/* Suit */
.suit-choices { display: flex; justify-content: center; gap: 14px; margin: 14px 0; }
.suit-btn { font-size: 40px; width: 72px; height: 72px; border: 2px solid var(--peach); background: var(--card); border-radius: 16px; cursor: pointer; transition: transform .12s, background .12s; }
.suit-btn:hover { transform: scale(1.1); background: var(--cream); }
.suit-btn.picked { background: var(--pink); border-color: var(--pink); }
.suit-result { text-align: center; font-weight: 700; font-size: 18px; color: var(--pink-dark); min-height: 24px; }

/* Game tab banyak → boleh wrap */
.game-tabs { flex-wrap: wrap; }
.gtab { flex: 0 1 auto; font-size: 13px; padding: 8px 12px; }

/* Hasil besar */
.big-result { text-align: center; font-size: 40px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pink-dark); font-weight: 800; }
.big-result.spin { animation: bigSpin .6s ease; }
@keyframes bigSpin { 0% { transform: rotateY(0) scale(.7); } 100% { transform: rotateY(720deg) scale(1); } }

/* Scoreboard premium */
.scoreboard-wrap { position: relative; margin-bottom: 18px; }
.scoreboard {
  background: linear-gradient(135deg, var(--cream) 0%, var(--card) 100%);
  border: 1px solid var(--peach);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.scoreboard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.sb-header { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px; }
.sb-entries { display: flex; flex-direction: column; gap: 6px; }
.sb-entry { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--peach); transition: transform .15s; }
.sb-entry.sb-lead { background: linear-gradient(90deg, #fff7f0, var(--card)); border-color: #ffb347; box-shadow: 0 2px 8px rgba(255,140,0,.15); transform: scale(1.02); }
.sb-medal { font-size: 20px; width: 28px; text-align: center; }
.sb-name { flex: 1; font-weight: 700; font-size: 14px; color: var(--ink); }
.sb-score { font-size: 22px; font-weight: 800; color: var(--pink-dark); min-width: 28px; text-align: right; }
.sb-trophy { font-size: 18px; margin-right: 6px; }
.sb-text { color: var(--muted); font-size: 13px; }


/* Adu Jempol */
.tap-big { display: block; width: 100%; max-width: 240px; margin: 12px auto; aspect-ratio: 1.6; border: none; border-radius: 20px; background: var(--grad); color: #fff; font-size: 30px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 22px rgba(255,92,138,.4); transition: transform .05s; user-select: none; }
.tap-big:active { transform: scale(.95); }
.tap-big:disabled { opacity: .5; }

/* Tap Battle — anti-zoom */
.tap-arena { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 10px; }
.tap-counter-box { flex: 1; text-align: center; background: var(--cream); border: 2px solid var(--peach); border-radius: 16px; padding: 12px 8px; }
.tap-counter-box.me { border-color: var(--pink); }
.tap-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.tap-count { font-size: 48px; font-weight: 900; color: var(--pink-dark); line-height: 1; }
.tap-vs { font-size: 20px; font-weight: 800; color: var(--muted); }
.tap-battle-btn {
  display: block; width: 100%; padding: 22px;
  background: var(--grad); color: #fff; border: none; border-radius: 18px;
  font-size: 28px; font-weight: 900; cursor: pointer; letter-spacing: 1px;
  box-shadow: 0 8px 24px rgba(255,92,138,.45);
  /* KUNCI ANTI-ZOOM: beri tahu browser ini tombol biasa, bukan double-tap */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
  transition: transform .06s, box-shadow .06s;
}
.tap-battle-btn:active { transform: scale(.96); box-shadow: 0 4px 12px rgba(255,92,138,.3); }
.tap-battle-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tap-timer { text-align: center; font-size: 22px; font-weight: 800; color: var(--pink-dark); min-height: 28px; margin-top: 8px; }

/* Kuis */
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.quiz-opt { border: 2px solid var(--peach); background: var(--card); color: var(--ink); border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.quiz-opt:hover { background: var(--cream); }
.quiz-opt.correct { background: #2ecc71; color: #fff; border-color: #2ecc71; }
.quiz-opt.wrong { background: #e74c3c; color: #fff; border-color: #e74c3c; }

/* Tebak Angka */
.guess-row { display: flex; gap: 8px; margin: 10px 0; }
.guess-row input { flex: 1; padding: 11px 14px; border: 2px solid var(--peach); border-radius: 12px; font-size: 16px; background: var(--card); color: var(--ink); }
.guess-log { max-height: 130px; overflow-y: auto; background: var(--cream); border-radius: 12px; padding: 8px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.guess-log:empty { display: none; }

/* Kamera tetap tampil (popup) saat video fullscreen */
.player-wrap:fullscreen .callbox, .player-wrap:-webkit-full-screen .callbox,
.player-wrap:fullscreen .local-float, .player-wrap:-webkit-full-screen .local-float { z-index: 2147483600; }

/* Kedip chat saat ada pesan masuk */
.chat-head.flash { animation: chatFlash 1.5s ease; }
@keyframes chatFlash {
  0%, 100% { background: transparent; }
  20% { background: var(--pink); color: #fff; }
}


/* Overlay Kangen */
.missyou-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 400; background: rgba(255,92,138,.18); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.missyou-overlay.show { opacity: 1; }
.missyou-card { text-align: center; transform: scale(.6); animation: missyPop .5s forwards; }
.missyou-overlay.show .missyou-card { animation: missyPop .5s forwards; }
@keyframes missyPop { 0% { transform: scale(.4); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.my-emoji { font-size: 90px; animation: bounce 1s infinite; }
.my-text { font-size: 30px; font-weight: 700; color: var(--pink-dark); margin-top: 8px; text-shadow: 0 2px 10px rgba(255,255,255,.6); }

/* Game */
.game-modal, .wheel-modal { max-width: 440px; }
.game-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.gtab { flex: 1; border: none; background: var(--cream); color: var(--muted); padding: 9px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 14px; }
.gtab.active { background: var(--grad); color: #fff; box-shadow: 0 3px 10px rgba(255,92,138,.3); }
.ttt-status { text-align: center; font-weight: 600; color: var(--pink-dark); margin-bottom: 10px; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 300px; margin: 0 auto; }
.ttt-cell { aspect-ratio: 1; border: 2px solid var(--peach); background: var(--card); border-radius: 12px; font-size: 38px; font-weight: 700; cursor: pointer; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.ttt-cell.small { font-size: 22px; border-radius: 9px; }
.ttt-cell:hover { background: var(--cream); }
.ttt-cell.x { color: var(--pink-dark); }
.ttt-cell.o { color: #4a90d9; }

/* Sambung 4 */
.c4-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; max-width: 320px; margin: 0 auto; background: #5b8def; padding: 8px; border-radius: 14px; }
.c4-cell { aspect-ratio: 1; border-radius: 50%; border: none; background: #eef3ff; cursor: pointer; transition: transform .1s; }
.c4-cell:hover { transform: scale(1.06); }
.c4-cell.r { background: radial-gradient(circle at 35% 30%, #ff8fae, #e23e6f); }
.c4-cell.y { background: radial-gradient(circle at 35% 30%, #ffe27a, #f5c518); }

/* Kartu Cocok (memory) */
.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 300px; margin: 0 auto; }
.mem-card { aspect-ratio: 1; border: none; border-radius: 12px; font-size: 30px; cursor: pointer; background: var(--grad); color: transparent; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.mem-card::after { content: "💗"; font-size: 22px; }
.mem-card.open, .mem-card.done { background: var(--card); border: 2px solid var(--peach); color: initial; }
.mem-card.open::after, .mem-card.done::after { content: ""; }
.mem-card.done { opacity: .55; }
.tod-card { background: var(--cream); border-radius: 14px; padding: 22px 16px; text-align: center; font-size: 17px; line-height: 1.5; color: var(--ink); min-height: 90px; display: flex; align-items: center; justify-content: center; }
.tod-actions { display: flex; gap: 10px; margin-top: 14px; }
.tod-actions .btn { flex: 1; }

/* Gambar bareng */
#drawCanvas { width: 100%; max-width: 100%; height: auto; background: var(--card); border: 2px solid var(--peach); border-radius: 12px; touch-action: none; cursor: crosshair; display: block; }
.draw-tools { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.draw-tools input[type="color"] { width: 42px; height: 36px; border: none; background: none; cursor: pointer; }
.draw-size { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Roda keputusan */
.wheel-wrap { position: relative; width: 280px; max-width: 100%; margin: 0 auto 8px; }
#wheelCanvas { width: 100%; max-width: 280px; display: block; margin: 0 auto; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 26px; color: var(--pink-dark); z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.wheel-result { text-align: center; font-weight: 700; font-size: 18px; color: var(--pink-dark); min-height: 26px; margin-bottom: 8px; }
.wheel-lbl { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
#wheelOptions { width: 100%; border: 2px solid var(--peach); border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 14px; resize: vertical; background: var(--card); color: var(--ink); outline: none; }
#wheelOptions:focus { border-color: var(--pink); }

@media (max-width: 600px) {
  .my-emoji { font-size: 70px; } .my-text { font-size: 24px; }
  .fun-btn { font-size: 13px; padding: 9px 10px; }
}

/* ============================================================
   ROOM HISTORY — halaman utama
   ============================================================ */
.room-history { margin-top: 4px; }

.rh-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.rh-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--cream); border: 1.5px solid var(--peach);
  border-radius: 16px; padding: 14px 16px;
  transition: box-shadow .15s, border-color .15s;
}
.rh-card:hover { border-color: var(--pink); box-shadow: 0 4px 14px rgba(255,92,138,.12); }

.rh-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.rh-code { font-weight: 700; font-size: 15px; color: var(--ink); }
.rh-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-time { font-size: 11px; color: var(--pink-dark); font-weight: 600; }
.rh-btn  { padding: 8px 16px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.rh-empty {
  text-align: center; font-size: 13px; color: var(--muted);
  padding: 14px 12px; background: var(--cream);
  border: 1.5px dashed var(--peach); border-radius: 14px;
  line-height: 1.5;
}

/* Tombol hapus pesan */
.msg-delete-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 12px; padding: 2px 5px; margin-left: 4px;
  opacity: 0.45; vertical-align: middle;
  border-radius: 6px; transition: opacity .12s, background .12s, color .15s;
  line-height: 1;
}
/* Desktop: tampil saat hover pesan */
@media (hover: hover) {
  .msg:hover .msg-delete-btn { display: inline-block; }
}
/* Touch device: selalu tampil tapi sangat samar */
@media (hover: none) {
  .msg.me .msg-delete-btn { display: inline-block; opacity: 0.25; font-size: 11px; }
}
.msg-delete-btn:hover, .msg-delete-btn:focus { opacity: 1; background: rgba(255,92,138,.12); }

/* Pesan yang sudah dihapus */
.msg.msg-deleted { opacity: 0.55; }
.deleted-text { font-style: italic; color: var(--muted); font-size: 13px; }

/* Pemisah riwayat chat */
.chat-history-sep {
  font-size: 11px !important;
  color: var(--muted) !important;
  opacity: 0.7;
  letter-spacing: 0.5px;
  margin: 4px 0 8px !important;
}

/* ============================================================
   STREAK HARIAN
   ============================================================ */
.streak-badge {
  background: linear-gradient(135deg, #ff8800, #ff5c8a);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255,136,0,.35);
  cursor: default;
  white-space: nowrap;
  animation: streakPop .4s ease;
}
@keyframes streakPop {
  0% { transform: scale(.7); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}


/* ============================================================
   LOKASI & WAKTU LOKAL
   ============================================================ */
.location-display {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border-radius: 16px;
  padding: 16px 12px; margin: 12px 0;
  text-align: center;
}
.loc-card {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.loc-flag { font-size: 22px; }
.loc-city-name {
  font-weight: 700; font-size: 14px; color: var(--ink);
  word-break: break-word;
}
.loc-time {
  font-size: 22px; font-weight: 700; color: var(--pink-dark);
  font-variant-numeric: tabular-nums;
}
.loc-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.loc-middle {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0 4px;
}
.loc-distance-km {
  font-size: 24px; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.loc-distance-label { font-size: 11px; color: var(--muted); }
.loc-tz-diff { font-size: 11px; color: var(--pink-dark); font-weight: 600; margin-top: 2px; }
.loc-hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ============================================================
   RESPONSIVE / MOBILE
   ============================================================ */

/* ── Tablet & HP landscape (≤820px) ── */
@media (max-width: 820px) {
  /* Pastikan halaman bisa scroll, tidak terpotong */
  html, body { overflow-x: hidden; max-width: 100%; }
  .room { height: auto; min-height: 100vh; overflow-y: auto; overflow-x: hidden; }
  .layout { flex-direction: column; min-height: 0; overflow-x: hidden; }
  .stage { padding: 10px; min-width: 0; max-width: 100%; }

  /* Player: fallback min-height dulu (HP lama), lalu aspect-ratio untuk HP modern */
  .player-wrap { min-height: 200px; max-height: 42vh; max-width: 100%; overflow: hidden; }
  @supports (aspect-ratio: 1) {
    .player-wrap { min-height: 0; aspect-ratio: 16 / 9; max-height: 38vh; }
  }

  /* Chat lebih pendek */
  .chat { width: 100%; max-width: 100%; height: 42vh; box-shadow: 0 -2px 14px rgba(226,62,111,.1); }
  .source-bar { padding: 10px; margin-bottom: 10px; max-width: 100%; }

  /* Reset min-width yang menyebabkan overflow */
  .source-panel input,
  .video-input-row input,
  .fav-add input { min-width: 0; }

  /* Tile kamera: reset min-width agar tidak meluber */
  .cpg-tile { min-width: 0 !important; max-width: 48%; }

  /* Board game: tidak boleh melebihi lebar container */
  .c4-board { max-width: 100%; }
  .ttt-board { max-width: 100%; }

  /* Modal: jangan melebihi layar */
  .modal { max-width: calc(100vw - 32px); box-sizing: border-box; }
  .game-modal, .wheel-modal { max-width: calc(100vw - 32px); }

  /* Popup & toast: jangan overflow */
  .popup-notif { max-width: calc(100vw - 24px); width: auto; min-width: 0; left: 12px; right: 12px; transform: translateY(-140%); }
  .popup-notif.show { transform: translateY(0); }
  .toast { max-width: calc(100vw - 32px); width: auto; }

  .rh-card { padding: 12px 14px; gap: 10px; }
  .location-display { gap: 6px; padding: 12px 8px; }
  .loc-time { font-size: 18px; }
  .loc-distance-km { font-size: 20px; }
}

/* ── HP portrait (≤600px) ── */
@media (max-width: 600px) {
  /* Cegah auto-zoom iOS saat fokus input */
  input[type="text"], input[type="date"], textarea, .modal input { font-size: 16px; }

  /* Semua elemen tidak boleh lebih lebar dari layar */
  *, *::before, *::after { max-width: 100%; box-sizing: border-box; }
  img, video, iframe, canvas, svg { max-width: 100%; height: auto; }

  /* ── Topbar ── */
  .topbar { padding: 8px 12px; gap: 6px 10px; overflow: hidden; }
  .brand { font-size: 15px; min-width: 0; }
  .room-meta { width: 100%; gap: 6px; flex-wrap: wrap; overflow: hidden; }
  .room-code { font-size: 11px; padding: 5px 10px; }
  .btn-mini { padding: 5px 9px; font-size: 11px; }
  .countdown { font-size: 10px; padding: 4px 8px; max-width: 130px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .session-timer { font-size: 11px; padding: 4px 8px; }
  .streak-badge { font-size: 11px; padding: 4px 8px; }

  /* ── Tabs: scroll horizontal ── */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; gap: 6px; }
  .tab { white-space: nowrap; flex: 0 0 auto; padding: 7px 12px; font-size: 12px; }

  /* ── Panel sumber video/screen: tumpuk ── */
  .source-panel { flex-direction: column; align-items: stretch; }
  .video-input-row { flex-wrap: wrap; }
  .video-input-row input { width: 100%; }
  .video-input-row .btn { width: 100%; }
  #stopVideoBtn { width: 100%; }
  .fav-add { flex-direction: column; }
  .fav-add input, .fav-add .btn { width: 100%; min-width: 0; }

  /* ── Panel musik: input penuh di atas, tombol Putar & Antri berdampingan ── */
  .music-url-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #musicUrl          { grid-column: 1 / -1; width: 100%; }  /* input: full lebar */
  #musicLoadBtn      { width: 100%; }                        /* Putar: kolom kiri */
  .pl-queue-btn      { width: 100%; }                        /* Antri: kolom kanan */
  #musicStopBtn      { grid-column: 1 / -1; width: 100%; }  /* Stop: full lebar */

  /* ── Playlist inline ── */
  .pl-inline { margin-top: 10px; gap: 6px; }
  .pl-queue { max-height: 150px; }
  .pl-item { padding: 6px 8px; gap: 8px; }
  .pl-thumb { width: 36px; height: 28px; }
  .pl-title { font-size: 12px; }
  .pl-meta { font-size: 10px; }
  .pl-play-btn, .pl-del-btn { width: 28px; height: 28px; font-size: 12px; }
  .pl-footer-btns { gap: 6px; }
  .pl-footer-btns .btn { flex: 1; font-size: 12px; padding: 7px 8px; }

  /* ── Modal: muat di layar, bisa di-scroll ── */
  .modal-overlay { padding: 12px; }
  .modal {
    padding: 20px 16px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 86vh;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .game-modal { max-height: 84vh; }
  #wheelCanvas { width: 220px !important; height: 220px !important; }
  .wheel-modal textarea { font-size: 14px; }

  /* ── Action bar & reaksi ── */
  .action-bar { gap: 6px; flex-wrap: wrap; padding: 8px; }
  .action-bar .btn-secondary { flex: 1 1 auto; font-size: 12px; padding: 9px 10px; }
  .voice-status { font-size: 12px; }
  .react-buttons { flex-wrap: wrap; width: 100%; justify-content: center; gap: 4px; }
  .react-buttons button { font-size: 20px; width: 36px; height: 36px; }

  /* ── Fun bar: 3 kolom ── */
  .fun-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 2px; }
  .fun-btn { font-size: 11px; padding: 8px 4px; border-radius: 12px; text-align: center; }

  /* ── Chat input nyaman di jempol ── */
  .chat-send input { font-size: 16px; }
  .chat-send { gap: 6px; }

  /* ── Now playing musik ── */
  .music-np-info { gap: 8px; }
  .music-thumbnail { width: 36px; height: 36px; border-radius: 6px; }
  .music-title { font-size: 12px; }
  .music-sub { font-size: 10px; }
  .music-ctrl-btn { width: 28px; height: 28px; font-size: 12px; }

  /* ── Location modal ── */
  .location-display { flex-direction: column; gap: 0; padding: 10px; }
  .loc-card { flex-direction: row; justify-content: space-between; align-items: center;
    width: 100%; padding: 10px 0; border-bottom: 1px solid var(--peach); }
  .loc-card:last-child { border-bottom: none; }
  .loc-middle { flex-direction: row; justify-content: space-around; width: 100%;
    padding: 10px 0; border-bottom: 1px solid var(--peach); order: -1; }
  .loc-distance-km { font-size: 18px; }
  .loc-time { font-size: 16px; }

  /* ── Game tabs: scroll horizontal ── */
  .game-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .gtab { flex: 0 0 auto; font-size: 11px; padding: 6px 9px; }

  /* ── Cam panel ── */
  .cam-panel-grid.size-md .cpg-tile { width: 110px; }

  /* ── Misc ── */
  .msg-delete-btn { display: inline-block; }
  .rh-card { flex-direction: column; align-items: stretch; gap: 8px; }
  .rh-btn  { width: 100%; text-align: center; padding: 10px; }
  .rh-meta { white-space: normal; }
  .donate-hero { padding: 18px 14px; border-radius: 18px; }
  .dh-title { font-size: 18px; }
  .btn-donate-big { font-size: 15px; padding: 14px 16px; }
  .td-item { padding: 10px 12px; gap: 10px; }
  .td-name, .td-amount { font-size: 13px; }
  .saran-promo-card { padding: 14px; gap: 10px; }
  .saran-card { padding: 20px 16px 24px; }
  .sf-tabs { gap: 4px; }
  .sf-tab { font-size: 12px; padding: 8px 4px; }
  .sl-header { flex-direction: column; align-items: flex-start; }
  .hero-card { padding: 28px 20px; }
  .join-row { flex-direction: column; }
  .join-row .btn { width: 100%; }
  .home-nav { flex-direction: column; }
  .home-nav .navlink { text-align: center; }
  .page-main { padding: 16px 12px 50px; }
  .page-head h1 { font-size: 22px; }
}

/* ── HP kecil (≤480px) ── */
@media (max-width: 480px) {
  /* Sembunyikan elemen non-kritis untuk hemat ruang topbar */
  .countdown { display: none; }
  .session-timer { display: none; }
  .streak-badge { font-size: 10px; padding: 3px 7px; }

  /* Fun bar: 2 kolom */
  .fun-bar { grid-template-columns: repeat(2, 1fr); }

  /* Tombol playlist footer: tumpuk */
  .pl-footer-btns { flex-direction: column; }
  .pl-footer-btns .btn { width: 100%; }

  /* Modal: hampir penuh layar */
  .modal { max-height: 90vh; }

  .rh-meta { font-size: 12px; }
}

/* ============================================================
   MUSIK BARENG — mini player panel
   ============================================================ */

/* Tombol unmute untuk partner */
.music-unmute-btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .75; }
}

/* Row info (thumbnail + judul + tombol play) */
.music-np-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Wrapper player YT — iframe tetap di DOM agar audio jalan, video disembunyikan */
.music-yt-wrap {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Now playing bar — tampil di bawah source-bar */
.music-now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--peach) 0%, var(--cream) 100%);
  border-radius: 10px;
  padding: 8px 10px;
}

.music-thumbnail {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--peach) center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(226,62,111,.2);
}

.music-info {
  flex: 1;
  min-width: 0;
}
.music-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.music-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.music-ctrl-btn {
  background: var(--pink);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, transform .12s;
}
.music-ctrl-btn:hover { background: var(--pink-dark); transform: scale(1.1); }

/* Progress bar */
.music-progress-wrap {
  height: 4px;
  background: var(--peach);
  border-radius: 999px;
  overflow: hidden;
}
.music-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pink-dark));
  border-radius: 999px;
  transition: width .9s linear;
}

/* Dark mode */
body.dark .music-panel { background: var(--card); border-color: #3a2531; }
body.dark .music-input-row input { background: var(--bg2); border-color: #3a2531; }
body.dark .music-now-playing { background: linear-gradient(135deg, #3a2531 0%, #2a1922 100%); }
body.dark .music-progress-wrap { background: #3a2531; }

/* ============================================================
   PLAYLIST BARENG — inline di panel musik
   ============================================================ */

/* Baris input musik + tombol Antri */
.music-url-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.music-url-row input { flex: 1; min-width: 0; }
.pl-queue-btn {
  padding: 10px 14px;
  font-size: 13px;
  background: var(--card);
  color: var(--pink-dark);
  border: 2px solid var(--peach);
  box-shadow: none;
}
.pl-queue-btn:hover { background: var(--peach); filter: none; }
.pl-queue-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Inline playlist section */
.pl-inline {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pl-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pl-inline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink-dark);
}
.pl-count-wrap {
  font-size: 12px;
  color: var(--muted);
}
.pl-count-wrap strong {
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  margin-left: 2px;
}

.pl-footer-btns {
  display: flex;
  gap: 6px;
}


.pl-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pl-add-row input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--peach);
  border-radius: 12px;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
}
.pl-add-row input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pl-add-row .btn { white-space: nowrap; padding: 10px 16px; font-size: 14px; }

.pl-queue-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pl-count {
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
}

.pl-queue {
  overflow-y: auto;
  max-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 14px;
}

.pl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: 12px;
  border: 1.5px solid var(--peach);
  transition: background .15s;
}
.pl-item:hover { background: var(--bg3); }

.pl-num {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.pl-thumb {
  width: 48px;
  height: 36px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.pl-thumb-empty {
  background: var(--peach);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.pl-info {
  flex: 1;
  min-width: 0;
}
.pl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.pl-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.pl-play-btn, .pl-del-btn {
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, background .15s;
}
.pl-play-btn:active, .pl-del-btn:active { transform: scale(.92); }
.pl-play-btn {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,92,138,.3);
}
.pl-del-btn {
  background: var(--bg3);
  color: var(--pink-dark);
  border: 1px solid var(--peach);
}
.pl-del-btn:hover { background: #ffe0ec; }

/* Dark mode playlist */
body.dark .pl-item { background: var(--bg3); border-color: #3a2531; }
body.dark .pl-item:hover { background: #3a2531; }
body.dark .pl-del-btn { background: #3a2531; border-color: #4a3040; }
body.dark .pl-thumb-empty { background: #3a2531; }

