/* ============================================================
   NoBaR AI — Fortune Hunter
   Selaras dengan 4Tube: strip header emas, tombol 3D dengan efek tekan,
   panel gelap berbingkai emas. Berdiri sendiri, tanpa pustaka luar.
   ============================================================ */

:root {
  --bg: #060912;
  --kartu: #101a33;
  --kartu2: #0b1226;
  --garis: rgba(255, 255, 255, .1);
  --emas: #ffc928;
  --emas2: #ffe28a;
  --emas-tua: #a77a06;
  --merah: #ff2d55;
  --ungu: #7c3aed;
  --ungu2: #d8b4fe;
  --hijau: #34d399;
  --teks: #f4f6fb;
  --redup: #94a3bf;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body.nobar-page {
  margin: 0; min-height: 100vh; color: var(--teks);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background:
    radial-gradient(110% 40% at 50% 0%, rgba(124, 58, 237, .2), transparent 65%),
    radial-gradient(90% 35% at 100% 60%, rgba(255, 190, 0, .08), transparent 65%),
    var(--bg);
  background-repeat: no-repeat;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--emas2); outline-offset: 2px; }

.halaman { width: 100%; max-width: 760px; margin: 0 auto; }

/* ---------- strip header ---------- */

.kepala {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 70px; padding: 0 60px; border: 2px solid #b8891a;
  background:
    radial-gradient(1.4px 1.4px at 12% 30%, rgba(255, 255, 255, .85) 50%, transparent 55%),
    radial-gradient(1.6px 1.6px at 30% 70%, rgba(255, 220, 130, .9) 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 75% 28%, rgba(180, 160, 255, .9) 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 88% 68%, rgba(255, 255, 255, .7) 50%, transparent 55%),
    radial-gradient(60% 130% at 50% 0%, rgba(124, 58, 237, .4), transparent 70%),
    linear-gradient(180deg, #0c1030, #04060e);
  box-shadow: inset 0 0 0 3px #04060e, inset 0 0 0 4px rgba(255, 201, 40, .55), 0 6px 18px rgba(0, 0, 0, .6);
}
.lambang { display: flex; flex-direction: column; align-items: center; line-height: 1; text-align: center; }
.lambang .merek {
  font-family: 'Cinzel Decorative', 'Cinzel', Georgia, 'Times New Roman', serif;
  font-weight: 900; font-size: 22px; letter-spacing: .1em; white-space: nowrap;
  background: linear-gradient(180deg, #fff3b8, #e3a914 55%, #8a5a00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 7px rgba(255, 190, 0, .55));
}
.lambang .sub { margin-top: 6px; font-size: 10px; font-weight: 800; letter-spacing: .4em; color: var(--ungu2); padding-left: .4em; }

.bulat {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; padding: 0; text-decoration: none; color: #fff;
  border-radius: 50%; background: rgba(8, 12, 26, .92); border: 3px solid #ffd21f;
  box-shadow: 0 0 12px rgba(255, 200, 0, .55), 0 3px 0 #7a5a05;
  transition: transform .08s, box-shadow .08s;
}
.bulat:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 0 8px rgba(255, 200, 0, .45), 0 0 0 #7a5a05; }
.bulat svg { width: 20px; height: 20px; }
#btnBack { left: 10px; width: 38px; height: 38px; border-width: 2px; }
#btnAkun { right: 10px; width: 44px; height: 44px; font-size: 20px; line-height: 1; }
#btnAkun.masuk::after {
  content: ''; position: absolute; right: -2px; top: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--hijau); border: 2px solid #06080f;
}

/* ---------- video ---------- */

.puncak { position: relative; z-index: 5; }
.puncak.putar { position: sticky; top: 0; z-index: 30; }

.panggung {
  position: relative; aspect-ratio: 16 / 9; background: #05070f; overflow: hidden;
  border-bottom: 2px solid rgba(255, 190, 0, .55);
}
.panggung iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.kosong-video {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 14px; text-align: center; color: var(--redup); font-size: 14px;
  background: radial-gradient(80% 90% at 50% 40%, rgba(124, 58, 237, .25), transparent 70%);
}
.kosong-video img { width: 84px; height: auto; border-radius: 18px; border: 2px solid rgba(255, 255, 255, .85); }
.kosong-video b { color: var(--teks); font-size: 15px; }

.sedang-putar { display: flex; flex-direction: column; gap: 2px; padding: 9px 16px 11px; background: rgba(6, 9, 18, .96); border-bottom: 1px solid var(--garis); }
.sedang-putar b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sedang-putar small { color: var(--redup); font-size: 12px; }

/* ---------- pencarian ---------- */

