/* ============================================================
   farm-stats-theme.css — Pixel / Warfare Farm Stats
   Overrides .stat-*, .farm-stat-*, #profile-stats classes
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ─── Stat Row ─── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--px) * 2);
  margin-bottom: calc(var(--px) * 3);
  padding: 0 calc(var(--px) * 2);
}
.stat-card {
  background: rgba(0, 0, 0, 0.65);
  border: calc(var(--px) * 1) solid var(--border);
  padding: calc(var(--px) * 3);
  display: flex;
  align-items: center;
  gap: calc(var(--px) * 2);
  min-width: 0;
  position: relative;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: calc(var(--px) * -1);
  border: calc(var(--px) * 1) solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}
.stat-ic {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: calc(var(--px) * 1) solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.stat-ic .pxi svg {
  width: 20px;
  height: 20px;
  display: block;
}
.stat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #94a3b8;
  margin-bottom: calc(var(--px) * 0.5);
}
.stat-val {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #f1f5f9;
}

/* ─── Profile Stats (Top Bar) ─── */
#profile-stats {
  display: flex;
  gap: calc(var(--px) * 2);
  padding: calc(var(--px) * 1.5) calc(var(--px) * 2);
  background: rgba(0, 0, 0, 0.4);
  border: calc(var(--px) * 1) solid var(--border);
  margin: 0 calc(var(--px) * 2);
}
#profile-stats span {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--px) * 1);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #94a3b8;
}
#profile-stats .pxi svg {
  width: 12px;
  height: 12px;
  display: block;
}

/* ─── Dynamic Farm Stats (scarecrow, shield) ─── */
.farm-stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.farm-stat-icon .pxi svg {
  width: 20px;
  height: 20px;
  display: block;
}
.farm-stat-icon-shield .pxi svg { color: #4ade80; }
.farm-stat-icon-shield--off .pxi svg { color: #ef4444; }
.farm-stat-icon-water .pxi svg { color: #60a5fa; }
.farm-stat-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #94a3b8;
  margin-bottom: calc(var(--px) * 0.5);
}
.farm-stat-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #f1f5f9;
}
.farm-stat-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: #64748b;
  margin-top: calc(var(--px) * 0.25);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
  #profile-stats { flex-wrap: wrap; }
}
