:root {
  --bg: #0e0e11;
  --surface: rgba(19, 19, 22, 0.92);
  --surface-soft: rgba(31, 31, 35, 0.92);
  --card: rgba(25, 25, 29, 0.92);
  --text: #f0edf1;
  --muted: #b7b2bb;
  --primary: #39ff14;
  --secondary: #fd68b3;
  --tertiary: #ab8aff;
  --outline: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.42);
  --on-accent: #071004;
  --font-headline: "Space Grotesk", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
  --font-label: "Space Grotesk", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(57, 255, 20, 0.05), transparent 18%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.ticker-layer,
.sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ticker-layer {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  opacity: 0.08;
}

.ticker-row {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid rgba(255, 255, 255, 0.04);
}

.ticker-track {
  display: inline-flex;
  gap: 2rem;
  padding: 0.45rem 0;
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  animation: ticker-move 40s linear infinite;
}

.ticker-row-reverse .ticker-track {
  color: var(--secondary);
  animation-direction: reverse;
}

@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.sparkle-layer {
  display: none;
}

.sparkle {
  position: absolute;
  color: rgba(235, 166, 192, 0.42);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.sparkle-1 { top: 6%; left: 11%; font-size: 0.74rem; animation: shimmer 2.8s ease-in-out infinite; }
.sparkle-2 { top: 11%; right: 14%; font-size: 0.86rem; animation: drift 3.2s ease-in-out infinite; }
.sparkle-3 { top: 18%; left: 32%; font-size: 0.62rem; animation: shimmer 3.6s ease-in-out infinite; }
.sparkle-4 { top: 21%; right: 34%; font-size: 0.96rem; animation: shimmer 2.9s ease-in-out infinite; }
.sparkle-5 { top: 28%; left: 8%; font-size: 0.7rem; animation: drift 3.5s ease-in-out infinite; }
.sparkle-6 { top: 33%; right: 12%; font-size: 0.84rem; animation: shimmer 3.4s ease-in-out infinite; }
.sparkle-7 { top: 38%; left: 22%; font-size: 0.56rem; animation: shimmer 2.4s ease-in-out infinite; }
.sparkle-8 { top: 43%; right: 28%; font-size: 0.66rem; animation: drift 4s ease-in-out infinite; }
.sparkle-9 { top: 49%; left: 44%; font-size: 0.78rem; animation: shimmer 3.3s ease-in-out infinite; }
.sparkle-10 { top: 54%; right: 7%; font-size: 0.58rem; animation: drift 4.6s ease-in-out infinite; }
.sparkle-11 { top: 59%; left: 12%; font-size: 0.96rem; animation: shimmer 3.1s ease-in-out infinite; }
.sparkle-12 { top: 64%; right: 22%; font-size: 0.74rem; animation: drift 3.9s ease-in-out infinite; }
.sparkle-13 { top: 69%; left: 34%; font-size: 0.62rem; animation: shimmer 4.3s ease-in-out infinite; }
.sparkle-14 { top: 74%; right: 13%; font-size: 0.84rem; animation: shimmer 2.7s ease-in-out infinite; }
.sparkle-15 { top: 79%; left: 7%; font-size: 0.7rem; animation: drift 4.2s ease-in-out infinite; }
.sparkle-16 { top: 84%; right: 31%; font-size: 0.6rem; animation: shimmer 3.5s ease-in-out infinite; }
.sparkle-17 { top: 88%; left: 24%; font-size: 0.82rem; animation: drift 3s ease-in-out infinite; }
.sparkle-18 { top: 91%; right: 10%; font-size: 0.72rem; animation: shimmer 4.8s ease-in-out infinite; }
.sparkle-19 { top: 15%; left: 58%; font-size: 0.54rem; animation: drift 3.7s ease-in-out infinite; }
.sparkle-20 { top: 71%; left: 56%; font-size: 0.9rem; animation: shimmer 3.8s ease-in-out infinite; }

@keyframes shimmer {
  0%, 100% { transform: scale(0.84); opacity: 0.18; }
  50% { transform: scale(1.12); opacity: 0.5; }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  50% { transform: translateY(-8px); opacity: 0.42; }
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.4rem;
  padding: 0.75rem 1rem;
  background: rgba(14, 14, 17, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand-icon {
  color: var(--primary);
}

.brand-kicker {
  margin: 0 0 0.1rem;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-title,
.panel-title {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-title {
  font-size: 1rem;
  text-transform: uppercase;
}

.theme-button,
.text-button,
.primary-button,
.buy-button,
.theme-card,
.clicker-button {
  border: 1px solid transparent;
}

.theme-button,
.text-button,
.primary-button,
.secondary-button {
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.theme-button:hover,
.text-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.theme-button {
  min-height: 2.7rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, white));
  color: var(--on-accent);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.game-shell {
  position: relative;
  z-index: 5;
  height: 100dvh;
  max-width: 28rem;
  margin: 0 auto;
  padding: 4.2rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}

.clicker-button {
  position: relative;
  width: min(42vw, 9.5rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(31, 31, 35, 0.96), rgba(0, 0, 0, 0.96));
  border: 3px solid color-mix(in srgb, var(--primary) 58%, white);
  box-shadow:
    inset 0 10px 20px rgba(255, 255, 255, 0.06),
    0 0 34px color-mix(in srgb, var(--primary) 18%, transparent),
    0 20px 36px rgba(0, 0, 0, 0.3);
}

.clicker-button:active {
  transform: scale(0.97);
}

.clicker-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  color: var(--primary);
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 12px color-mix(in srgb, var(--primary) 35%, transparent);
  will-change: transform, opacity;
  animation: click-pop 620ms ease-out forwards;
}

@keyframes click-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -95%) scale(1);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -240%) scale(1.04);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -320%) scale(1.06);
  }
}

