@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;900&display=swap');

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #0f0c29);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
  padding: 40px 16px;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Themes ── */
body.theme-ocean {
  background: linear-gradient(-45deg, #023e8a, #0077b6, #0096c7, #00b4d8);
  background-size: 400% 400%;
}
body.theme-forest {
  background: linear-gradient(-45deg, #1b4332, #2d6a4f, #40916c, #52b788);
  background-size: 400% 400%;
}
body.theme-sunset {
  background: linear-gradient(-45deg, #590d22, #a4133c, #ff4d6d, #ff758f);
  background-size: 400% 400%;
}
body.theme-candy {
  background: linear-gradient(-45deg, #7b2cbf, #c77dff, #e0aaff, #ff6d00);
  background-size: 400% 400%;
}

/* ── Container ── */
.container {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
  animation: fadeInDown 0.8s ease;
  color: #000000;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Counter card ── */
.counter-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 40px 80px 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 0 60px rgba(255,255,255,0.03);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.counter-card.pulse {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(139,92,246,0.5), 0 8px 32px rgba(0,0,0,0.3);
}

.count {
  font-size: 5.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.label {
  font-size: 1.1rem;
  opacity: 0.6;
  margin-top: 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.multiplier-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(139,92,246,0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Buttons ── */
.click-btn {
  display: inline-block;
  padding: 16px 48px;
  font-size: 1.3rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.click-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(124,58,237,0.6);
}

.click-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}

.reset-btn {
  display: block;
  margin: 20px auto 0;
  padding: 8px 24px;
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
}

/* ── Shop ── */
.shop-section {
  margin: 28px 0 8px;
}

.shop-section h2 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  opacity: 0.85;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shop-item {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.shop-item:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.shop-item.owned {
  border-color: rgba(52,211,153,0.5);
  background: rgba(52,211,153,0.1);
}

.shop-item .icon {
  font-size: 2rem;
}

.shop-item .name {
  font-weight: 700;
  font-size: 0.9rem;
}

.shop-item .desc {
  font-size: 0.72rem;
  opacity: 0.55;
  line-height: 1.3;
}

.shop-item .price {
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fbbf24;
}

.shop-item.buy-btn {
  margin-top: 4px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shop-item.buy-btn:hover {
  box-shadow: 0 2px 12px rgba(124,58,237,0.5);
  transform: scale(1.05);
}

.shop-item.buy-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.shop-item .owned-label {
  color: #34d399;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ── Floating particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-120px) scale(0); }
}

.burst {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: burstOut 0.6s ease-out forwards;
}

@keyframes burstOut {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx),var(--ty)) scale(0); }
}

/* Coin fly animation */
.coin-fly {
  position: fixed;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 999;
  animation: coinUp 0.7s ease-out forwards;
}

@keyframes coinUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.5); }
}
