/* =============================================================
   CLICKER.CSS — Floating Sidebars, Swapped Sides, Thinned Layout
   ============================================================= */

#tab-clicker {
  display: none;
  grid-template-columns: 310px 1fr 310px;
  height: calc(100vh - 64px);
  min-height: 600px;
  gap: 28px;
  padding: 24px 36px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

#tab-clicker.active {
  display: grid;
}

@media (max-width: 1100px) {
  #tab-clicker.active {
    grid-template-columns: 270px 1fr 270px;
    gap: 16px;
    padding: 16px;
  }
}

@media (max-width: 900px) {
  #tab-clicker.active {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
}

/* ============================================================
   FLOATING SIDEBARS (SEPARATED FROM CENTER)
   ============================================================ */
.upgrades-column {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.left-column {
  border-left: 2px solid var(--gold);
}

.right-column {
  border-right: 2px solid var(--crimson);
}

.column-header {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.column-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.column-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.upgrades-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Upgrade Card */
.upgrade-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.upgrade-card.affordable {
  border-color: rgba(245, 166, 35, 0.2);
}

.upgrade-card.affordable:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  transform: translateY(-1px);
}

.upgrade-card.locked {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Purchased count tag instead of P-01 / C-01 */
.upgrade-count-tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 4px 6px;
  border-radius: 6px;
  min-width: 36px;
  text-align: center;
}

.upgrade-card.affordable .upgrade-count-tag {
  color: var(--gold-bright);
  border-color: var(--border-gold);
}

.upgrade-info {
  flex: 1;
  min-width: 0;
}

.upgrade-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.upgrade-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.stat-gain {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.milestone-tag {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 800;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

.upgrade-cost-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-heading);
  min-width: 60px;
}

.cost-tag {
  font-size: 0.58rem;
  color: var(--text-dim);
  font-weight: 700;
}

.cost-num {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
}

/* ============================================================
   CENTER STAGE & EXPANSIVE CLICKER (FLOATING SEPARATION)
   ============================================================ */
.clicker-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Top HUD */
.clicker-top-hud {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
}

.hud-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hud-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hud-stat-val {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.hud-stat-val.gold { color: var(--gold-bright); }
.hud-stat-val.multiplier { color: #c084fc; }

/* Giant Clicker Arena (Scaled 1.5x) */
.clicker-main-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 10px 0;
}

#main-clicker {
  position: relative;
  width: 405px;
  height: 405px;
  max-width: min(405px, 48vh);
  max-height: min(405px, 48vh);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #1c1c24, #08080c 85%);
  border: 4px solid rgba(220, 38, 38, 0.45);
  box-shadow:
    0 0 0 8px rgba(220, 38, 38, 0.08),
    0 0 50px rgba(220, 38, 38, 0.3),
    0 24px 60px rgba(0, 0, 0, 0.95);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  user-select: none;
}

#main-clicker:hover {
  transform: scale(1.025);
  border-color: var(--red-bright);
  box-shadow:
    0 0 0 10px rgba(220, 38, 38, 0.18),
    0 0 65px rgba(220, 38, 38, 0.45),
    0 28px 65px rgba(0, 0, 0, 0.95);
}

#main-clicker.pressing {
  transform: scale(0.96);
}

#main-click-img {
  width: 92%;
  height: 92%;
  max-width: 380px;
  max-height: 380px;
  object-fit: contain;
  border-radius: 50%;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.85));
}

/* Fallback graphic */
.click-avatar-fallback {
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dictator-vector {
  width: 150px;
  height: 170px;
  position: relative;
}

.dictator-hair-el {
  width: 120px;
  height: 45px;
  background: #111;
  border-radius: 50px 50px 0 0;
  transform: rotate(-10deg);
  position: absolute;
  top: 10px;
  left: 10px;
}

.dictator-face-el {
  width: 100px;
  height: 100px;
  background: #d4a373;
  border-radius: 18px 18px 36px 36px;
  position: absolute;
  top: 34px;
  left: 24px;
}

.dictator-eyes-el {
  width: 12px;
  height: 5px;
  background: #111;
  position: absolute;
  top: 32px;
  left: 22px;
  box-shadow: 44px 0 0 #111;
}

.dictator-mustache-el {
  width: 22px;
  height: 16px;
  background: #111;
  position: absolute;
  top: 54px;
  left: 39px;
  border-radius: 2px;
}

.dictator-collar-el {
  width: 110px;
  height: 30px;
  background: #171b24;
  position: absolute;
  top: 130px;
  left: 20px;
  border-radius: 6px;
  border-top: 3px solid var(--crimson);
}

@keyframes click-pop-anim {
  0%   { transform: scale(1); }
  25%  { transform: scale(0.93) rotate(-2deg); }
  65%  { transform: scale(1.05) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

#main-click-img.click-recoil,
.click-avatar-fallback.click-recoil {
  animation: click-pop-anim 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clicker-bottom-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 6px;
}

.power-indicator-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  padding: 8px 24px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.power-label {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.power-label.sps-label {
  color: #ff9800;
}

.power-divider {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 900;
}

#event-time-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #7e22ce;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  display: none;
}
