/* LinksFighters — dark fantasy, emas + ungu */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d0a1a;
  --panel: #1a1330;
  --panel2: #241a42;
  --line: #33265e;
  --gold: #f5c542;
  --gold-dim: #c9a227;
  --purple: #8b5cf6;
  --text: #f3ead8;
  --muted: #a99fc7;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
#app { max-width: 480px; margin: 0 auto; padding: 0 12px 32px; }
h1 { font-size: 24px; margin: 18px 0 6px; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
b { color: var(--gold); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 2px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.logo { font-size: 18px; letter-spacing: .3px; }
.logo b { color: var(--gold); }
.gold-pill {
  background: var(--panel); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 15px;
}
.gold-pill span { color: var(--gold); }

/* ---------- Tombol ---------- */
.btn {
  border: none; border-radius: 12px; padding: 12px 16px;
  font-size: 15px; font-weight: 700; cursor: pointer; color: #1a1206;
  background: var(--gold); transition: transform .08s ease, filter .15s;
}
.btn:active { transform: scale(.96); }
.btn.gold { background: linear-gradient(135deg, #ffe27a, var(--gold)); }
.btn.big { width: 100%; padding: 14px; font-size: 16px; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.danger { background: #3a2030; color: #fca5a5; border: 1px solid #7f2d3a; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- Layar pilih kelas ---------- */
.screen { text-align: center; padding-bottom: 20px; }
.screen p { margin-bottom: 16px; line-height: 1.5; }
.class-cards { display: flex; flex-direction: column; gap: 12px; }
.class-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: 16px;
  padding: 16px; text-align: left; cursor: pointer;
  transition: border-color .15s, transform .08s;
}
.class-card:active { transform: scale(.98); border-color: var(--gold); }
.class-card .cc-icon { font-size: 40px; }
.class-card h3 { font-size: 19px; margin: 6px 0 2px; }
.class-card p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.cc-stats { display: flex; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.cc-stats b { color: var(--text); }
.cc-passive { margin-top: 8px; font-size: 13px; color: var(--gold); }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* ---------- Kartu hero ---------- */
.hero-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin: 12px 0;
}
.hero-head { display: flex; gap: 12px; align-items: center; }
.hero-avatar {
  font-size: 44px; width: 64px; height: 64px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #2c2154; border: 2px solid var(--gold-dim); border-radius: 50%;
}
.hero-info { flex: 1; min-width: 0; }
.hero-name { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.lvl-badge {
  background: var(--purple); color: #fff; font-size: 12px;
  padding: 2px 8px; border-radius: 999px; margin-left: 4px;
}
.bar-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.bar-label { font-size: 11px; width: 22px; color: var(--muted); }
.bar { flex: 1; height: 12px; background: #0a0714; border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.bar.hp .fill { background: linear-gradient(90deg, #22c55e, var(--green)); }
.bar.xp .fill { background: linear-gradient(90deg, var(--purple), #c084fc); }
.bar.mon-hp { height: 14px; }
.bar.mon-hp .fill { background: linear-gradient(90deg, #dc2626, var(--red)); }
.bar-num { font-size: 12px; min-width: 64px; text-align: right; color: var(--muted); }
.stat-row {
  display: flex; justify-content: space-between; gap: 6px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; flex-wrap: wrap;
}
.stat-row b { color: var(--text); }
.hero-sub { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.passive { margin-top: 8px; font-size: 13px; color: var(--gold); background: rgba(245,197,66,.08); border-radius: 8px; padding: 6px 8px; }

/* ---------- Tab ---------- */
.tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.tabs button {
  flex: 1; padding: 11px 4px; border-radius: 12px; font-size: 14px; font-weight: 700;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line); cursor: pointer;
}
.tabs button.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.tab-page { animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Arena 3D ---------- */
.battle-arena {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
}
#battle3d { width: 100%; aspect-ratio: 8 / 5; display: block; border-radius: 12px; }
.arena-hud { display: flex; gap: 12px; margin-top: 8px; }
.hud-side { flex: 1; min-width: 0; }
.hud-side:last-child { text-align: right; }
.hud-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.hud-side .bar-num { text-align: center; font-size: 12px; margin-top: 2px; }
/* ---------- Layout 3 kolom ala AFK (versi kita) ---------- */
.battle-layout { display: flex; flex-direction: column; gap: 12px; }
.bl-hero .hero-card { margin: 0; }
.bl-side { display: flex; flex-direction: column; gap: 12px; }
.panel {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 16px; padding: 14px;
}
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.panel .btn { margin-top: 10px; }
/* Panel "Sesi ini" — overlay di dalam arena (ala AFK) */
.session-stats { font-size: 12px; color: var(--muted); line-height: 1.7; }
.session-stats b { color: var(--text); }
.session-stats .ss-title { display: block; font-weight: 800; color: var(--text); font-size: 11px; letter-spacing: 1px; margin-bottom: 2px; }
.session-overlay {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  background: rgba(10, 7, 20, .82); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 10px;
}
.session-overlay span { display: block; }
/* Banner nama zona di bawah arena */
.zone-banner {
  margin-top: 8px; text-align: center; font-weight: 900; letter-spacing: 1px; font-size: 14px;
  color: var(--gold); background: rgba(245, 197, 66, .08); border: 1px solid var(--gold-dim);
  border-radius: 10px; padding: 6px 10px;
}
/* Background arena ikut map yang aktif */
.battle-arena[data-zone="hutan"] { background: radial-gradient(220px 120px at 25% 20%, rgba(74,222,128,.22), transparent 70%), radial-gradient(220px 120px at 75% 20%, rgba(34,197,94,.16), transparent 70%), var(--panel); }
.battle-arena[data-zone="gurun"] { background: radial-gradient(220px 120px at 25% 20%, rgba(245,158,11,.22), transparent 70%), radial-gradient(220px 120px at 75% 20%, rgba(217,119,6,.16), transparent 70%), var(--panel); }
.battle-arena[data-zone="rawa"] { background: radial-gradient(220px 120px at 25% 20%, rgba(45,212,191,.20), transparent 70%), radial-gradient(220px 120px at 75% 20%, rgba(5,150,105,.16), transparent 70%), var(--panel); }
.battle-arena[data-zone="gunung"] { background: radial-gradient(220px 120px at 25% 20%, rgba(248,113,113,.22), transparent 70%), radial-gradient(220px 120px at 75% 20%, rgba(220,38,38,.16), transparent 70%), var(--panel); }
.battle-arena[data-zone="jurang"] { background: radial-gradient(220px 120px at 25% 20%, rgba(192,132,252,.22), transparent 70%), radial-gradient(220px 120px at 75% 20%, rgba(168,85,247,.16), transparent 70%), var(--panel); }
/* Kolam Links */
.lp-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lp-row span { color: var(--muted); }
.lp-row b { color: var(--text); }
#btn-withdraw { width: 100%; margin-top: 10px; }
.boss-badge {
  background: #dc2626; color: #fff; font-size: 11px; padding: 2px 7px;
  border-radius: 999px; vertical-align: middle;
}
.boss-progress {
  display: flex; align-items: center; gap: 10px;
  background: #0a0714; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin-top: 8px; font-size: 13px;
}
.boss-progress .bar { flex: 1; height: 10px; }
.boss-progress .bar .fill { background: linear-gradient(90deg, #dc2626, var(--red)); }
.boss-progress span { white-space: nowrap; }
.boss-progress #boss-count { color: var(--gold); font-weight: 700; }
/* Kartu target (tujuan berikutnya) */
.target-card {
  margin-top: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5;
  background: rgba(245, 197, 66, .08); border: 1px solid var(--gold-dim); border-radius: 12px;
}
.target-card b { color: var(--gold); }
/* Kilatan LEVEL UP di arena */
.level-flash {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  font-size: 30px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 18px rgba(245, 197, 66, .8); opacity: 0; pointer-events: none; z-index: 6;
}
.level-flash.go { animation: levelflash 1.2s ease forwards; }
@keyframes levelflash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
/* Preview tas di kolom kanan */
.inv-mini {
  display: flex; justify-content: space-between; gap: 8px;
  background: #0a0714; border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 8px; padding: 7px 10px; font-size: 13px; margin-bottom: 6px;
}
/* Filter tas */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.chip {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line); cursor: pointer;
}
.chip.active { background: var(--purple); color: #fff; border-color: var(--purple); }
/* Profil */
.profil-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 14px;
}
.pf-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.pf-row:last-child { border-bottom: none; }
.pf-row span { color: var(--muted); }
.pf-row b { color: var(--text); }
.howto { margin: 4px 0 12px 20px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.howto b { color: var(--text); }
/* Topbar: 2 pil (Gold + LINKS) */
.top-pills { display: flex; gap: 8px; }
.links-pill {
  background: var(--panel); border: 1px solid var(--purple);
  border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 15px;
}
.links-pill span { color: #c084fc; }

@media (min-width: 900px) {
  #app { max-width: 1080px; }
  .battle-layout {
    display: grid; grid-template-columns: 260px 1fr 260px;
    grid-template-areas: "hero center side";
    gap: 14px; align-items: start;
  }
  .bl-hero { grid-area: hero; }
  .bl-center { grid-area: center; min-width: 0; }
  .bl-side { grid-area: side; }
  .pack-list { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- Log ---------- */
.battle-log {
  list-style: none; margin: 10px 0 4px; background: #0a0714;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 13px; line-height: 1.65; min-height: 118px;
}
.battle-log li { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle-log li.good { color: var(--green); }
.battle-log li.bad { color: var(--red); }
.battle-log li.gold { color: var(--gold); }
.battle-log li.boss { color: #fca5a5; font-weight: 700; }

/* ---------- Zona ---------- */
.sec-title { margin: 16px 0 8px; }
.zone-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.zone-btn {
  flex: 0 0 132px; flex-direction: column; align-items: flex-start; gap: 4px;
}
.zone-btn .z-icon { font-size: 28px; }
.zone-btn .z-name { font-size: 14px; }
.zone-btn .z-desc { display: none; }
.zone-btn .z-links { font-size: 12px; color: var(--gold); }
.zone-btn .z-lock { margin-left: 0; font-size: 11px; }
.zone-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; color: var(--text); cursor: pointer; width: 100%;
}
.zone-btn.active { border-color: var(--gold); background: #2a2148; }
.zone-btn:disabled { opacity: .5; cursor: default; }
.zone-btn .z-icon { font-size: 26px; }
.zone-btn .z-name { font-weight: 700; font-size: 15px; }
.zone-btn .z-desc { font-size: 12px; color: var(--muted); }
.zone-btn .z-lock { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Gear ---------- */
.gear-head { display: flex; justify-content: space-between; align-items: center; }
.equipped-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  min-height: 92px;
}
.slot-card .slot-name { font-size: 12px; color: var(--muted); }
.slot-card .item-name { font-weight: 700; font-size: 14px; margin: 3px 0; }
.slot-card .item-stats { font-size: 12px; color: var(--muted); line-height: 1.5; }
.slot-card .item-empty { color: var(--muted); font-size: 13px; margin-top: 6px; }
.upgrade-btn {
  margin-top: 8px; width: 100%; padding: 7px; font-size: 12px; font-weight: 700;
  border-radius: 8px; border: 1px solid var(--gold-dim); background: transparent; color: var(--gold); cursor: pointer;
}
.upgrade-btn:disabled { opacity: .4; cursor: default; }
.inventory { display: flex; flex-direction: column; gap: 8px; }
.inv-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 12px; padding: 10px 12px;
}
.inv-item .inv-info { flex: 1; min-width: 0; }
.inv-item .inv-name { font-weight: 700; font-size: 14px; }
.inv-item .inv-stats { font-size: 12px; color: var(--muted); }
.inv-actions { display: flex; gap: 6px; }
.mini-btn {
  padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer;
}
.mini-btn.use { border-color: var(--gold-dim); color: var(--gold); }
.empty-note { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- Pack ---------- */
.pack-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.pack-card {
  background: var(--panel); border: 2px dashed var(--line); border-radius: 16px;
  padding: 16px; position: relative; opacity: .92;
}
.pack-card .pack-tag {
  position: absolute; top: -10px; right: 12px;
  background: var(--purple); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.pack-card h3 { font-size: 19px; }
.pack-card .pack-icon { font-size: 34px; }
.pack-card .pack-chest img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.pack-card p { color: var(--muted); font-size: 14px; margin: 4px 0 10px; line-height: 1.45; }
.pack-benefits { list-style: none; font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.pack-benefits li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.pack-price { font-size: 17px; font-weight: 800; color: var(--gold); }
.pack-price small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pack-lock {
  margin-top: 12px; width: 100%; padding: 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--muted);
  font-size: 14px; font-weight: 700; cursor: not-allowed;
}
.pack-note {
  margin-top: 16px; background: rgba(139, 92, 246, .12);
  border: 1px solid var(--purple); border-radius: 12px; padding: 12px;
  font-size: 13px; line-height: 1.6; color: var(--text);
}

/* ---------- Footer / modal / toast ---------- */
[hidden] { display: none !important; }
.foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.modal {
  position: fixed; inset: 0; background: rgba(5, 3, 12, .82);
  display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px;
}
.modal-card {
  background: var(--panel2); border: 2px solid var(--gold-dim); border-radius: 20px;
  padding: 24px 20px; max-width: 380px; width: 100%; text-align: center;
}
.modal-icon { font-size: 48px; }
.modal-card h2 { margin: 8px 0 4px; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-rewards { margin: 16px 0; font-size: 17px; line-height: 1.9; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #241a42; border: 1px solid var(--gold-dim); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 30;
  max-width: 92vw; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.5);
}

/* ============================================================
   LAPISAN PREMIUM — LinksFighters (animasi, glow, damage numbers)
   ============================================================ */

/* Background hidup: gradien ungu gelap + cahaya emas bergerak + pola grid samar (versi kita, bukan AFK) */
body {
  background:
    radial-gradient(600px 300px at 85% -5%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(500px 260px at 5% 0%, rgba(245, 197, 66, .12), transparent 55%),
    radial-gradient(700px 500px at 50% 115%, rgba(139, 92, 246, .16), transparent 60%),
    repeating-linear-gradient(0deg, rgba(139, 92, 246, .05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(139, 92, 246, .05) 0 1px, transparent 1px 44px),
    var(--bg);
  background-attachment: fixed;
}
.topbar { background: rgba(13, 10, 26, .85); backdrop-filter: blur(8px); }

/* Nama game: teks gradien emas + glow */
.brand {
  font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(100deg, #ffe27a 10%, var(--gold) 40%, #c084fc 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 22px rgba(245, 197, 66, .35);
}
.brand-hero { margin: 26px 0 6px; animation: popin .45s ease; }
.brand-mark { font-size: 54px; filter: drop-shadow(0 0 18px rgba(245, 197, 66, .55)); animation: floaty 3s ease-in-out infinite; }
.brand-name {
  font-size: 40px; font-weight: 900; letter-spacing: 1px; line-height: 1.1;
  background: linear-gradient(100deg, #fff7cc 0%, var(--gold) 35%, #e9d5ff 70%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 14px rgba(139, 92, 246, .45));
}
.brand-tag { color: var(--muted); font-size: 14px; margin-top: 6px; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes popin { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

/* Kartu hero: glow emas lembut + animasi naik level */
.hero-card { box-shadow: 0 0 0 1px rgba(245, 197, 66, .12), 0 10px 30px rgba(0, 0, 0, .45); }
.hero-card.levelup { animation: levelpop .7s ease; }
@keyframes levelpop {
  0% { box-shadow: 0 0 0 0 rgba(245, 197, 66, .7); }
  60% { box-shadow: 0 0 0 14px rgba(245, 197, 66, 0); }
  100% { box-shadow: 0 0 0 1px rgba(245, 197, 66, .12), 0 10px 30px rgba(0, 0, 0, .45); }
}
/* Bar XP berkilau */
.bar.xp .fill { position: relative; overflow: hidden; }
.bar.xp .fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%);
  animation: shimmer 2.2s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Arena 3D: glow + guncangan saat crit */
.battle-arena {
  position: relative; overflow: hidden;
  background:
    radial-gradient(220px 120px at 25% 20%, rgba(139, 92, 246, .18), transparent 70%),
    radial-gradient(220px 120px at 75% 20%, rgba(220, 38, 38, .14), transparent 70%),
    var(--panel);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
}
.battle-arena.crit-shake { animation: critshake .3s ease; }
@keyframes critshake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}
/* Efek tebasan pedang: busur cahaya yang nyapu pas mukul */
.slash-fx {
  position: absolute; top: 22%; right: 12%; width: 110px; height: 110px;
  pointer-events: none; z-index: 5; opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.95) 50%, rgba(147,197,253,.9) 56%, rgba(255,255,255,0) 64%);
  border-radius: 50%;
  transform: rotate(-70deg) scale(.6);
}
.slash-fx.at-hero { right: auto; left: 12%; }
.slash-fx.red { background: linear-gradient(135deg, rgba(255,255,255,0) 42%, rgba(248,113,113,.95) 50%, rgba(220,38,38,.9) 56%, rgba(255,255,255,0) 64%); }
.slash-fx.go { animation: slashsweep .28s ease-out; }
.slash-fx.go.crit { animation: slashsweep .34s ease-out; width: 140px; height: 140px; }
@keyframes slashsweep {
  0% { opacity: 0; transform: rotate(-70deg) scale(.6); }
  25% { opacity: 1; transform: rotate(-20deg) scale(1); }
  100% { opacity: 0; transform: rotate(25deg) scale(1.35); }
}
/* Percikan api pas kena tebas */
.spark {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #fde68a; box-shadow: 0 0 10px #f59e0b;
  animation: sparkfly .5s ease-out forwards;
}
.spark.red { background: #fca5a5; box-shadow: 0 0 10px #ef4444; }
@keyframes sparkfly { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx, 20px), var(--dy, -30px)) scale(0); } }
/* Bar HP/XP bergerak halus */
.bar .fill { transition: width .25s ease; }

/* Angka damage melayang */
.dmg-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.dmg-num {
  position: absolute; font-weight: 900; font-size: 22px; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 12px rgba(255,255,255,.35);
  animation: floatup .95s ease-out forwards; white-space: nowrap;
}
.dmg-num.crit {
  font-size: 30px; color: #fbbf24;
  text-shadow: 0 2px 0 rgba(0,0,0,.65), 0 0 18px rgba(251, 191, 36, .8);
}
.dmg-num.hurt { color: #f87171; font-size: 20px; }
.dmg-num.heal { color: #4ade80; font-size: 18px; }
.dmg-num.gold { color: #f5c542; font-size: 16px; }
@keyframes floatup {
  0% { opacity: 0; transform: translateY(6px) scale(.8); }
  15% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 0; transform: translateY(-58px) scale(1); }
}

/* Badge boss berdenyut */
.boss-badge { animation: bosspulse 1.2s ease-in-out infinite; }
@keyframes bosspulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }

/* Tombol ulang di kartu hero + status persenjatai */
.hero-reset { margin-top: 10px; width: 100%; }
.btn.armed { background: #dc2626 !important; border-color: #fca5a5 !important; color: #fff !important; animation: bosspulse 1s ease-in-out infinite; }

/* Badge TRIAL di kartu hero + teks coba gratis di kartu spesial */
.trial-badge { background: #f59e0b; color: #111; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.cc-trial { font-size: 12px; color: var(--gold); margin-top: 4px; }
/* Mini map zona */
.mini-map { position: relative; display: flex; justify-content: space-between; padding: 20px 4px 4px; margin: 2px 0; }
.map-line { position: absolute; left: 10%; right: 10%; top: 42px; height: 3px; background: linear-gradient(90deg, var(--purple), var(--gold)); opacity: .5; border-radius: 2px; }
.map-node { position: relative; flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 0 2px; color: var(--text); font-family: inherit; }
.map-node:disabled { cursor: not-allowed; }
.map-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--panel2); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.map-node.here .map-dot { border-color: var(--gold); animation: herepulse 1.6s ease-in-out infinite; }
@keyframes herepulse { 0%,100% { box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 0 12px rgba(245,197,66,.4); } 50% { box-shadow: 0 0 0 6px rgba(245,197,66,.2), 0 0 20px rgba(245,197,66,.7); } }
.map-node.locked .map-dot { opacity: .45; }
.map-hero { position: absolute; top: -16px; font-size: 16px; }
.map-name { font-size: 10px; font-weight: 700; text-align: center; line-height: 1.2; }
.map-lv { font-size: 9px; color: var(--muted); }

/* Kartu kelas: hover glow + ikon besar */
.class-card { box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.class-card:hover { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 8px 26px rgba(139, 92, 246, .25); }
/* Kartu hero spesial: border emas + aura elemen */
.class-card.special { border-color: var(--gold); background: linear-gradient(160deg, rgba(245,197,66,.10), rgba(139,92,246,.08)), var(--panel); }
.class-card.special .cc-svg img { animation: aurapulse 1.8s ease-in-out infinite; }
.cc-special {
  display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 900; letter-spacing: .08em;
  color: #1a1206; background: linear-gradient(90deg, #fbbf24, #f59e0b);
  padding: 3px 9px; border-radius: 999px;
}
.cc-element { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--aura, #c084fc); }
.cc-price { margin-top: 4px; font-size: 13px; color: var(--gold); font-weight: 700; }

/* Tombol emas: gradien + kilau */
.btn.gold {
  box-shadow: 0 4px 16px rgba(245, 197, 66, .35);
  background: linear-gradient(135deg, #ffe27a, var(--gold) 55%, #d4a017);
}
.btn.gold:active { filter: brightness(1.1); }
.tabs button.active { box-shadow: 0 0 14px rgba(139, 92, 246, .5); }

/* Pack Legenda: bingkai emas */
.pack-card.legenda { border: 2px solid var(--gold-dim); box-shadow: 0 0 24px rgba(245, 197, 66, .22); }
.pack-card.juara { border-color: #22d3ee; }
.pack-card.petualang { border-color: var(--purple); }

/* Modal muncul halus */
.modal-card { animation: popin .3s ease; }
.toast { animation: toastup .25s ease; }
@keyframes toastup { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Zona aktif: glow emas */
.zone-btn.active { box-shadow: 0 0 16px rgba(245, 197, 66, .25); }

/* Kartu kelas: SVG hero di kiri, teks di kanan */
.class-card { display: flex; gap: 14px; align-items: center; }
.cc-svg { flex: none; }
.cc-svg svg { width: 86px; height: 100px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.cc-svg img { width: 86px; height: 86px; object-fit: cover; border-radius: 12px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.cc-body { flex: 1; min-width: 0; }
.cc-body h3 { margin-top: 0; }

/* ---------- Bottom nav ala AFK + halaman baru ---------- */
#app { padding-bottom: 96px; }
.top-icon { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: 36px; height: 36px; font-size: 17px; cursor: pointer; line-height: 1; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: rgba(13, 10, 26, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; }
.bottomnav button { flex: 1; min-width: 0; background: none; border: none; color: var(--muted); font-size: 19px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 12px; }
.bottomnav button span { font-size: 10px; font-weight: 700; }
.bottomnav button.active { color: var(--gold); background: rgba(245, 197, 66, .1); }
.page { animation: fadein .2s ease; }
.hero-actions, .boss-actions, .gear-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hero-actions .btn, .boss-actions .btn { flex: 1; white-space: nowrap; }
.good { color: var(--green); }

/* ---------- Toko ---------- */
.store-pills { display: flex; gap: 10px; margin: 10px 0; }
.store-pills span { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.store-tabs, .market-tabs, .comm-tabs { display: flex; gap: 8px; margin: 10px 0; overflow-x: auto; }
.store-tabs button, .market-tabs button, .comm-tabs button { flex: 1; white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
.store-tabs button.active, .market-tabs button.active, .comm-tabs button.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.new-badge { background: #f59e0b; color: #1a1206; font-size: 9px; padding: 2px 5px; border-radius: 6px; vertical-align: middle; }
.store-sec { margin-bottom: 18px; }
.store-sec-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; letter-spacing: 1px; font-size: 13px; color: var(--gold); margin: 14px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.qty-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.qty-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; color: var(--text); font-weight: 700; cursor: pointer; }
.qty-btn.active { background: var(--gold); color: #1a1206; border-color: var(--gold); }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shop-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.shop-icon { font-size: 34px; }
.shop-name { font-weight: 800; font-size: 13px; }
.shop-sub { font-size: 11px; color: var(--muted); line-height: 1.35; }
.buy-btn { margin-top: auto; background: linear-gradient(135deg, #ffe27a, var(--gold)); border: none; border-radius: 10px; padding: 8px 6px; font-weight: 800; font-size: 13px; color: #1a1206; cursor: pointer; }
.buy-btn:disabled { opacity: .45; cursor: default; }
.buy-btn.gold { box-shadow: 0 0 10px rgba(245, 197, 66, .5); }

/* ---------- Pasar ---------- */
.input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--text); font-size: 15px; }
.input.search { margin: 4px 0 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.market-wrap { margin-bottom: 10px; }
.market-wrap.featured { border: 2px solid var(--gold); border-radius: 14px; padding: 6px; background: rgba(245, 197, 66, .06); }
.mi-featured { font-size: 11px; font-weight: 800; color: var(--gold); margin: 2px 4px 6px; }
.market-item { display: flex; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; align-items: center; }
.mi-icon { width: 52px; height: 52px; flex: none; border: 2px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: #0a0714; }
.mi-body { flex: 1; min-width: 0; }
.mi-name { font-weight: 800; font-size: 14px; }
.mi-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mi-buy { text-align: right; flex: none; }
.mi-price { font-weight: 800; color: #c084fc; margin-bottom: 6px; font-size: 15px; }
.mi-buy .buy-btn { padding: 8px 16px; }

/* ---------- Komunitas / Hadiah / Ajak ---------- */
.gold-frame { border: 2px solid var(--gold-dim); }
.guild-form { display: flex; gap: 8px; margin: 10px 0; }
.guild-form .input { flex: 1; }
.dao-btns { display: flex; gap: 8px; margin-top: 10px; }
.share-row { display: flex; gap: 8px; margin: 12px 0 8px; align-items: center; }
.share-row span:first-child { font-size: 12px; font-weight: 800; color: var(--gold); }
.share-bar { flex: 1; height: 10px; background: #0a0714; border-radius: 999px; overflow: hidden; }
.share-bar div { height: 100%; background: linear-gradient(90deg, var(--purple), #c084fc); }
.boost-big { font-size: 30px; font-weight: 900; color: var(--green); text-align: center; margin: 8px 0; }
.unlock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.unlock { background: #0a0714; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.unlock.ok { border-color: var(--green); }
.task-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.task-row:last-child { border-bottom: none; }
.task-check { font-size: 16px; }
.task-name { flex: 1; }
.task-prog { color: var(--muted); font-size: 12px; }
.invite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.inv-big { font-size: 30px; font-weight: 900; color: var(--gold); text-align: center; }
.inv-sub { text-align: center; font-size: 13px; font-weight: 700; }
.invite-link-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.invite-link { flex: 1; min-width: 0; background: #0a0714; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.share-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.share-ico { font-size: 20px; }

/* ---------- Modal umum ---------- */
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-card { position: relative; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