.clicker-icon {
  font-size: clamp(3.6rem, 12vw, 6rem);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
}

.clicker-image {
  width: calc(100% - 0.5rem);
  height: calc(100% - 0.5rem);
  object-fit: cover;
  border-radius: 999px;
}

.total-block {
  display: grid;
  gap: 0.15rem;
}

.total-label,
.stat-label {
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.total-value {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-headline);
  font-size: clamp(2.2rem, 9vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.total-subtitle,
.panel-copy,
.modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.stats-row {
  display: grid;
}

.stat-card,
.generator-panel,
.generator-card,
.theme-card,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--outline);
  box-shadow: 0 14px 30px var(--shadow);
}

.stat-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  text-align: center;
}

.stat-value {
  color: var(--primary);
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 800;
}

.generator-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 1.15rem;
}

.panel-head {
  display: grid;
  gap: 0.15rem;
}

.panel-title {
  font-size: 1rem;
}

.generator-list {
  display: grid;
  gap: 0.45rem;
}

.generator-card {
  appearance: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem;
  border-radius: 0.95rem;
  background: var(--card);
  position: relative;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.generator-card:hover {
  transform: translateY(-1px);
}

.generator-card:active {
  transform: scale(0.99);
}

.generator-card[disabled] {
  cursor: not-allowed;
}

.generator-card[disabled]:hover,
.generator-card[disabled]:active {
  transform: none;
}

.generator-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.generator-text {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.generator-name {
  display: block;
  color: var(--text);
  font-family: var(--font-headline);
  font-size: 0.86rem;
  font-weight: 800;
}

.generator-meta {
  margin-top: 0.12rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.buy-button {
  min-width: 4.8rem;
  padding: 0.48rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, white));
  color: var(--on-accent);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.generator-card[disabled] .buy-button {
  opacity: 0.42;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(30rem, 100%);
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.4rem;
}

.theme-modal-panel {
  gap: 0.8rem;
}

.confirm-panel {
  width: min(24rem, 100%);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.text-button,
.primary-button,
.secondary-button {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-button {
  background: #1f1f23;
  border: 1px solid var(--outline);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, white));
  color: var(--on-accent);
}

.secondary-button {
  background: #25252a;
  border: 1px solid var(--outline);
  color: var(--text);
}

.secondary-button[disabled],
.primary-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.theme-modal-panel .primary-button {
  background: var(--modal-primary-background, linear-gradient(135deg, var(--modal-accent, var(--primary)), color-mix(in srgb, var(--modal-accent, var(--primary)) 60%, white)));
  color: var(--modal-on-accent, var(--on-accent));
}

.theme-modal-panel .secondary-button {
  background: var(--modal-secondary-bg, #25252a);
  border: 1px solid var(--modal-secondary-border, var(--outline));
  color: var(--modal-secondary-text, var(--text));
}

.theme-grid {
  display: grid;
  gap: 0.6rem;
}

.theme-modal-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  justify-items: center;
  gap: 0.7rem;
  width: 100%;
  padding-top: 0.1rem;
}

.theme-modal-footer .primary-button,
.theme-modal-footer .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  justify-self: center;
  margin-inline: auto;
}

.theme-modal-footer .primary-button {
  width: min(84%, 16.75rem);
  min-height: 3.05rem;
}

.theme-modal-footer .secondary-button {
  width: min(58%, 11.75rem);
  min-height: 2.45rem;
  padding-inline: 0.9rem;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
}

.theme-modal-panel #start-run-button.secondary-button {
  background: #27252b;
  border-color: rgba(255, 255, 255, 0.08);
  color: #d6d0d6;
  box-shadow: none;
}

