/* =====================================================================
   MANCING NUSANTARA
   Palet diambil dari kolom air: permukaan terang di atas, palung gelap
   di bawah. Tema gelap adalah tampilan bawaan karena game ini
   berlatar bawah laut.
   ===================================================================== */

:root {
  --abyss:      #04141D;
  --deep:       #071E2A;
  --surface:    #0D2C3B;
  --raised:     #12394B;
  --line:       #1D4C61;
  --line-soft:  #163F52;
  --ink:        #E4F0F5;
  --ink-2:      #A9C6D3;
  --ink-3:      #6E93A4;
  --aqua:       #35C6B4;
  --aqua-deep:  #1B8C80;
  --gold:       #E8B84B;
  --coral:      #E2705A;
  --hijau:      #5FBE7A;

  --r-1: #8A9BA8;
  --r-2: #5FA85F;
  --r-3: #3E8ED0;
  --r-4: #9B6BD6;
  --r-5: #E8B84B;

  --radius: 10px;
  --radius-lg: 16px;
  --pad: 16px;
  --maks: 1180px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: var(--deep);
  --panel: var(--surface);
  --panel-2: var(--raised);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --teks: var(--ink);
  --teks-2: var(--ink-2);
  --teks-3: var(--ink-3);
  --bayang: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
}

[data-tema="terang"] {
  --bg: #EEF5F8;
  --panel: #FFFFFF;
  --panel-2: #F5FAFC;
  --border: #CADCE4;
  --border-soft: #DEEAEF;
  --teks: #072430;
  --teks-2: #3D6272;
  --teks-3: #6E8D9B;
  --aqua: #0E8C7E;
  --aqua-deep: #0A6B60;
  --gold: #B07E10;
  --bayang: 0 1px 2px rgba(7, 36, 48, .06), 0 8px 24px rgba(7, 36, 48, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--teks);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
a { color: var(--aqua); text-decoration: none; }
a:hover { text-decoration: underline; }

.angka { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- LAYOUT */
.bungkus { width: 100%; max-width: var(--maks); margin: 0 auto; padding: 0 var(--pad); }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-isi { display: flex; align-items: center; gap: 14px; height: 58px; }
.merek { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; color: var(--teks); font-size: 15px; }
.merek:hover { text-decoration: none; }
.merek-tanda { width: 26px; height: 26px; flex: none; }
.topbar-kanan { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.dompet {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  font-size: 13px; font-weight: 600;
}
.dompet b { font-family: var(--mono); color: var(--gold); font-weight: 700; }

.nav-utama { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-soft); }
.nav-utama::-webkit-scrollbar { display: none; }
.nav-utama a {
  padding: 11px 13px; font-size: 14px; font-weight: 600; white-space: nowrap;
  color: var(--teks-2); border-bottom: 2px solid transparent;
}
.nav-utama a:hover { color: var(--teks); text-decoration: none; }
.nav-utama a.aktif { color: var(--aqua); border-bottom-color: var(--aqua); }

main { padding: 26px 0 60px; }

/* -------------------------------------------------------------- PANEL */
.panel {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 20px;
}
.panel + .panel { margin-top: 16px; }
.panel-judul { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-judul h2 { margin: 0; }

.kisi { display: grid; gap: 12px; }
.kisi-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.statistik { background: var(--panel-2); border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--border-soft); }
.statistik span { display: block; font-size: 12.5px; color: var(--teks-3); font-weight: 600; }
.statistik b { display: block; margin-top: 3px; font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: -.02em; }

/* ------------------------------------------- TANDA KEDALAMAN (SIGNATURE)
   Tingkat kelangkaan digambarkan sebagai kolom air: makin langka,
   makin dalam, makin gelap airnya. Ini dipakai konsisten di galeri
   dan di panel admin. */
.kedalaman { display: flex; flex-direction: column; gap: 2px; }
.pita {
  display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.pita-warna { width: 8px; height: 100%; min-height: 26px; border-radius: 4px; }
.pita-nama { font-weight: 700; font-size: 14px; }
.pita-ket { font-size: 12.5px; color: var(--teks-3); }
.pita-nilai { font-family: var(--mono); font-size: 14px; font-weight: 700; text-align: right; }

.batang { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--border-soft); }
.batang i { display: block; height: 100%; background: var(--aqua); }

/* ------------------------------------------------------------ FORMULIR */
label { display: block; font-size: 13px; font-weight: 600; color: var(--teks-2); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; font-family: inherit; font-size: 15px;
  color: var(--teks); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--aqua);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aqua) 22%, transparent);
}
input[type=number] { font-family: var(--mono); }
.bantuan { font-size: 12.5px; color: var(--teks-3); margin-top: 5px; }
.bidang { margin-bottom: 15px; }

