/* Bölüm Sonu — free-to-play game UI (virtual coins only). */

.game-page { --g-accent: var(--accent); --g-accent2: var(--accent-2); }

/* ---------- wallet bar ---------- */
.wbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px;
}
.wbar-item { display: flex; align-items: center; gap: 10px; }
.wbar-ico { font-size: 1.4rem; line-height: 1; }
.wbar-item b { display: block; font-family: var(--display); font-size: 1.05rem; color: #fff; }
.wbar-item em { display: block; font-style: normal; font-size: .74rem; color: var(--muted-dim); }
.wbar-coins b { color: var(--warn); font-size: 1.25rem; }
.wbar-level { position: relative; }
.wbar-xp {
  position: absolute; left: 34px; right: 0; bottom: -7px; height: 3px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.wbar-xp i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.wbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn-sm { padding: 8px 14px; font-size: .84rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

@media (max-width: 620px) {
  .wbar-actions { margin-left: 0; width: 100%; }
  .wbar-actions .btn { flex: 1; }
}

/* ---------- toasts ---------- */
.toast-host {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(92vw, 460px);
}
.toast {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--g-accent);
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: .93rem;
  box-shadow: 0 18px 40px -18px #000; text-align: center;
  animation: toast-in .22s ease-out;
}
.toast.out { opacity: 0; transform: translateY(8px); transition: .5s; }
.toast-big { border-left-color: var(--warn); background: #241d10; }
.toast-boss { border-left-color: var(--accent-2); background: #102420; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- game shell ---------- */
.game-shell {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.game-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, color-mix(in srgb, var(--g-accent) 14%, transparent), transparent);
}
.game-top h2 { margin: 0; font-size: 1.1rem; }
.game-top .tag { margin: 0; }
.game-readout { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.readout { text-align: right; }
.readout b { display: block; font-family: var(--display); font-size: 1.1rem; color: #fff; }
.readout em { font-style: normal; font-size: .72rem; color: var(--muted-dim); }
.readout .is-on { color: var(--warn); }
[data-cell="mult"] { color: var(--muted-dim); transition: color .2s, transform .2s; }
[data-cell="mult"].is-on { color: var(--warn); transform: scale(1.18); }

.game-body { padding: 18px; }
.game-msg { min-height: 22px; text-align: center; font-size: .9rem; color: var(--accent-2); margin: 10px 0 0; }

/* ---------- controls ---------- */
.game-ctl {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  padding: 16px 18px; border-top: 1px solid var(--line-soft); background: var(--bg-deep);
}
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button {
  background: var(--surface-2); border: 0; color: var(--text); cursor: pointer;
  width: 38px; height: 40px; font-size: 1.1rem; line-height: 1;
}
.stepper button:hover { background: var(--accent); color: #fff; }
.stepper .stepper-val { padding: 0 14px; min-width: 92px; text-align: center; }
.stepper .stepper-val b { font-family: var(--display); color: #fff; }
.stepper .stepper-val em { font-style: normal; display: block; font-size: .64rem; color: var(--muted-dim); }

.btn-play { min-width: 170px; padding: 13px 26px; font-size: 1rem; }
.btn-cash { background: var(--accent-2); color: #04211d; }
.btn-cash:hover { background: #5af0db; color: #04211d; }
.btn.is-on { background: var(--warn); color: #241a05; }

.autocash { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.autocash input {
  width: 78px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 9px 12px; font: inherit; text-align: center;
}

/* ---------- arcade grid ---------- */
.arc-grid {
  display: grid; gap: 6px;
  grid-template-columns: repeat(var(--cols), 1fr);
  aspect-ratio: calc(var(--cols) / var(--rows) * 0.92);
  max-width: 640px; margin: 0 auto;
}
.arc-cell {
  position: relative; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 10px; font-size: clamp(1.1rem, 4.2vw, 2rem); line-height: 1;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.is-spinning .arc-cell { animation: cell-drop .4s ease-out backwards; }
.arc-cell:nth-child(3n) { animation-delay: .05s; }
.arc-cell:nth-child(3n+1) { animation-delay: .1s; }
@keyframes cell-drop { from { opacity: 0; transform: translateY(-26px); } }

.arc-glyph { filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.arc-val {
  position: absolute; bottom: 3px; left: 0; right: 0; text-align: center;
  font-family: var(--display); font-size: .62rem; color: var(--warn);
}
.arc-cell.is-win {
  background: color-mix(in srgb, var(--g-accent) 30%, var(--surface-2));
  box-shadow: 0 0 0 2px var(--g-accent), 0 0 22px -4px var(--g-accent);
  transform: scale(1.06); z-index: 2;
}
.arc-cell.is-orb {
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--warn) 45%, transparent), var(--surface-2));
  box-shadow: 0 0 0 1px var(--warn);
}
.arc-cell.is-scatter { box-shadow: 0 0 0 1px var(--accent-2); }
.arc-cell.is-money { box-shadow: 0 0 0 1px var(--warn); }
.arc-cell.is-collect { animation: collect .5s ease-in-out; }
@keyframes collect { 50% { transform: scale(1.25) rotate(-6deg); } }
.arc-cell.has-spot::after {
  content: attr(data-spot); position: absolute; top: 3px; right: 4px;
  font-family: var(--display); font-size: .6rem; color: #fff;
  background: var(--accent); border-radius: 999px; padding: 1px 5px;
}

/* ---------- crash stage ---------- */
.crash-stage {
  position: relative; height: clamp(220px, 40vw, 320px);
  background: radial-gradient(120% 90% at 10% 100%, color-mix(in srgb, var(--g-accent) 14%, transparent), transparent 60%), var(--bg-deep);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
}
.crash-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-line { fill: none; stroke: var(--g-accent); stroke-width: 3; stroke-linecap: round; }
.crash-fill { fill: url(#cg); stroke: none; }
.crash-craft {
  position: absolute; left: 0; top: 100%; font-size: 1.7rem; line-height: 1;
  transition: opacity .3s; will-change: transform;
}
.is-bust .crash-line { stroke: #ef4444; }
.crash-mult {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(2.2rem, 8vw, 3.6rem); font-weight: 700;
  color: #fff; text-shadow: 0 6px 28px rgba(0,0,0,.8); pointer-events: none;
}
.crash-mult.is-bust { color: #ef4444; }
.crash-mult.is-win { color: var(--accent-2); }
.crash-hist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; justify-content: center; }
.chip {
  font-family: var(--display); font-size: .74rem; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.chip.mid { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line)); }
.chip.hi { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }

/* ---------- games hub ---------- */
.game-card .card-media { aspect-ratio: 16 / 10; }
.game-card .card-body .tag { align-self: flex-start; }
.gcard-play { margin-top: auto; }
.paytable td:first-child { font-size: 1.3rem; width: 52px; }

/* ---------- disclaimer ---------- */
.nomoney {
  display: flex; gap: 14px; align-items: flex-start;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-2) 26%, var(--line));
  border-radius: var(--radius); padding: 16px 18px; margin: 26px 0;
  font-size: .92rem; color: var(--muted);
}
.nomoney .nomoney-ico { font-size: 1.3rem; line-height: 1.2; }
.nomoney strong { color: var(--text); }
.age-badge {
  display: inline-block; font-family: var(--display); font-size: .7rem; font-weight: 700;
  border: 1px solid var(--muted-dim); color: var(--muted); border-radius: 999px;
  padding: 2px 9px; margin-left: 6px;
}

/* crash mult overlay needs a positioned parent */
.crash-wrap { position: relative; }