.theme-modal-panel #start-run-button.secondary-button:hover {
  background: #2e2b33;
}

.theme-modal-divider {
  width: min(72%, 14.5rem);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--modal-secondary-border, var(--outline)) 65%, transparent) 20%,
    color-mix(in srgb, var(--modal-secondary-border, var(--outline)) 90%, transparent) 50%,
    color-mix(in srgb, var(--modal-secondary-border, var(--outline)) 65%, transparent) 80%,
    transparent 100%
  );
  opacity: 0.9;
}

.theme-card {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 0.9rem;
  border-radius: 1.1rem;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(31, 31, 35, 0.95), rgba(10, 10, 12, 0.98));
  color: var(--text);
}

.theme-card:hover {
  transform: translateY(-1px);
}

.theme-card.is-selected {
  border-color: color-mix(in srgb, var(--theme-color, var(--primary)) 58%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-color, var(--primary)) 36%, transparent);
}

.theme-card-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.theme-card-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}

.theme-card-tickers {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
  opacity: 0.18;
  mask-image: linear-gradient(180deg, transparent 6%, rgba(0, 0, 0, 0.95) 24%, rgba(0, 0, 0, 0.95) 76%, transparent 94%);
}

.theme-card-ticker-row {
  overflow: hidden;
  white-space: nowrap;
}

.theme-card-ticker-track {
  display: inline-flex;
  gap: 1rem;
  padding: 0.08rem 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #39ff14;
  animation: ticker-move 16s linear infinite;
}

.theme-card-ticker-row-reverse .theme-card-ticker-track {
  color: #fd68b3;
  animation-direction: reverse;
}

.theme-card[data-theme-card="hype"] {
  background: linear-gradient(160deg, rgba(31, 31, 35, 0.95), rgba(10, 10, 12, 0.98));
  color: #f0edf1;
}

.theme-card[data-theme-card="hype"] .theme-card-title {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
}

.theme-card[data-theme-card="hype"] .theme-card-copy {
  color: #b7b2bb;
}

