* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.6;
  overflow-y: auto;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.goal {
  font-size: 14px;
  color: #666;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #222;
}

.resources {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.resource-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 16px;
}

.resource-name {
  font-weight: 500;
}

.resource-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.actions {
  margin-bottom: 24px;
}

.observe-button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.observe-button:hover {
  background: #444;
}

.observe-button:active {
  transform: scale(0.98);
}

.synthesis {
  margin-bottom: 24px;
}

.synthesis-grid {
  display: grid;
  gap: 8px;
}

.synthesis-btn {
  padding: 12px;
  font-size: 14px;
  background: #fff;
  border: 1px solid #222;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.synthesis-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.synthesis-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.upgrades {
  margin-bottom: 24px;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.upgrade-card {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}

.upgrade-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.upgrade-effect {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.auto-rate, .click-power {
  font-weight: 700;
  color: #222;
}

.upgrade-btn {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #222;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.upgrade-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.upgrade-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.upgrade-level {
  font-size: 12px;
  color: #888;
  text-align: right;
}

.log {
  margin-bottom: 24px;
}

#log-content {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  min-height: 80px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  color: #555;
}

.log-entry {
  padding: 4px 0;
}

footer {
  text-align: center;
  margin-bottom: 20px;
}

.reset-btn {
  padding: 10px 20px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #c00;
  color: #c00;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  background: #c00;
  color: #fff;
}

@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .upgrade-grid {
    grid-template-columns: 1fr;
  }
}