:root {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color-scheme: dark;
  --bg: #0b0c10;
  --panel: #16181f;
  --accent: #7cffb4;
  --accent-dark: #5fd995;
  --text: #d8dbe2;
  --muted: #8a8f99;
  --danger: #ff6174;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1d1f29, var(--bg) 60%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

main.layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
}

header p {
  margin: 0;
  color: var(--muted);
}

.primary-panel,
.prestige-panel {
  background: linear-gradient(145deg, #1f212b, #101219);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.prestige-panel {
  border: 1px solid rgba(124, 255, 180, 0.15);
}

.currency {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.currency__value {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.currency__rate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--muted);
}

.currency__rate strong {
  font-size: 1.4rem;
  color: var(--accent);
}

.harvest-button {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.4rem;
  font-weight: 600;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #0d1117;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.harvest-button:active {
  transform: translateY(2px);
  box-shadow: none;
}

.generators {
  margin-top: 2rem;
}

.generator-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.generator-card {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.generator-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.generator-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.bulk-buy-controls-global {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.bulk-buy-controls-global > span {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.bulk-buy-controls-global label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.bulk-buy-controls-global label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.bulk-buy-controls-global input[type="radio"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.bulk-buy-controls-global label:has(input[type="radio"]:checked) {
  color: var(--accent);
  background: rgba(124, 255, 180, 0.15);
}

.bulk-buy-controls-global label:has(input[type="radio"]:checked) span {
  color: var(--accent);
}

.generator-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.generator-meta button {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: none;
  background: rgba(124, 255, 180, 0.15);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.generator-meta button:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.generator-meta button:hover:not(:disabled) {
  background: rgba(124, 255, 180, 0.35);
}

.generator-meta .owned {
  color: var(--muted);
  font-size: 0.8rem;
}

.prestige-button {
  width: 100%;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255, 97, 116, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 97, 116, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.prestige-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.prestige-button:hover:not(:disabled) {
  background: rgba(255, 97, 116, 0.3);
}

.reset-button {
  width: 100%;
  padding: 0.8rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(200, 30, 30, 0.2);
  color: #ff3333;
  border: 1px solid rgba(200, 30, 30, 0.5);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.reset-button:hover {
  background: rgba(200, 30, 30, 0.4);
  border-color: rgba(200, 30, 30, 0.7);
}

.prestige-stats,
.run-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(124, 255, 180, 0.1);
}

.prestige-stats div,
.run-stats div {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.hint {
  color: var(--muted);
  display: block;
  text-align: center;
}

.primer,
footer {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 960px) {
  body {
    padding: 1.5rem;
  }
}

