/* ═══════════════════════════════════════════════════════════════
   Grow a Garden 2 Stock — Premium Dark Theme
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-body: #060610;
  --bg-surface: #0c0d18;
  --bg-card: #11131f;
  --bg-card-hover: #161928;
  --bg-elevated: #1a1d2e;
  --bg-header: rgba(6, 6, 16, 0.85);

  /* Borders */
  --border: #1a1d30;
  --border-light: #252940;
  --border-focus: #3b82f6;

  /* Text */
  --text-primary: #eaeaf0;
  --text-secondary: #9399b2;
  --text-muted: #6b7194;

  /* Accents */
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.12);
  --accent-glow: rgba(34, 197, 94, 0.25);
  --live-red: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --danger: #ef4444;

  /* Rarity Colors */
  --rarity-common: #9ca3af;
  --rarity-uncommon: #22c55e;
  --rarity-rare: #3b82f6;
  --rarity-epic: #a855f7;
  --rarity-legendary: #eab308;
  --rarity-mythic: #ec4899;
  --rarity-super: #f97316;
  --rarity-divine: #c4b5fd;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(34, 197, 94, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(168, 85, 247, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: #4ade80; }

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Layout Container ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── Header ─────────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-emoji {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.4));
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--live-red);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-red);
  animation: live-pulse 1.5s ease-in-out infinite;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-alerts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-alerts:hover {
  background: var(--border-light);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.btn-alerts.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Weather Banner ─────────────────────────────────────────── */
.weather-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(34, 197, 94, 0.06) 100%);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md);
  position: relative;
  z-index: 1;
}

.weather-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.weather-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.weather-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.weather-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.weather-effect {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.weather-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Status Bar ─────────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-md);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition-base);
  flex-shrink: 0;
}

.status-dot.connected { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.status-dot.reconnecting { background: var(--warning); animation: pulse-dot 1s ease infinite; }
.status-dot.error { background: var(--danger); }

.status-freshness.fresh { color: var(--accent); }
.status-freshness.stale { color: var(--warning); }
.status-freshness.old { color: var(--danger); }

.restock-timer {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  position: relative;
  z-index: 1;
}

.section-header .subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: var(--space-xs);
}

/* ── Category Tabs ──────────────────────────────────────────── */
.category-tabs {
  display: flex;
  gap: var(--space-xs);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 1;
}

.category-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.1);
}

.tab-count {
  background: rgba(255,255,255,0.06);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  transition: all var(--transition-base);
}

.tab.active .tab-count {
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent);
}

/* ── Stock Grid ─────────────────────────────────────────────── */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
  position: relative;
  z-index: 1;
  min-height: 200px;
}

/* ── Item Card ──────────────────────────────────────────────── */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: card-fade-in 0.4s ease both;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-rarity-color, var(--rarity-common));
  opacity: 0.8;
}

.item-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md), 0 0 20px rgba(var(--card-rarity-rgb, 156, 163, 175), 0.08);
}

.item-card.out-of-stock {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.item-card.out-of-stock:hover {
  opacity: 0.65;
  filter: grayscale(0.2);
}

.item-emoji {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  margin-bottom: var(--space-xs);
}

.item-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: center;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.rarity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(var(--badge-rgb, 156, 163, 175), 0.12);
  color: var(--badge-color, var(--rarity-common));
  border: 1px solid rgba(var(--badge-rgb, 156, 163, 175), 0.2);
}

