/* BLOBLAST — karanlık lab teması, neon yeşil vurgu */
:root {
  --bg: #070d0f;
  --panel: #0e1a1e;
  --panel2: #122329;
  --line: #1e3a42;
  --acc: #3df0c2;
  --acc2: #7dd0ff;
  --danger: #ff5f6f;
  --gold: #ffd76b;
  --text: #d9f2ea;
  --dim: #6f9a94;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none; }
canvas#game { position: fixed; inset: 0; display: block; touch-action: none; }
.hidden { display: none !important; }
.dim { color: var(--dim); }
.center { text-align: center; }
.small-print { font-size: 11px; margin-top: 12px; }

/* düğmeler */
.btn { display: inline-block; border: 2px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 12px 18px; border-radius: 14px; font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: transform .06s, border-color .15s; }
.btn:active { transform: scale(0.96); border-color: var(--acc); }
.btn.big { display: block; width: 100%; padding: 18px; font-size: 24px; background: linear-gradient(180deg, #14533f, #0d3b2e);
  border-color: var(--acc); color: #eafff7; box-shadow: 0 0 24px rgba(61,240,194,0.25); margin: 10px 0; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { display: block; width: 100%; margin: 8px 0; }
.btn.disabled { opacity: 0.45; }
.btn.go { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 16px rgba(255,215,107,0.3); }
.dim-btn { opacity: 0.7; }
.btn-row { display: flex; gap: 10px; margin: 10px 0; }
.btn-row .btn { flex: 1; }

/* üst para barı */
#topbar { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; right: 12px;
  display: flex; gap: 8px; align-items: center; z-index: 30; pointer-events: none; }
#topbar .cur { background: var(--panel); border: 1px solid var(--line); padding: 6px 12px; border-radius: 20px; font-size: 14px; }
#topbar .btn { pointer-events: auto; margin-left: auto; }
#btn-daily.gift-ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,215,107,0.5); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px); }
#hud-top { display: flex; gap: 10px; align-items: flex-start; }
#hp-wrap { position: relative; width: 42%; max-width: 240px; height: 22px; background: #101c20; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
#hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #2ecc71, #a3ff7a); transition: width .15s; }
#hp-text { position: absolute; inset: 0; text-align: center; font-size: 13px; font-weight: 800; line-height: 20px; color: #06110c; mix-blend-mode: plus-lighter; }
#hud-score { margin-left: auto; text-align: right; font-weight: 800; font-size: 20px; text-shadow: 0 2px 6px #000; }
#hud-score span { font-size: 12px; color: var(--acc); font-weight: 700; }
#btn-pause { pointer-events: auto; }
#boss-bar { margin: 8px auto 0; width: 70%; max-width: 420px; height: 10px; background: #1a0e12; border: 1px solid #5a2333; border-radius: 6px; overflow: hidden; }
#boss-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff2f6f, #ff7ab0); }
#hud-bottom { position: absolute; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); display: flex; justify-content: space-between; align-items: flex-end; }
#weapon-box { background: rgba(14,26,30,0.85); border: 1px solid var(--line); padding: 8px 14px; border-radius: 12px; }
#weapon-box b { font-size: 15px; letter-spacing: 1px; }
#weapon-box span { font-size: 12px; color: var(--acc2); }
#mines-box { background: rgba(14,26,30,0.85); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; font-size: 15px; }
#combo-badge { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); font-size: 26px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 18px rgba(255,215,107,0.7); animation: pop .18s; }
@keyframes pop { 0% { transform: translateX(-50%) scale(1.5); } 100% { transform: translateX(-50%) scale(1); } }

/* ekranlar */
.screen { position: fixed; inset: 0; z-index: 25; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: rgba(4, 9, 11, 0.72); backdrop-filter: blur(6px); }
.panel { max-width: 480px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.small-panel { max-width: 380px; margin-top: 8vh; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 20px; }
.menu-inner { max-width: 360px; margin: 6vh auto 0; text-align: center; }
.title { font-size: 54px; font-weight: 900; letter-spacing: 2px; color: #eafff7; text-shadow: 0 0 30px rgba(61,240,194,0.55); }
.title span { color: var(--acc); }
.tagline { color: var(--dim); margin: 6px 0 14px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* satırlar / listeler */
.list { margin-top: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.row-l { flex: 1; font-size: 14px; }
.row-l .lvl { color: var(--acc); font-size: 12px; }
.dim .small-print { color: var(--dim); }
.bar { height: 8px; background: #0a1417; border-radius: 5px; overflow: hidden; margin: 4px 0; width: 90%; }
.bar-fill { height: 100%; background: var(--acc); }
.tabs { display: flex; gap: 8px; margin: 8px 0; }
.tabs .btn.on { border-color: var(--acc); color: var(--acc); }

/* liderlik */
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; margin-bottom: 5px; background: var(--panel2); font-size: 14px; }
.lb-row.me { border: 1px solid var(--acc); }
.lb-row.seed { opacity: 0.85; border: 1px dashed #3a5a52; }
.lb-rank { width: 34px; font-weight: 800; }
.lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 800; color: var(--gold); }
.near-miss { color: var(--gold); font-weight: 700; }
.teaser { color: var(--acc2); font-size: 13px; font-style: italic; min-height: 16px; margin: 6px 0; }
.big-score { font-size: 46px; font-weight: 900; text-align: center; color: var(--acc); text-shadow: 0 0 24px rgba(61,240,194,0.5); }

/* overlay'ler */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(4, 9, 11, 0.82); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center; padding: 20px; max-width: 520px; margin: 0 auto; }
.overlay h2 { font-size: 20px; margin-bottom: 12px; }
#cards-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.card { background: var(--panel2); border: 2px solid var(--line); border-radius: 16px; padding: 14px 10px; text-align: center; cursor: pointer; transition: transform .08s; }
.card:active { transform: scale(0.95); }
.card.rare { border-color: var(--acc2); }
.card.epic { border-color: #b58cff; box-shadow: 0 0 18px rgba(181,140,255,0.35); }
.card.golden { border-color: var(--gold); box-shadow: 0 0 26px rgba(255,215,107,0.55); animation: pulse 0.9s infinite; }
.card-tag { font-size: 10px; letter-spacing: 1px; color: var(--dim); }
.card.golden .card-tag { color: var(--gold); }
.card-name { font-weight: 900; font-size: 15px; margin: 6px 0; }
.card-desc { font-size: 12px; color: var(--dim); }
.overlay.ad { align-items: center; text-align: center; background: #000; }
#ad-kind { font-size: 22px; font-weight: 800; }
input { width: 100%; background: #0a1417; border: 1px solid var(--line); color: var(--text); padding: 12px; border-radius: 12px;
  font-size: 16px; margin: 6px 0; font-family: inherit; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  background: var(--panel); border: 1px solid var(--acc); color: var(--text); padding: 10px 18px; border-radius: 20px; z-index: 60; font-size: 14px; }
.cal { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.cal-day { width: 30px; height: 30px; border-radius: 8px; background: #0a1417; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.cal-day.on { background: #14533f; border-color: var(--acc); color: #eafff7; }