.sakelar { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--teks); }
.sakelar input { width: auto; margin: 0; accent-color: var(--aqua); width: 17px; height: 17px; }

.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; font-family: inherit; font-size: 14.5px; font-weight: 700;
  color: var(--abyss); background: var(--aqua);
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: filter .15s, transform .05s;
}
.tombol:hover { filter: brightness(1.08); text-decoration: none; }
.tombol:active { transform: translateY(1px); }
.tombol.lebar { width: 100%; }
.tombol.sunyi { background: transparent; color: var(--teks); border-color: var(--border); }
.tombol.sunyi:hover { background: var(--panel-2); filter: none; }
.tombol.kecil { padding: 6px 12px; font-size: 13px; }

/* ------------------------------------------------------------- PESAN */
.kabar { padding: 11px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; margin-bottom: 15px; border: 1px solid; }
.kabar.galat { background: color-mix(in srgb, var(--coral) 14%, transparent); border-color: color-mix(in srgb, var(--coral) 45%, transparent); color: var(--coral); }
.kabar.sukses { background: color-mix(in srgb, var(--hijau) 14%, transparent); border-color: color-mix(in srgb, var(--hijau) 45%, transparent); color: var(--hijau); }
.kabar.awas { background: color-mix(in srgb, var(--gold) 14%, transparent); border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold); }

/* -------------------------------------------------------- HALAMAN AUTH */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-kartu { width: 100%; max-width: 400px; }
.auth-kepala { text-align: center; margin-bottom: 22px; }
.auth-kepala h1 { font-size: 25px; margin-bottom: 6px; }
.auth-kepala p { color: var(--teks-3); font-size: 14.5px; margin: 0; }
.auth-tanda { width: 52px; height: 52px; margin: 0 auto 14px; display: block; }
.auth-kaki { text-align: center; margin-top: 16px; font-size: 14px; color: var(--teks-3); }

