/* Game page styles — uses theme.css tokens */

.game-container {
  min-height: calc(100vh - 65px);
  position: relative;
}

/* Loading */
.game-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Header stats */
.game-header-stats {
  display: flex;
  gap: 24px;
}

.header-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.header-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.header-stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--orange);
}

/* Game layout */
.game-area {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: calc(100vh - 65px);
}

/* Click zone */
.click-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px;
  overflow: hidden;
}

.click-zone-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.click-target-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.click-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 43, 0.2);
}

.click-ring-outer {
  width: 220px;
  height: 220px;
  animation: pulse-ring 2s ease-in-out infinite;
}

.click-ring-inner {
  width: 180px;
  height: 180px;
  animation: pulse-ring 2s ease-in-out infinite 0.3s;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

.click-target {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  box-shadow: 0 0 40px rgba(255, 107, 43, 0.2), inset 0 0 30px rgba(255, 107, 43, 0.05);
  position: relative;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}

.click-target:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(255, 107, 43, 0.35), inset 0 0 30px rgba(255, 107, 43, 0.1);
}

.click-target:active {
  transform: scale(0.92);
  box-shadow: 0 0 20px rgba(255, 107, 43, 0.5), inset 0 0 30px rgba(255, 107, 43, 0.15);
}

.click-target.clicked {
  animation: click-pop 0.15s ease-out;
}

@keyframes click-pop {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.character-emoji {
  font-size: 64px;
  line-height: 1;
  pointer-events: none;
}

/* Credits display */
.click-info {
  text-align: center;
  z-index: 2;
}

.credits-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.credits-label {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.credits-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  color: var(--text);
  line-height: 1;
  transition: color 0.15s ease;
}

.credits-value.credit-bump {
  color: var(--orange);
}

.cpt-display {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

/* Floating feedback */
.click-feedback-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.click-float {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--orange);
  pointer-events: none;
  animation: float-up 0.8s ease-out forwards;
  text-shadow: 0 0 10px rgba(255, 107, 43, 0.5);
}

@keyframes float-up {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.6); }
}

/* Side panel */
.side-panel {
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.panel-tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.panel-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.panel-tab.active {
  color: var(--orange);
  border-bottom: 2px solid var(--orange);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Skins list */
.skins-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skin-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, transform 0.15s;
}

.skin-card:hover {
  border-color: rgba(255, 107, 43, 0.3);
}

.skin-card.equipped {
  border-color: var(--orange);
  box-shadow: 0 0 12px rgba(255, 107, 43, 0.1);
}

.skin-card-emoji {
  font-size: 32px;
  text-align: center;
}

.skin-card-info {
  min-width: 0;
}

.skin-card-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.skin-card-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.skin-cost {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.skin-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
}

.skin-btn-buy {
  color: var(--orange);
  border-color: rgba(255, 107, 43, 0.3);
}

.skin-btn-buy:hover {
  background: var(--orange-dim);
  border-color: var(--orange);
}

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

.skin-btn-equip {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.3);
}

.skin-btn-equip:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
}

.skin-btn-equipped {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-dim);
  cursor: default;
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: grid;
  grid-template-columns: 32px 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.lb-rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
}

.lb-row:nth-child(1) .lb-rank { color: #FFD700; }
.lb-row:nth-child(2) .lb-rank { color: #C0C0C0; }
.lb-row:nth-child(3) .lb-rank { color: #CD7F32; }

.lb-emoji {
  font-size: 22px;
  text-align: center;
}

.lb-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-clicks {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

.lb-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Toast */
.game-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg-card);
  border: 1px solid var(--orange);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.2s forwards;
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.2);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* Responsive */
@media (max-width: 768px) {
  .game-area {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .click-zone {
    min-height: 55vh;
    padding: 24px;
  }

  .side-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 45vh;
  }

  .game-header-stats {
    gap: 16px;
  }

  .header-stat-value {
    font-size: 15px;
  }

  .credits-value {
    font-size: 36px;
  }

  .click-target {
    width: 130px;
    height: 130px;
  }

  .character-emoji {
    font-size: 52px;
  }

  .click-ring-outer {
    width: 190px;
    height: 190px;
  }

  .click-ring-inner {
    width: 155px;
    height: 155px;
  }

  .click-target-wrapper {
    width: 190px;
    height: 190px;
  }
}