.quantity-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.quantity-badge.out {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.item-price {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.item-price strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.item-stock-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: var(--space-xs);
}

.item-stock-status.in-stock {
  background: var(--accent-dim);
  color: var(--accent);
}

.item-stock-status.sold-out {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.item-last-seen {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-xs);
}

/* ── Rarity Variants ────────────────────────────────────────── */
.item-card[data-rarity="common"]    { --card-rarity-color: var(--rarity-common); --card-rarity-rgb: 156, 163, 175; }
.item-card[data-rarity="uncommon"]  { --card-rarity-color: var(--rarity-uncommon); --card-rarity-rgb: 34, 197, 94; }
.item-card[data-rarity="rare"]      { --card-rarity-color: var(--rarity-rare); --card-rarity-rgb: 59, 130, 246; }
.item-card[data-rarity="epic"]      { --card-rarity-color: var(--rarity-epic); --card-rarity-rgb: 168, 85, 247; }
.item-card[data-rarity="legendary"] { --card-rarity-color: var(--rarity-legendary); --card-rarity-rgb: 234, 179, 8; }
.item-card[data-rarity="mythic"]    { --card-rarity-color: var(--rarity-mythic); --card-rarity-rgb: 236, 72, 153; }
.item-card[data-rarity="super"]     { --card-rarity-color: var(--rarity-super); --card-rarity-rgb: 249, 115, 22; }
.item-card[data-rarity="divine"]    { --card-rarity-color: var(--rarity-divine); --card-rarity-rgb: 196, 181, 253; }

.item-card[data-rarity="prismatic"] {
  --card-rarity-color: transparent;
}
.item-card[data-rarity="prismatic"]::before {
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6, #ff6b6b);
  background-size: 200% 100%;
  animation: prismatic-shift 3s linear infinite;
  height: 3px;
  opacity: 1;
}
.item-card[data-rarity="prismatic"]:hover {
  box-shadow: var(--shadow-md),
    0 0 15px rgba(255, 107, 107, 0.1),
    0 0 15px rgba(75, 150, 255, 0.1);
}

.item-card[data-rarity="legendary"]:hover,
.item-card[data-rarity="mythic"]:hover,
.item-card[data-rarity="super"]:hover,
.item-card[data-rarity="divine"]:hover {
  box-shadow: var(--shadow-md), 0 0 25px rgba(var(--card-rarity-rgb), 0.12);
}

/* Rarity badge colors */
.rarity-badge[data-rarity="common"]    { --badge-color: var(--rarity-common); --badge-rgb: 156, 163, 175; }
.rarity-badge[data-rarity="uncommon"]  { --badge-color: var(--rarity-uncommon); --badge-rgb: 34, 197, 94; }
.rarity-badge[data-rarity="rare"]      { --badge-color: var(--rarity-rare); --badge-rgb: 59, 130, 246; }
.rarity-badge[data-rarity="epic"]      { --badge-color: var(--rarity-epic); --badge-rgb: 168, 85, 247; }
.rarity-badge[data-rarity="legendary"] { --badge-color: var(--rarity-legendary); --badge-rgb: 234, 179, 8; }
.rarity-badge[data-rarity="mythic"]    { --badge-color: var(--rarity-mythic); --badge-rgb: 236, 72, 153; }
.rarity-badge[data-rarity="super"]     { --badge-color: var(--rarity-super); --badge-rgb: 249, 115, 22; }
.rarity-badge[data-rarity="divine"]    { --badge-color: var(--rarity-divine); --badge-rgb: 196, 181, 253; }
.rarity-badge[data-rarity="prismatic"] {
  background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(255,217,61,0.12), rgba(107,203,119,0.12), rgba(77,150,255,0.12));
  color: #ffd93d;
  border-color: rgba(255, 217, 61, 0.25);
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state-text {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Skeleton Loading ───────────────────────────────────────── */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: var(--bg-elevated);
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-50 { width: 50%; }

/* ── Alerts Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--space-md);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-section {
  margin-bottom: var(--space-lg);
}

.modal-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

/* Volume Control */
.volume-control {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-glow);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.btn-test-sound {
  padding: 6px 14px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-test-sound:hover {
  background: rgba(34, 197, 94, 0.2);
}

/* Alert Toggle */
.alert-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
}

.alert-toggle:hover {
  border-color: var(--border-light);
}

.alert-toggle-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.alert-toggle-label .rarity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 11px;
  transition: all var(--transition-base);
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: all var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  background: var(--accent);
  transform: translateX(18px);
}

/* ── SEO Content Sections ───────────────────────────────────── */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.content-section p {
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.content-section ul {
  list-style: none;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.content-section li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.content-section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── FAQ Accordion ──────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-light);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  opacity: 0.7;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

@keyframes skeleton-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes prismatic-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes alert-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.3); }
}

/* Card stagger delays */
.item-card:nth-child(1)  { animation-delay: 0s; }
.item-card:nth-child(2)  { animation-delay: 0.04s; }
.item-card:nth-child(3)  { animation-delay: 0.08s; }
.item-card:nth-child(4)  { animation-delay: 0.12s; }
.item-card:nth-child(5)  { animation-delay: 0.16s; }
.item-card:nth-child(6)  { animation-delay: 0.20s; }
.item-card:nth-child(7)  { animation-delay: 0.24s; }
.item-card:nth-child(8)  { animation-delay: 0.28s; }
.item-card:nth-child(9)  { animation-delay: 0.32s; }
.item-card:nth-child(10) { animation-delay: 0.36s; }
.item-card:nth-child(11) { animation-delay: 0.40s; }
.item-card:nth-child(12) { animation-delay: 0.44s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    padding: var(--space-sm) var(--space-sm);
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .weather-inner {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }

  .weather-separator { display: none; }

  .weather-time {
    margin-left: 0;
  }

  .status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .category-tabs {
    padding: 0 var(--space-sm) var(--space-md);
  }

  .tab {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .stock-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-sm);
    padding: 0 var(--space-sm) var(--space-xl);
  }

  .item-card {
    padding: var(--space-md);
  }

  .item-emoji {
    font-size: 2.2rem;
  }

  .item-name {
    font-size: 0.88rem;
  }

  .section-header {
    padding: var(--space-lg) var(--space-sm) var(--space-md);
  }

  .content-section {
    padding: var(--space-xl) var(--space-sm);
  }

  .modal-content {
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 0.85rem;
  }

  .live-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .btn-alerts {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .stock-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .item-card {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }

  .item-emoji {
    font-size: 1.8rem;
  }

  .item-name {
    font-size: 0.82rem;
  }

  .item-meta {
    gap: 4px;
  }

  .rarity-badge, .quantity-badge {
    font-size: 0.65rem;
    padding: 1px 7px;
  }
}

@media (min-width: 1024px) {
  .stock-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
