html,
* {
  font-family: Verdana, Geneva, Tahoma, sans-serif;

  /* Prevent selection, double-tap to zoom etc. */
  user-select: none;
  touch-action: pan-y;
}

:root {
  --bg: #f3f4f6;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #111827;
  --muted: #6b7280;
  --accent: #6366f1;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

body.dark {
  --bg: #0b1020;
  --panel: rgba(13, 18, 34, 0.9);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #8b5cf6;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body {
  background: var(--bg);
  color: var(--text);
}

#background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

#game {
  text-align: center;
}

#game button {
  background: var(--panel);
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 64px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

#game button img {
  width: 216px;
  height: 216px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}

#game button:active {
  background-color: rgba(0,0,0,0.15);
  box-shadow: 0 2px rgba(0,0,0,0.4);
  transform: translateY(4px);
}

.stats {
  background-color: var(--panel);
  padding: 10px;
  border-radius: 10px;
  margin: 20px auto;
  display: block;
  box-shadow: var(--shadow);
}

#total {
  font-size: 32px;
  margin: 20px;
}

#upgrades {
  background-color: var(--panel);
  box-shadow: var(--shadow);
}

.upgrade {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px;
  font-size: 14px;
}

.upgrade .name {
  font-weight: bold;
}

.upgrade .count {
  font-weight: bold;
  font-size: 20px;
  width: 2em;
  text-align: right;
}

.upgrade button {
  background: var(--panel);
  border: none;
  padding: 6px;
  border-radius: 5px;
  font-size: 28px;
  width: 2em;
  height: 2em;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.upgrade button:active {
  background: #ccc;
  box-shadow: 0 1px #666;
  transform: translateY(2px);
}

.upgrade.click button {
  background: color-mix(in srgb, var(--panel), #16a34a 15%);
}

.upgrade.farm button,
.upgrade.efficiency button {
  background: color-mix(in srgb, var(--panel), #eab308 15%);
}

.upgrade.auto button {
  background: color-mix(in srgb, var(--panel), #2563eb 15%);
}

.upgrade.speed button {
  background: color-mix(in srgb, var(--panel), #dc2626 15%);
}

.upgrade.hidden {
  display: none;
}

.upgrade.locked {
  opacity: 0.5;
}

.upgrade.locked button {
  cursor: not-allowed;
  color: transparent;
}

/* Theme toggle button */
#theme-toggle {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 22px;
}

#theme-toggle:hover {
  transform: translateY(-1px);
}

#mute-button {
  position: fixed;
  bottom: 72px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 22px;
}

#mute-button:hover {
  transform: translateY(-1px);
}

#wipe-button {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 22px;
}

#wipe-button:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--panel), #dc2626 20%);
}