.cari { padding: 16px 16px 0; }
.kolom {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px;
  border-radius: 999px; border: 1px solid var(--garis); background: rgba(255, 255, 255, .06);
  transition: border-color .15s, box-shadow .15s;
}
.kolom:focus-within { border-color: var(--emas); box-shadow: 0 0 0 3px rgba(255, 201, 40, .2); }
.kolom > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--redup); }
.kolom input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 15px; padding: 8px 0; }
.kolom input::placeholder { color: var(--redup); }
#hapus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; padding: 0; font-size: 16px; line-height: 1; }
.tombol-cari {
  border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 800; font-size: 14px; color: #1a1303;
  background: linear-gradient(180deg, var(--emas2), var(--emas));
  box-shadow: 0 4px 0 #8a6508, 0 8px 12px rgba(0, 0, 0, .35); transition: transform .08s, box-shadow .08s;
}
.tombol-cari:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a6508; }
.info { margin: 8px 4px 0; min-height: 1em; font-size: 12px; color: var(--redup); }

.hasil { display: grid; gap: 8px; margin-top: 8px; padding: 8px; border: 1px solid var(--garis); border-radius: 18px; background: rgba(255, 255, 255, .04); max-height: 340px; overflow-y: auto; }
.baris-video {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; text-align: left;
  border: 0; border-radius: 12px; background: transparent; transition: background .1s;
}
.baris-video:hover, .baris-video:active { background: rgba(255, 255, 255, .08); }
.baris-video img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #0a1226; flex: 0 0 96px; }
.baris-video .teks { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.baris-video .judul { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.baris-video .kanal { font-size: 11px; color: var(--redup); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dua tombol 3D: Chat AI dan Translate ---------- */

.tab-aksi { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 16px 4px; }
.ubin-mini {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 62px; padding: 8px 10px;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .14); font-weight: 800; font-size: 15px;
  background: linear-gradient(180deg, #2b2e3b, #10121a 72%);
  box-shadow: 0 7px 0 var(--emas-tua), 0 12px 16px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 201, 40, .3), 0 0 22px rgba(255, 200, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .1);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.ubin-mini img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.ubin-mini:active, .ubin-mini[aria-expanded="true"] {
  transform: translateY(6px);
  box-shadow: 0 1px 0 var(--emas-tua), 0 4px 8px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 201, 40, .75), 0 0 28px rgba(255, 200, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .05);
}
.ubin-mini[aria-expanded="true"] { background: linear-gradient(180deg, #3a3520, #14120a 72%); }
.catatan-biaya { margin: 14px 16px 0; text-align: center; font-size: 11px; color: var(--redup); }

/* ---------- panel ---------- */

.panel {
  margin: 16px 16px 0; padding: 14px; border-radius: 22px; border: 1px solid rgba(255, 201, 40, .35);
  background: linear-gradient(170deg, #141f3d, #0a1126);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.panel-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-kepala .judul { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-kepala img { width: 52px; height: 52px; border-radius: 14px; border: 2px solid #fff; object-fit: cover; flex: 0 0 52px; }
.panel-kepala h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--emas2); }
.tombol-kecil {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255, 201, 40, .6); background: rgba(255, 255, 255, .05); color: var(--emas2);
  box-shadow: 0 3px 0 #5b4204; transition: transform .08s, box-shadow .08s;
}
.tombol-kecil:active { transform: translateY(3px); box-shadow: 0 0 0 #5b4204; }

.tombol-utama {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 14px;
  border: 0; border-radius: 16px; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--merah), var(--ungu));
  box-shadow: 0 5px 0 #3b1a78, 0 10px 16px rgba(0, 0, 0, .4); transition: transform .08s, box-shadow .08s;
}
.tombol-utama:active { transform: translateY(4px); box-shadow: 0 1px 0 #3b1a78; }
.tombol-utama:disabled { opacity: .55; cursor: wait; }
.tombol-sekunder {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--garis); background: rgba(255, 255, 255, .06); font-weight: 700; font-size: 13px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .55); transition: transform .08s, box-shadow .08s;
}
.tombol-sekunder:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .55); }