.theme-card[data-theme-card="sparkle"] {
  background: linear-gradient(180deg, #fff1f6, #ffe8f1);
  border-color: rgba(233, 182, 202, 0.95);
  color: #1a1c1a;
  box-shadow: 0 14px 30px rgba(120, 85, 94, 0.1);
}

.theme-card-sparkles {
  position: absolute;
  inset: 0.3rem;
  pointer-events: none;
}

.theme-card-sparkle {
  position: absolute;
  width: 0.9rem;
  aspect-ratio: 1;
  opacity: 0.16;
  transform: scale(0.8);
  will-change: transform, opacity;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23eba6c0' d='M12 1.8l2.1 6.1 6.1 2.1-6.1 2.1-2.1 6.1-2.1-6.1-6.1-2.1 6.1-2.1z'/%3E%3C/svg%3E");
}

.theme-card-sparkle::after {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 999px;
  background: rgba(255, 224, 235, 0.82);
}

.sparkle-a { top: 10%; left: 8%; width: 0.7rem; animation: card-twinkle 3.2s ease-in-out infinite 0.2s; }
.sparkle-b { top: 18%; left: 48%; width: 1rem; animation: card-twinkle 4.1s ease-in-out infinite 1.1s; }
.sparkle-c { top: 12%; right: 10%; width: 0.78rem; animation: card-twinkle 3.6s ease-in-out infinite 2s; }
.sparkle-d { top: 46%; left: 14%; width: 0.86rem; animation: card-twinkle 4.4s ease-in-out infinite 0.7s; }
.sparkle-e { top: 58%; right: 18%; width: 1.02rem; animation: card-twinkle 3.8s ease-in-out infinite 1.8s; }
.sparkle-f { bottom: 18%; left: 32%; width: 0.74rem; animation: card-twinkle 4.8s ease-in-out infinite 2.6s; }
.sparkle-g { bottom: 12%; right: 8%; width: 0.9rem; animation: card-twinkle 3.4s ease-in-out infinite 1.4s; }
.sparkle-h { top: 68%; left: 62%; width: 0.66rem; animation: card-twinkle 5.1s ease-in-out infinite 0.4s; }

@keyframes card-twinkle {
  0%, 100% {
    opacity: 0.12;
    transform: scale(0.75);
  }

  18% {
    opacity: 0.22;
    transform: scale(0.88);
  }

  38% {
    opacity: 0.7;
    transform: scale(1.16);
  }

  55% {
    opacity: 0.3;
    transform: scale(0.92);
  }

  78% {
    opacity: 0.52;
    transform: scale(1.02);
  }
}

.theme-card[data-theme-card="sparkle"] .theme-card-title {
  font-family: "Noto Serif", serif;
  font-style: italic;
  font-weight: 700;
  text-transform: none;
}

.theme-card[data-theme-card="sparkle"] .theme-card-copy {
  color: #7a6e70;
}

.theme-card[data-theme-card="sparkle"].is-selected {
  border-color: #d98ea7;
  box-shadow:
    0 0 0 2px rgba(217, 142, 167, 0.7),
    0 12px 26px rgba(217, 142, 167, 0.18);
}

.theme-card[data-theme-card="plain"] {
  background: #d4d0c8;
  border-color: #7f7f7f;
  border-radius: 0.2rem;
  color: #111111;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
}

.theme-card[data-theme-card="plain"] .theme-card-title {
  font-family: "Tahoma", "Verdana", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.theme-card[data-theme-card="plain"] .theme-card-copy {
  color: #333333;
  font-family: "Tahoma", "Verdana", Arial, sans-serif;
  font-size: 0.78rem;
}

.theme-card[data-theme-card="plain"].is-selected {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

body[data-theme="plain"] {
  --bg: #c0c0c0;
  --surface: #d4d0c8;
  --surface-soft: #d4d0c8;
  --card: #d4d0c8;
  --text: #111111;
  --muted: #444444;
  --primary: #111111;
  --secondary: #777777;
  --tertiary: #b0b0b0;
  --outline: #808080;
  --shadow: rgba(0, 0, 0, 0.14);
  --on-accent: #111111;
  --font-headline: "Tahoma", "Verdana", Arial, sans-serif;
  --font-body: "Tahoma", "Verdana", Arial, sans-serif;
  --font-label: "Tahoma", "Verdana", Arial, sans-serif;
  background: var(--bg);
}

body[data-theme="plain"] .ticker-layer,
body[data-theme="plain"] .sparkle-layer {
  display: none;
}

body[data-theme="plain"] .topbar {
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-theme="plain"] .brand-title,
body[data-theme="plain"] .brand-kicker {
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="plain"] .brand-title {
  font-size: 0.95rem;
  font-weight: 700;
}

body[data-theme="plain"] .brand-icon {
  color: #111111;
}

body[data-theme="plain"] .theme-button,
body[data-theme="plain"] .buy-button,
body[data-theme="plain"] .primary-button,
body[data-theme="plain"] .secondary-button,
body[data-theme="plain"] .text-button {
  background: #d4d0c8;
  color: #111111;
  border: 1px solid #808080;
  border-radius: 0.18rem;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
}

body[data-theme="plain"] .theme-modal-panel .primary-button,
body[data-theme="plain"] .theme-modal-panel .secondary-button {
  background: var(--modal-primary-background, #efefef);
  color: var(--modal-on-accent, #111111);
  border-color: #808080;
}

body[data-theme="plain"] .theme-modal-panel .secondary-button {
  background: var(--modal-secondary-bg, #efefef);
  color: var(--modal-secondary-text, #111111);
  border-color: var(--modal-secondary-border, #8a8a8a);
}

body[data-theme="plain"] .theme-modal-divider {
  opacity: 0.55;
}

body[data-theme="plain"] .clicker-button {
  width: min(42vw, 9rem);
  border-radius: 0.2rem;
  border: 1px solid #808080;
  background: #d4d0c8;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
}

body[data-theme="plain"] .clicker-icon {
  color: #111111;
  font-family: "Tahoma", "Verdana", Arial, sans-serif;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 700;
  filter: none;
}

body[data-theme="plain"] .total-value {
  color: #111111;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: 0;
}

body[data-theme="plain"] .total-label,
body[data-theme="plain"] .stat-label {
  color: #333333;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="plain"] .total-subtitle,
body[data-theme="plain"] .panel-copy,
body[data-theme="plain"] .modal-copy {
  color: #333333;
}

body[data-theme="plain"] .stat-card,
body[data-theme="plain"] .generator-panel,
body[data-theme="plain"] .generator-card,
body[data-theme="plain"] .modal-panel {
  background: #d4d0c8;
  border: 1px solid #808080;
  border-radius: 0.2rem;
  box-shadow: 1px 1px 0 #ffffff inset, -1px -1px 0 #808080 inset;
}

body[data-theme="plain"] .stat-card {
  background: #c9c5bc;
  border: 1px solid #8a8a8a;
  border-radius: 0.08rem;
  box-shadow: none;
  padding: 0.6rem 0.75rem;
}

body[data-theme="plain"] .stat-value,
body[data-theme="plain"] .generator-name,
body[data-theme="plain"] .panel-title {
  color: #111111;
  letter-spacing: 0;
  text-transform: none;
}

body[data-theme="plain"] .generator-icon {
  background: #d4d0c8;
  border: 1px solid #808080;
  border-radius: 0.15rem;
  color: #111111;
}

body[data-theme="plain"] .generator-card {
  padding: 0.55rem;
}

body[data-theme="plain"] .generator-card:hover,
body[data-theme="plain"] .generator-card:active {
  transform: none;
}

body[data-theme="sparkle"] {
  --bg: #faf9f6;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(255, 248, 251, 0.9);
  --card: rgba(255, 255, 255, 0.95);
  --text: #1a1c1a;
  --muted: #7a6e70;
  --primary: #78555e;
  --secondary: #d98ea7;
  --tertiary: #cfc3ac;
  --outline: rgba(211, 195, 197, 0.9);
  --shadow: rgba(120, 85, 94, 0.12);
  --on-accent: #ffffff;
  --font-headline: "Noto Serif", serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-label: "Be Vietnam Pro", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(180deg, rgba(255, 209, 220, 0.42), transparent 24%),
    var(--bg);
}

body[data-theme="sparkle"] .ticker-layer {
  display: none;
}

body[data-theme="sparkle"] .sparkle-layer {
  display: block;
}

body[data-theme="sparkle"] .topbar {
  background: rgba(255, 248, 251, 0.84);
  box-shadow: 0 8px 24px rgba(120, 85, 94, 0.08);
}

body[data-theme="sparkle"] .brand-title {
  text-transform: none;
  font-style: italic;
}

body[data-theme="sparkle"] .theme-button,
body[data-theme="sparkle"] .buy-button,
body[data-theme="sparkle"] .primary-button {
  background: linear-gradient(135deg, #78555e, #d98ea7);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(120, 85, 94, 0.12);
}

body[data-theme="sparkle"] .secondary-button {
  background: #fff3f7;
  border-width: 1px;
  color: #78555e;
  border-color: rgba(233, 182, 202, 0.95);
}

body[data-theme="sparkle"] .text-button {
  background: #fff3f7;
  border-color: rgba(233, 182, 202, 0.95);
  color: #78555e;
}

body[data-theme="sparkle"] .theme-modal-panel .primary-button,
body[data-theme="sparkle"] .theme-modal-panel .secondary-button {
  box-shadow: none;
}

body[data-theme="sparkle"] .theme-modal-panel .primary-button {
  background: var(--modal-primary-background, linear-gradient(135deg, var(--modal-accent, var(--primary)), color-mix(in srgb, var(--modal-accent, var(--primary)) 60%, white)));
  color: var(--modal-on-accent, var(--on-accent));
}

body[data-theme="sparkle"] .theme-modal-panel .secondary-button {
  background: var(--modal-secondary-bg, #fff3f7);
  border-color: var(--modal-secondary-border, var(--outline));
  color: var(--modal-secondary-text, var(--text));
}

body[data-theme="sparkle"] .theme-modal-divider {
  opacity: 0.75;
}

body[data-theme="sparkle"] .clicker-button {
  width: min(38vw, 7.8rem);
  background: rgba(255, 255, 255, 0.96);
  border-width: 2px;
  border-color: #ffd1dc;
  box-shadow: 0 10px 20px rgba(120, 85, 94, 0.12);
}

body[data-theme="sparkle"] .clicker-icon {
  display: none;
}

body[data-theme="sparkle"] .total-value {
  font-size: clamp(2.3rem, 10vw, 4rem);
  text-transform: none;
}

body[data-theme="sparkle"] .stat-card {
  background: rgba(255, 252, 252, 0.72);
  border-color: rgba(223, 207, 211, 0.9);
  border-radius: 1.85rem;
  box-shadow: 0 5px 14px rgba(120, 85, 94, 0.04);
  padding: 0.68rem 1.05rem 0.74rem;
  gap: 0.08rem;
}

body[data-theme="sparkle"] .stat-label {
  color: #8f757d;
  font-size: 0.58rem;
}

body[data-theme="sparkle"] .stat-value {
  color: #8b6872;
  font-size: 1.38rem;
  line-height: 1.02;
}

body[data-theme="sparkle"] .generator-panel {
  background: rgba(255, 252, 252, 0.62);
  border-color: rgba(223, 207, 211, 0.88);
  border-radius: 1.85rem;
  box-shadow: 0 8px 18px rgba(120, 85, 94, 0.04);
  padding: 0.9rem;
}

body[data-theme="sparkle"] .panel-head {
  gap: 0.28rem;
  padding: 0.05rem 0.25rem 0.55rem;
  border-bottom: 1px solid rgba(233, 205, 214, 0.8);
}

body[data-theme="sparkle"] .panel-title {
  color: #8b6872;
  font-size: 0.76rem;
  font-family: "Be Vietnam Pro", sans-serif;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body[data-theme="sparkle"] .panel-copy {
  color: #8d797d;
  font-size: 0.8rem;
}

body[data-theme="sparkle"] .generator-icon {
  background: #fff8fa;
  border: 1px solid rgba(238, 213, 222, 0.92);
  color: #8b6872;
}

body[data-theme="sparkle"] .generator-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(240, 215, 224, 0.98);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(120, 85, 94, 0.03);
  padding: 0.58rem 0.62rem;
}

body[data-theme="sparkle"] .generator-card:hover {
  box-shadow: 0 10px 20px rgba(120, 85, 94, 0.05);
}

body[data-theme="sparkle"] .generator-name {
  color: #342d2f;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

body[data-theme="sparkle"] .generator-meta {
  color: #987f85;
}

body[data-theme="sparkle"] .buy-button {
  min-width: 5.5rem;
  padding: 0.56rem 0.88rem;
  background: #9a7681;
  color: #ffffff;
  box-shadow: none;
}

.generator-card-sparkles {
  position: absolute;
  inset: 0.22rem;
  pointer-events: none;
}

.generator-card-sparkle {
  position: absolute;
  width: 0.62rem;
  aspect-ratio: 1;
  opacity: 0.14;
  transform: scale(0.8);
  will-change: transform, opacity;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23eba6c0' d='M12 1.8l2.1 6.1 6.1 2.1-6.1 2.1-2.1 6.1-2.1-6.1-6.1-2.1 6.1-2.1z'/%3E%3C/svg%3E");
}

.generator-card-sparkle::after {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 999px;
  background: rgba(255, 224, 235, 0.82);
}

.generator-sparkle-a { top: 12%; left: 10%; animation: generator-card-twinkle 3.6s ease-in-out infinite 0.2s; }
.generator-sparkle-b { top: 18%; right: 12%; width: 0.78rem; animation: generator-card-twinkle 4.3s ease-in-out infinite 1.1s; }
.generator-sparkle-c { bottom: 18%; left: 36%; width: 0.56rem; animation: generator-card-twinkle 3.9s ease-in-out infinite 1.9s; }
.generator-sparkle-d { bottom: 14%; right: 24%; width: 0.68rem; animation: generator-card-twinkle 4.8s ease-in-out infinite 0.7s; }

@keyframes generator-card-twinkle {
  0%, 100% {
    opacity: 0.1;
    transform: scale(0.76);
  }

  26% {
    opacity: 0.2;
    transform: scale(0.9);
  }

  46% {
    opacity: 0.55;
    transform: scale(1.12);
  }

  68% {
    opacity: 0.24;
    transform: scale(0.9);
  }
}

@media (max-width: 520px) {
  .game-shell {
    padding-inline: 0.7rem;
    gap: 0.65rem;
  }

  .topbar {
    padding-inline: 0.8rem;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .theme-button {
    padding-inline: 0.75rem;
    font-size: 0.66rem;
  }

  .generator-card {
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .generator-name {
    font-size: 0.8rem;
  }

  .buy-button {
    min-width: 4.3rem;
    padding-inline: 0.62rem;
    font-size: 0.64rem;
  }
}

@media (min-width: 980px) {
  .game-shell {
    height: 100dvh;
    max-width: min(74rem, calc(100vw - 2rem));
    padding: 5rem 1.4rem 1.4rem;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(21rem, 0.82fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1.3rem 1.5rem;
    align-items: stretch;
  }

  .hero {
    grid-column: 1;
    grid-row: 1;
    gap: 0.9rem;
  }

  .stats-row {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }

  .generator-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    padding: 1rem;
  }

  .panel-head {
    gap: 0.22rem;
  }

  .generator-list {
    gap: 0.65rem;
  }

  .clicker-button {
    width: min(28vw, 17rem);
  }

  .clicker-icon {
    font-size: clamp(6.5rem, 9vw, 10rem);
  }

  .clicker-pop {
    font-size: 1.2rem;
  }

  .total-block {
    gap: 0.3rem;
    max-width: 36rem;
  }

  .total-label,
  .stat-label {
    font-size: 0.72rem;
  }

  .total-value {
    font-size: clamp(4.4rem, 7vw, 6.4rem);
  }

  .total-subtitle,
  .panel-copy,
  .modal-copy {
    font-size: 0.92rem;
  }

  .stat-card {
    padding: 0.9rem 1rem;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .generator-card {
    padding: 0.72rem;
  }

  .generator-icon {
    width: 2.35rem;
    height: 2.35rem;
  }

  .generator-name {
    font-size: 0.98rem;
  }

  .generator-meta {
    font-size: 0.76rem;
  }

  .buy-button {
    min-width: 5.6rem;
    font-size: 0.74rem;
  }

  body[data-theme="sparkle"] .clicker-button {
    width: min(24vw, 14rem);
  }
}

@media (hover: none), (pointer: coarse) {
  .topbar,
  .modal-backdrop {
    backdrop-filter: none;
  }

  .theme-button:hover,
  .text-button:hover,
  .primary-button:hover,
  .buy-button:hover,
  .theme-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-layer,
  .sparkle-layer {
    display: none !important;
  }
}
