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

body {
  min-height: 100vh;
  background: #121212;
  color: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.app-shell {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topbar {
  background: #1b1b1b;
  border: 1px solid #2b2b2b;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.08);
}

.currency-panel {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.currency-card {
  flex: 1;
  background: #181818;
  border-radius: 14px;
  padding: 0.8rem;
  border: 1px solid #292929;
}

.label {
  display: block;
  font-size: 0.8rem;
  color: #a1a1a1;
  margin-bottom: 0.35rem;
}

.value {
  font-size: 1.3rem;
  font-weight: bold;
}

.cash {
  color: #39ff14;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.7);
}

.stardust {
  color: #66fcf1;
  text-shadow: 0 0 12px rgba(102, 252, 241, 0.7);
}

.game-wrapper {
  background: #171717;
  border-radius: 24px;
  padding: 0.7rem;
  border: 1px solid #2a2a2a;
}

canvas {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: linear-gradient(180deg, #111, #191919);
  border-radius: 18px;
  display: block;
}

.dashboard {
  display: grid;
  gap: 1rem;
}

.tab-panel {
  background: #1a1a1a;
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid #292929;
}

.tab-panel h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: #d7d7d7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
}

.upgrade-card,
.skill-card {
  background: #202020;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  min-height: 110px;
  color: white;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.upgrade-card:active,
.skill-card:active {
  transform: scale(0.97);
}

.skill-card.ready {
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.35);
}

.skill-card span,
.upgrade-card span {
  font-weight: bold;
}

.skill-card small,
.upgrade-card small {
  color: #bcbcbc;
}

.cooldown {
  color: #66fcf1;
  font-weight: bold;
}

.galaxy-card {
  border-color: #ff4fd8;
  box-shadow: 0 0 14px rgba(255, 79, 216, 0.15);
}

@media (max-width: 520px) {
  body {
    padding: 0.5rem;
  }

  .currency-panel {
    flex-direction: column;
  }
}