/* chat */
.pesan {
  display: flex; flex-direction: column; gap: 10px; min-height: 150px; max-height: 360px; overflow-y: auto;
  padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .05);
}
.pesan .kosong { margin: auto; text-align: center; color: var(--redup); font-size: 13px; }
.gelembung { max-width: 88%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.gelembung.kamu { align-self: flex-end; background: linear-gradient(135deg, var(--merah), #c01c47); border-bottom-right-radius: 5px; }
.gelembung.ai { align-self: flex-start; background: #1b2748; border-bottom-left-radius: 5px; }
.gelembung small { display: block; margin-top: 6px; font-size: 10px; color: var(--redup); }
.gelembung.mengetik { color: var(--redup); font-style: italic; }
.chip-baris { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(168, 85, 247, .55); background: rgba(124, 58, 237, .16); color: var(--ungu2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .5); transition: transform .08s, box-shadow .08s;
}
.chip:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0, 0, 0, .5); }
.form-chat { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.form-chat input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 999px; border: 1px solid var(--garis); background: rgba(255, 255, 255, .06); font-size: 14px; outline: 0; }
.form-chat input:focus { border-color: var(--emas); }
.bulat-kecil {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--garis); background: rgba(255, 255, 255, .08); font-size: 18px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .55); transition: transform .08s, box-shadow .08s;
}
.bulat-kecil:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0, 0, 0, .55); }
.bulat-kecil.kirim { background: linear-gradient(180deg, var(--emas2), var(--emas)); color: #1a1303; font-weight: 800; box-shadow: 0 3px 0 #8a6508; }
.bulat-kecil.dengar { background: var(--merah); animation: denyut 1s ease-in-out infinite; }
@keyframes denyut { 50% { box-shadow: 0 0 0 8px rgba(255, 45, 85, .25); } }

/* translate */
.pilih-bahasa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.pilih-bahasa select { padding: 10px 12px; border-radius: 999px; border: 1px solid var(--garis); background: #0d1630; outline: 0; }
.sumber { width: 100%; margin-top: 10px; padding: 12px; min-height: 96px; border-radius: 14px; border: 1px solid var(--garis); background: rgba(255, 255, 255, .05); font-size: 14px; resize: vertical; outline: 0; }
.sumber:focus { border-color: var(--emas); }
.petunjuk { margin: 8px 2px 0; font-size: 12px; line-height: 1.5; color: var(--redup); }
.kotak-hasil { margin-top: 14px; border: 1px solid rgba(168, 85, 247, .5); border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, .04); }
.kotak-hasil .bagian { padding: 12px 14px; }
.kotak-hasil .bagian + .bagian { border-top: 1px solid var(--garis); }
.kotak-hasil h3 { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--redup); }
.kotak-hasil .ungu h3 { color: var(--ungu2); }
.kotak-hasil p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.aksi-hasil { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.lencana-biaya { margin-top: 10px; text-align: center; font-size: 12px; color: var(--hijau); }

/* ---------- lembar akun ---------- */

.latar { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .65); }
.lembar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 70;
  width: min(100%, 480px); max-height: 90vh; overflow-y: auto; padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0));
  border-radius: 24px 24px 0 0; border: 1px solid rgba(255, 201, 40, .5); border-bottom: 0;
  background: radial-gradient(120% 50% at 50% -10%, rgba(255, 201, 40, .14), transparent 60%), linear-gradient(170deg, #14224a, #0a1226 60%, #070d1c);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, .6);
}
.lembar .grip { width: 44px; height: 4px; border-radius: 4px; background: #33415f; margin: 0 auto 12px; }
.lembar h2 { margin: 0; font-size: 18px; color: var(--emas2); }
.lembar .bagian { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--garis); }
.lembar .bagian small { display: block; color: var(--redup); font-size: 12px; }
.lembar .besar { margin-top: 2px; font-size: 22px; font-weight: 800; }
.lembar .baris { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13px; }
.lembar .baris span:first-child { color: var(--redup); }
.lembar table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.lembar th, .lembar td { padding: 7px 4px; text-align: right; border-bottom: 1px solid var(--garis); }
.lembar th:first-child, .lembar td:first-child { text-align: left; }
.lembar th { color: var(--redup); font-weight: 700; }
.lembar td:first-child { font-weight: 800; color: var(--emas2); }
.lembar .aksi { display: grid; gap: 10px; margin-top: 14px; }
.tautan-tombol { text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%); z-index: 90;
  max-width: min(92vw, 420px); padding: 11px 16px; border-radius: 14px; font-size: 13px; text-align: center;
  background: #111a33; border: 1px solid rgba(255, 201, 40, .55); box-shadow: 0 10px 24px rgba(0, 0, 0, .55);
}

.kaki { padding: 22px 16px 34px; text-align: center; font-size: 12px; color: var(--redup); }

@media (min-width: 640px) {
  .kepala { height: 84px; }
  .lambang .merek { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .ubin-mini, .tombol-utama, .tombol-sekunder, .chip, .bulat, .bulat-kecil, .tombol-kecil, .tombol-cari { transition: none; }
  .bulat-kecil.dengar { animation: none; }
}
