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

html,
body {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at 20% 10%, #f6f1e5, #f0f0f0 45%, #e7ecf7 100%);
  color: #2b2b2b;
  overflow: hidden;
}

.game {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, 1fr) minmax(280px, 1fr);
  gap: 24px;
  padding: 24px;
  height: 100vh;
}

.panel {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-height: 0;
}

.panel-left {
  justify-content: center;
}

.panel-center {
  justify-content: center;
  gap: 22px;
}

.panel-right {
  align-items: stretch;
  min-height: 0;
}

.panel-title {
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #444;
  text-align: center;
}

.counter-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.counter {
  font-size: 56px;
  font-weight: bold;
  color: #333;
}

p {
  font-size: 18px;
  color: #666;
}

.name {
  font-size: 24px !important;
  color: #333;
  font-weight: bold;
  min-height: 30px;
}

#lastReward {
  font-size: 20px;
  color: #0f6b2f;
  font-weight: bold;
}

.cps {
  font-size: 18px !important;
  color: #666;
  font-weight: bold;
}

.stats-panel {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f6f6;
  border-left: 3px solid #28a745;
}

.stats-panel p {
  font-size: 16px;
  color: #555;
}

button {
  padding: 12px 20px;
  border-radius: 6px;
  border: none;
  background-color: #007bff;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s ease;
  width: 100%;
  max-width: 320px;
}

.clicker {
  background-color: #007bff;
  font-size: 18px;
  padding: 12px 20px;
  width: 100%;
  max-width: 320px;
  border-radius: 6px;
  box-shadow: none;
}

button:hover:not(:disabled) {
  background-color: #0056b3;
}

button:active:not(:disabled) {
  opacity: 0.8;
}


button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.upgrades button {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: none;
}

.upgrade-name {
  font-size: 16px;
}

.upgrade-desc,
.upgrade-cost {
  font-size: 14px;
  opacity: 0.85;
}

.reset-btn {
  background-color: #dc3545;
}

.reset-btn:hover:not(:disabled) {
  background-color: #c82333;
}

.collection-btn {
  background-color: #28a745;
}

.collection-btn:hover:not(:disabled) {
  background-color: #218838;
}

.upgradeFinal {
  background: linear-gradient(135deg, #ffb347, #ffcc33);
  color: #3a2a00;
}

.upgradeFinal:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff9f1c, #ffc107);
}

#streak {
  font-weight: bold;
  color: #0f6b2f;
}

.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
}

.upgrades {
  height: 100%;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
}

.close:hover {
  color: #333;
}

.modal-content h2 {
  color: #333;
  margin-bottom: 20px;
}

.collection-list {
  display: grid;
  gap: 10px;
}

.collection-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 3px solid #007bff;
}

.collection-item-name {
  font-weight: bold;
  color: #333;
}

.collection-item-count {
  color: #666;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .game {
    grid-template-columns: 1fr;
    height: auto;
  }

  .panel {
    width: 100%;
  }

  .panel-right {
    align-items: center;
  }

  .upgrade-list {
    width: 100%;
  }
}
  
