/* Oyun kabuğu — MIND v2 paleti (mint paper + teal + soft sky); neon cyber yok */

:root {
  --zs-bg: #f3f7f6;
  --zs-bg-2: #e7efed;
  --zs-ink: #0a1628;
  --zs-cyan: #0f9e8e;
  --zs-cyan-deep: #0a6f64;
  --zs-blue: #1a6f9c;
  --zs-teal-soft: #d5f0eb;
  --zs-success: #0f9e8e;
  --zs-warning: #c45c2e;
  --zs-error: #9a3d2f;
  --zs-text: #0a1628;
  --zs-muted: #3d4f66;
  --zs-panel: rgba(255, 255, 255, 0.88);
  --zs-border: rgba(15, 158, 142, 0.28);
  --zs-font: "Figtree", "Segoe UI", system-ui, sans-serif;
  --zs-display: "Syne", "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(15, 158, 142, 0.12), transparent 55%),
    radial-gradient(700px 380px at 92% 8%, rgba(26, 111, 156, 0.1), transparent 50%),
    linear-gradient(180deg, var(--zs-bg), var(--zs-bg-2));
  color: var(--zs-text);
  font-family: var(--zs-font);
}

a { color: var(--zs-cyan-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.zs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.zs-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.zs-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(10, 22, 40, 0.12);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--zs-ink);
  font-family: var(--zs-font);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.zs-nav-back:hover {
  text-decoration: none;
  background: var(--zs-teal-soft);
  border-color: var(--zs-border);
}
.zs-nav-back__icon {
  font-size: 1rem;
  line-height: 1;
}

.zs-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
}
.zs-brand:hover { text-decoration: none; }
.zs-brand__logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}
.zs-brand__name {
  font-family: var(--zs-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--zs-cyan-deep);
  text-transform: uppercase;
  font-size: 0.95rem;
}
.zs-brand__sub {
  font-size: 0.8rem;
  color: var(--zs-muted);
}

.zs-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.zs-hud__cell {
  min-width: 4.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 0.5rem;
  background: var(--zs-panel);
  text-align: center;
}
.zs-hud__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zs-muted);
}
.zs-hud__value {
  font-family: var(--zs-display);
  font-size: 1.05rem;
  color: var(--zs-ink);
  font-weight: 700;
}

.zs-btn {
  appearance: none;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--zs-cyan), var(--zs-cyan-deep));
  color: #fff;
  font-family: var(--zs-font);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.15rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.zs-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 158, 142, 0.28);
  filter: brightness(1.03);
}
.zs-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.zs-btn--ghost {
  background: #fff;
  border-color: rgba(10, 22, 40, 0.14);
  color: var(--zs-ink);
  box-shadow: none;
}
.zs-btn--ghost:hover {
  background: var(--zs-teal-soft);
  box-shadow: none;
  filter: none;
}
.zs-btn--fb {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff;
}
.zs-btn--fb:hover {
  background: #166fe5;
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.28);
  filter: none;
}
.zs-btn--success { background: var(--zs-cyan-deep); }
.zs-btn--warn { background: var(--zs-warning); }

.zs-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 80;
  padding: 0.85rem 1.25rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(15, 158, 142, 0.35);
  background: #fff;
  color: var(--zs-ink);
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.12);
  transition: transform 0.35s ease;
  max-width: min(92vw, 28rem);
  text-align: center;
}
.zs-toast.is-on { transform: translateX(-50%) translateY(0); }

.zs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 1rem;
}
.zs-modal-backdrop.is-open { display: flex; }

.zs-modal {
  width: min(92vw, 420px);
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(10, 22, 40, 0.14);
}
.zs-modal h2 {
  margin: 0 0 0.35rem;
  font-family: var(--zs-display);
  font-size: 1.2rem;
  color: var(--zs-ink);
}
.zs-modal p { margin: 0.35rem 0; color: var(--zs-muted); }
.zs-modal__score {
  font-family: var(--zs-display);
  font-size: 2.4rem;
  color: var(--zs-cyan-deep);
  margin: 0.5rem 0 0.75rem;
  font-weight: 700;
}
.zs-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.zs-modal__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.zs-modal__stat {
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 0.5rem;
  padding: 0.45rem 0.55rem;
  background: var(--zs-bg);
}
.zs-modal__stat span {
  display: block;
  font-size: 0.7rem;
  color: var(--zs-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.zs-modal__stat strong {
  font-family: var(--zs-display);
  font-size: 1.05rem;
  color: var(--zs-ink);
}

.zs-leaderboard {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-height: 9rem;
  overflow: auto;
}
.zs-leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
  font-size: 0.85rem;
}
.zs-leaderboard .rank { color: var(--zs-cyan-deep); min-width: 1.5rem; font-weight: 700; }

.zs-stage {
  position: relative;
  margin: 1rem auto;
  width: min(96vw, 720px);
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  touch-action: manipulation;
  box-shadow: 0 8px 28px rgba(10, 22, 40, 0.06);
}

.zs-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(243, 247, 246, 0.94);
  text-align: center;
  padding: 1.25rem;
  z-index: 5;
}
.zs-overlay h1 {
  margin: 0;
  font-family: var(--zs-display);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--zs-ink);
}
.zs-overlay p { margin: 0; color: var(--zs-muted); max-width: 28rem; }

.zs-mkt-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.75rem;
  pointer-events: none;
}
.zs-mkt-banner__inner {
  pointer-events: auto;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(15, 158, 142, 0.35);
  box-shadow: 0 12px 32px rgba(10, 22, 40, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.zs-mkt-banner__inner p {
  margin: 0;
  flex: 1 1 12rem;
  color: var(--zs-ink);
  font-size: 0.95rem;
}
.zs-mkt-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

@keyframes zs-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 158, 142, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(15, 158, 142, 0); }
}
@keyframes zs-fade-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes zs-flash-word {
  0% { opacity: 0; transform: scale(0.94); filter: blur(3px); }
  20%, 80% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.03); filter: blur(2px); }
}