/* -------------------------------------------------------------- TABEL */
.tabel-bungkus { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--teks-3); font-weight: 700; }
table.data td input[type=number] { padding: 7px 9px; font-size: 14px; }
table.data tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- ADMIN */
.admin-tata { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sisi { background: var(--abyss); border-right: 1px solid var(--border-soft); padding: 18px 12px; }
[data-tema="terang"] .admin-sisi { background: #0A2430; }
.admin-sisi .merek { color: #E4F0F5; padding: 0 8px 16px; }
.admin-menu { display: flex; flex-direction: column; gap: 2px; }
.admin-menu a { padding: 9px 11px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #A9C6D3; }
.admin-menu a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.admin-menu a.aktif { background: var(--aqua-deep); color: #fff; }
.admin-menu .pisah { height: 1px; background: rgba(255,255,255,.1); margin: 10px 4px; }
.admin-isi { padding: 24px; max-width: 900px; }
.admin-kepala { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }

/* ------------------------------------------------------------- KESALAHAN */
.galat-laman { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.galat-kode { font-family: var(--mono); font-size: 52px; font-weight: 700; color: var(--teks-3); line-height: 1; margin-bottom: 8px; }

/* --------------------------------------------------------------- LAIN */
.pilih-kecil { display: inline-flex; gap: 4px; }
.pilih-kecil button {
  padding: 5px 9px; font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--teks-3); background: var(--panel-2);
  border: 1px solid var(--border-soft); border-radius: 7px; cursor: pointer;
}
.pilih-kecil button.aktif { color: var(--aqua); border-color: var(--aqua); }
.pilih-kecil button:hover { color: var(--teks); }

.kosong { text-align: center; padding: 34px 20px; color: var(--teks-3); }

@media (max-width: 760px) {
  .admin-tata { grid-template-columns: 1fr; }
  .admin-sisi { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .admin-menu { flex-direction: row; overflow-x: auto; }
  .admin-isi { padding: 18px 16px; }
  .topbar-isi { height: 54px; }
  h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* =====================================================================
   TAHAP 2 — MINIGAME MEMANCING
   Kolom air dipakai sebagai panggung: langit di atas, air di bawah.
   ===================================================================== */
.laut { position: relative; min-height: 340px; height: 52vh; max-height: 560px; display: grid; place-items: center; overflow: hidden; }
.laut-langit { position: absolute; inset: 0 0 45% 0; background: linear-gradient(#0A2B3C, #10485E); }
[data-tema="terang"] .laut-langit { background: linear-gradient(#BFE0EC, #8FC5DA); }
.laut-air { position: absolute; inset: 55% 0 0 0; background: linear-gradient(#0B3348, #041A26); }
[data-tema="terang"] .laut-air { background: linear-gradient(#5FA6C4, #2C6D8C); }
.laut.bertarung .laut-air { animation: goyang 1.1s ease-in-out infinite; }
@keyframes goyang { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.tahap { position: relative; z-index: 2; width: 100%; padding: 26px 20px; text-align: center; }
.tahap.sembunyi { display: none; }
.sembunyi { display: none !important; }
.tahap-ket { color: #C9E3ED; font-weight: 600; margin: 12px 0 0; font-size: 14.5px; }
.tahap-ket.kecil { font-size: 12.5px; opacity: .75; }

.tombol.besar { padding: 14px 34px; font-size: 16px; border-radius: 999px; }
.tombol.tarik { background: var(--gold); color: #2B1A00; min-width: 190px; }
.tombol.tarik.kilat { box-shadow: 0 0 0 6px rgba(232,184,75,.35); }
.tombol.tarik.meleset { background: var(--coral); }

.pelampung { width: 15px; height: 15px; border-radius: 50%; background: var(--coral); margin: 0 auto; animation: apung 1.5s ease-in-out infinite; }
@keyframes apung { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.tarung-kepala { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tarung-hitung { font-size: 14px; font-weight: 700; color: #C9E3ED; }
.lencana { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #06202C; letter-spacing: .01em; }

.jalur { position: relative; height: 62px; margin-bottom: 18px; border-radius: var(--radius); background: rgba(0,0,0,.28); overflow: hidden; }
.jalur-target { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 3px; margin-left: -1.5px; background: var(--gold); border-radius: 2px; }
.nada { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--aqua); opacity: .85; will-change: transform; }
.nada.dekat { box-shadow: 0 0 0 5px rgba(53,198,180,.28); }
.nada.kena { background: var(--gold); opacity: 1; }
.nada.lewat { background: #55707E; opacity: .35; }

.hasil-gambar { width: 128px; height: 128px; object-fit: contain; display: block; margin: 0 auto 8px; }
.hasil-ikon { font-size: 46px; color: var(--aqua); line-height: 1; margin-bottom: 8px; }
.hasil-ikon.lepas { color: #55707E; }
.hasil-judul { font-size: 21px; font-weight: 800; margin: 8px 0 2px; color: #EAF4F8; }
[data-tema="terang"] .hasil-judul { color: #06202C; }
.hasil-berat { font-size: 27px; font-weight: 700; color: var(--gold); margin: 0 0 6px; }
.hasil-ket { color: #A9C6D3; font-size: 14px; margin: 4px 0; }
.hasil-tanda { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; margin: 4px 0 2px; }
.hasil-tanda.baru { background: rgba(53,198,180,.18); color: var(--aqua); }
.hasil-tanda.rekor { background: rgba(232,184,75,.18); color: var(--gold); }
.hasil-rinci { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 14px 0 18px; font-size: 13px; color: #A9C6D3; }
.hasil-rinci b { color: #EAF4F8; }
[data-tema="terang"] .hasil-rinci b { color: #06202C; }

.daftar-umpan { display: flex; flex-direction: column; gap: 8px; }
.umpan { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--panel-2); cursor: pointer; margin: 0; }
.umpan.terpilih { border-color: var(--aqua); }
.umpan input { width: 16px; height: 16px; accent-color: var(--aqua); margin: 0; }
.umpan-nama { font-weight: 700; font-size: 14px; color: var(--teks); }
.umpan-sisa { margin-left: auto; font-size: 12.5px; color: var(--teks-3); }

/* ------------------------------------------------------------ GALERI */
.galeri-kisi { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 11px; }
.kartu-ikan { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; text-align: center; }
.kartu-ikan.punya { border-color: var(--border); }
.kartu-gambar { background: #12384A; padding: 13px 8px; height: 96px; display: grid; place-items: center; }
[data-tema="terang"] .kartu-gambar { background: #DCEAF2; }
.kartu-gambar img { max-width: 100%; max-height: 70px; object-fit: contain; }
.kartu-ikan.terkunci .kartu-gambar img { filter: brightness(0); opacity: .5; }
.kartu-kosong { width: 46px; height: 46px; border-radius: 50%; background: currentColor; opacity: .22; }
.kartu-isi { padding: 9px 8px 11px; }
.kartu-nama { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--teks); }
.kartu-ikan.terkunci .kartu-nama { color: var(--teks-3); }
.kartu-rekor { font-size: 11.5px; color: var(--teks-3); margin-top: 3px; }

/* ------------------------------------------------------------ GUDANG */
.baris-ikan { display: grid; grid-template-columns: 22px 44px 1fr auto; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--panel-2); margin-bottom: 7px; }
.baris-ikan.dikunci { opacity: .55; }
.baris-ikan img { width: 44px; height: 40px; object-fit: contain; }
.baris-nama { font-weight: 700; font-size: 14px; }
.baris-berat { font-size: 12.5px; color: var(--teks-3); }
.baris-harga { font-family: var(--mono); font-weight: 700; color: var(--gold); }
.bar-aksi { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-top: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* ------------------------------------------------- FILE MANAGER ADMIN */
.remah { display: flex; flex-wrap: wrap; gap: 5px; font-size: 13.5px; margin-bottom: 14px; }
.remah a { color: var(--aqua); font-weight: 600; }
.remah span { color: var(--teks-3); }
.berkas-kisi { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 11px; }
.berkas-kartu { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.berkas-pratinjau { height: 92px; display: grid; place-items: center; background: #12384A; padding: 8px; }
[data-tema="terang"] .berkas-pratinjau { background: #DCEAF2; }
.berkas-pratinjau img { max-width: 100%; max-height: 76px; object-fit: contain; }
.berkas-ikon { font-size: 26px; color: var(--teks-3); }
.berkas-isi { padding: 9px; }
.berkas-nama { font-size: 12px; font-weight: 600; word-break: break-all; line-height: 1.35; }
.berkas-meta { font-size: 11px; color: var(--teks-3); margin-top: 3px; }
.berkas-aksi { display: flex; gap: 5px; margin-top: 8px; }
.berkas-aksi a, .berkas-aksi button { flex: 1; padding: 4px 6px; font-size: 11.5px; font-weight: 700; text-align: center; border-radius: 6px; border: 1px solid var(--border-soft); background: transparent; color: var(--teks-2); cursor: pointer; font-family: inherit; }
.berkas-aksi a:hover, .berkas-aksi button:hover { color: var(--teks); border-color: var(--border); text-decoration: none; }
.berkas-aksi .bahaya:hover { color: var(--coral); border-color: var(--coral); }
.zona-unggah { border: 1.5px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; margin-bottom: 16px; }

/* ============================================================ TOKO */
.toko-kisi { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.toko-kartu {
  display: flex; flex-direction: column;
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 12px; position: relative;
}
.toko-kartu.dipakai { border-color: var(--aqua); box-shadow: 0 0 0 1px var(--aqua) inset; }
.toko-gambar {
  height: 76px; display: grid; place-items: center; margin-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-radius: 8px; overflow: hidden;
}
.toko-gambar img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toko-nama { font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.toko-tag { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; min-height: 20px; }
.tag {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--border) 40%, transparent); color: var(--teks-2);
}
.tag-emas { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.tag-hijau { background: color-mix(in srgb, var(--hijau) 18%, transparent); color: var(--hijau); }
.toko-kaki { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.toko-harga { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--gold); }
.toko-harga .angka::before { content: "◈ "; font-size: 12px; opacity: .8; }
.toko-status { font-size: 13px; font-weight: 700; color: var(--aqua); text-align: center; }
.toko-beli-grup { display: flex; gap: 6px; }
.toko-jumlah { width: 58px; padding: 7px 8px; text-align: center; }
.toko-beli-grup .tombol { flex: 1; }
.toko-punya { font-size: 12px; color: var(--teks-3); text-align: right; }

/* ==================================================== TEMAN & SOSIAL */
.hasil-cari { margin-top: 12px; }
.baris-teman { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.baris-teman:last-child { border-bottom: 0; }
.teman-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: var(--aqua-deep); color: #fff; flex: none; }
.teman-avatar.kecil { width: 30px; height: 30px; font-size: 13px; }
.teman-info { flex: 1; min-width: 0; }
.teman-nama { font-weight: 700; font-size: 14px; }
.teman-meta { font-size: 12px; color: var(--teks-3); }
.teman-aksi { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tombol-ikon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--teks-2); cursor: pointer; font-size: 18px; line-height: 1; }
.tombol-ikon:hover { color: var(--teks); }
.teks-hijau { color: var(--hijau); } .teks-coral { color: var(--coral); }

/* ==================================================== CHAT */
.chat-tab { display: flex; gap: 4px; margin-bottom: 12px; }
.chat-tab-btn { padding: 8px 16px; font-family: inherit; font-weight: 700; font-size: 14px; color: var(--teks-3); background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 10px; cursor: pointer; }
.chat-tab-btn.aktif { color: var(--aqua); border-color: var(--aqua); }
.chat-kotak { height: 52vh; min-height: 300px; overflow-y: auto; padding: 14px; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 14px 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.chat-baris { display: flex; }
.chat-baris.saya { justify-content: flex-end; }
.chat-gelembung { max-width: 76%; padding: 8px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border-soft); }
.chat-baris.saya .chat-gelembung { background: var(--aqua-deep); border-color: transparent; color: #fff; }
.chat-pengirim { font-size: 11.5px; font-weight: 700; color: var(--aqua); margin-bottom: 2px; }
.chat-baris.saya .chat-pengirim { color: #cfeee8; }
.chat-teks { font-size: 14px; line-height: 1.45; word-break: break-word; }
.chat-tulis { display: flex; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--border-soft); border-top: 0; border-radius: 0 0 14px 14px; }
.chat-tulis input { flex: 1; }
.chat-pribadi-tata { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
.chat-teman-daftar { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.chat-teman-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--panel-2); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--teks); text-align: left; }
.chat-teman-item.aktif { border-color: var(--aqua); color: var(--aqua); }
.chat-flash { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--coral); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 13px; z-index: 60; }

/* ==================================================== BARTER */
.barter-teman-kisi, .barter-buat-tata { display: grid; gap: 12px; }
.barter-teman-kisi { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.barter-teman-kartu { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--panel-2); text-align: center; }
.barter-teman-kartu:hover { border-color: var(--aqua); text-decoration: none; }
.barter-baris { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.barter-baris:last-child { border-bottom: 0; }
.barter-ringkas { flex: 1; min-width: 160px; }
.barter-lawan { font-weight: 700; }
.barter-hitung { font-size: 13px; margin-top: 2px; }
.barter-catatan { font-size: 12.5px; color: var(--teks-3); font-style: italic; margin-top: 3px; }
.barter-aksi { display: flex; gap: 6px; flex-wrap: wrap; }
.barter-riwayat-baris { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.barter-riwayat-baris:last-child { border-bottom: 0; }
.barter-buat-tata { grid-template-columns: 1fr 1fr; }
.barter-ikan-daftar { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.barter-ikan-pilih { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border-soft); border-radius: 10px; cursor: pointer; }
.barter-ikan-pilih:has(input:checked) { border-color: var(--aqua); background: color-mix(in srgb, var(--aqua) 8%, transparent); }
.barter-ikan-pilih img, .barter-ikan-pilih .ikan-kosong { width: 40px; height: 32px; object-fit: contain; flex: none; }
.barter-ikan-info { display: flex; flex-direction: column; }
.barter-ringkas-kirim { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mini-ikan { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.mini-ikan img, .mini-ikan .ikan-kosong { width: 38px; height: 30px; object-fit: contain; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-isi { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px; max-width: 440px; width: 100%; max-height: 84vh; overflow-y: auto; position: relative; }
.modal-tutup { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--teks-3); font-size: 24px; cursor: pointer; line-height: 1; }
.modal-sisi { margin-top: 14px; } .modal-sisi h4 { margin: 0 0 6px; }

@media (max-width: 700px) {
  .barter-buat-tata, .chat-pribadi-tata { grid-template-columns: 1fr; }
  .chat-teman-daftar { flex-direction: row; overflow-x: auto; }
}

/* ==================================================== PAPAN PERINGKAT */
.rank-tab { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.rank-tab::-webkit-scrollbar { display: none; }
.rank-tab-btn { padding: 8px 14px; white-space: nowrap; font-weight: 700; font-size: 13.5px; color: var(--teks-3); background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 999px; }
.rank-tab-btn:hover { color: var(--teks); text-decoration: none; }
.rank-tab-btn.aktif { color: var(--abyss); background: var(--aqua); border-color: transparent; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; margin-bottom: 16px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border-soft); position: relative; }
.podium-slot.emas { padding-top: 26px; border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 8%, var(--panel)); }
.podium-slot.perak { border-color: color-mix(in srgb, #B8C4CC 45%, transparent); }
.podium-slot.perunggu { border-color: color-mix(in srgb, #C08457 45%, transparent); }
.podium-slot.saya { box-shadow: 0 0 0 2px var(--aqua) inset; }
.podium-medali { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; font-family: var(--mono); }
.emas .podium-medali { background: var(--gold); color: #3a2c00; }
.perak .podium-medali { background: #B8C4CC; color: #2a3238; }
.perunggu .podium-medali { background: #C08457; color: #38200f; }
.podium-avatar { width: 46px; height: 46px; font-size: 18px; }
.emas .podium-avatar { width: 56px; height: 56px; font-size: 22px; }
.podium-nama { font-weight: 700; font-size: 14px; text-align: center; word-break: break-word; }
.podium-nilai { font-size: 13px; color: var(--gold); font-weight: 700; text-align: center; }
.podium-ekstra { font-size: 11px; color: var(--teks-3); text-align: center; }

.rank-baris { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-soft); }
.rank-baris:last-child { border-bottom: 0; }
.rank-baris.saya { background: color-mix(in srgb, var(--aqua) 8%, transparent); }
.rank-nomor { width: 32px; text-align: center; font-weight: 700; font-size: 15px; color: var(--teks-3); flex: none; }
.rank-nama { flex: 1; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-nilai { font-weight: 700; font-size: 14px; color: var(--teks); white-space: nowrap; }
.rank-milik-saya { margin-top: 14px; }

@media (max-width: 560px) {
  .podium-slot { padding: 12px 4px; }
  .podium-nilai { font-size: 11.5px; }
}

/* ================================================== MEKANIK MANCING BARU */
.lingkaran-progres { display: block; margin: 8px auto 4px; }
.lp-alas { stroke: var(--border-soft); }
.lp-isi { transition: stroke-dashoffset .08s linear, stroke .2s; }
.lp-teks { font-family: var(--mono); font-size: 24px; font-weight: 700; fill: var(--teks); }

.bar-mancing {
  position: relative; height: 46px; margin: 14px auto; max-width: 620px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; cursor: pointer; touch-action: none; user-select: none;
}
.bar-zona {
  position: absolute; top: 4px; bottom: 4px; border-radius: 8px;
  background: color-mix(in srgb, var(--hijau) 30%, transparent);
  border: 2px solid var(--hijau); transition: none;
}
.bar-zona.nempel { background: color-mix(in srgb, var(--hijau) 55%, transparent); }
.bar-ikan {
  position: absolute; top: 50%; width: 30px; height: 38px; transform: translate(-50%, -50%);
  background: var(--gold); border-radius: 6px 10px 6px 10px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 60%, transparent);
}
.bar-ikan::after {
  content: ""; position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  border: 7px solid transparent; border-left-color: var(--gold);
}
.tombol.tahan { min-width: 200px; }
.tombol.tahan.ditekan { transform: scale(0.96); background: var(--aqua-deep); }

.hasil-kartu { text-align: center; padding: 10px; }
.hasil-judul { font-size: 15px; font-weight: 800; margin-bottom: 8px; color: var(--teks-2); }
.hasil-gambar { width: 96px; height: 76px; object-fit: contain; margin: 4px auto; display: block; }
.hasil-nama { font-size: 20px; font-weight: 800; }
.hasil-rar { font-size: 13px; font-weight: 700; opacity: .85; margin-bottom: 6px; }
.hasil-info { font-size: 15px; margin-bottom: 8px; }
.hasil-lencana { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.hasil-kartu.lepas .hasil-judul { color: var(--coral); }
.hasil-lepas { text-align: center; color: var(--teks-3); }

/* ================================================== FULLSCREEN MANCING */
.tombol-layar {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border); color: var(--teks); font-size: 18px; line-height: 1;
  backdrop-filter: blur(4px);
}
.tombol-layar:hover { color: var(--aqua); border-color: var(--aqua); }
.laut:fullscreen, .laut.sedang-penuh {
  width: 100vw; height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.laut:fullscreen .tahap, .laut.sedang-penuh .tahap { max-width: 560px; }
/* cadangan fullscreen semu untuk iOS lama */
.laut.layar-penuh-semu {
  position: fixed; inset: 0; z-index: 200; width: 100vw; height: 100vh; border-radius: 0;
}

/* ================================================== ASET TAMPILAN ADMIN */
.aset-baris { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.aset-preview { flex: 0 0 280px; max-width: 280px; }
.aset-gambar { width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }
.aset-kosong {
  width: 100%; height: 158px; border-radius: 10px; border: 1px dashed var(--border);
  display: grid; place-items: center; text-align: center; color: var(--teks-3);
  background: var(--panel-2);
}
.aset-atur { flex: 1 1 260px; min-width: 240px; }

/* ================================================== GALERI TAB + MODAL */
.tab-rarity { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-r {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--panel);
  color: var(--teks-2); font-weight: 700; cursor: pointer; font-size: 14px;
}
.tab-r.aktif { border-color: var(--wr); color: var(--teks); box-shadow: inset 0 -3px 0 var(--wr); }
.tab-r-jml { font-size: 12px; color: var(--teks-3); font-family: var(--mono); }
.kartu-ikan[data-ikan] { cursor: pointer; transition: transform .1s; }
.kartu-ikan[data-ikan]:hover { transform: translateY(-2px); }

.modal-lapis {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-kotak {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  max-width: 460px; width: 100%; max-height: 82vh; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}
.modal-tutup {
  position: absolute; top: 8px; right: 10px; background: none; border: none;
  color: var(--teks-2); font-size: 26px; line-height: 1; cursor: pointer; z-index: 2;
}
#modalIsi { padding: 18px; overflow-y: auto; }
.modal-kepala { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--border); }
.modal-gambar { width: 72px; height: 60px; object-fit: contain; }
.modal-nama { font-size: 20px; font-weight: 800; }
.modal-rar { font-size: 13px; color: var(--teks-3); font-weight: 700; }
.modal-tabel-bungkus { max-height: 46vh; overflow-y: auto; }
.modal-tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.modal-tabel th { text-align: left; color: var(--teks-3); font-size: 12px; padding: 4px 8px; position: sticky; top: 0; background: var(--panel); }
.modal-tabel td { padding: 6px 8px; border-top: 1px solid var(--border); }

/* ================================================== GUDANG DROPDOWN */
.gudang-pilih { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.gudang-pilih label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 13px; flex: 1 1 200px; }
.gudang-pilih select { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel-2); color: var(--teks); font-size: 14px; }
.daftar-stok { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px; }
.tombol.sekunder { background: var(--panel-2); color: var(--teks-2); border: 1px solid var(--border); }

/* penanda ikan pakai gambar kustom */
.bar-ikan.pakai-gambar {
  background: none center/contain no-repeat;
  border-radius: 0;
}
.bar-ikan.pakai-gambar::after { display: none; }

/* ================================================== TABEL ADMIN ITEM */
.tabel-admin { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabel-admin th { text-align: left; color: var(--teks-3); font-size: 12px; font-weight: 700; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.tabel-admin td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabel-admin tr:last-child td { border-bottom: none; }
