/* =========================================================
   Legend Tracker - Clash of Clans Discord Bot
   Aesthetic: Tactical War Room & Legend League (Non-Generic)
   Performance: Ultra-Lightweight, 60fps on Potato Phones
   ========================================================= */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Dark War Room Palette */
  --bg-base: #090c13;
  --bg-surface: #0f1420;
  --bg-card: #141b2b;
  --bg-card-hover: #192236;
  --bg-input: #0b0f18;
  --bg-alt: #121826;

  /* Clash & Legend Accents */
  --gold-primary: #f59e0b;
  --gold-light: #fde68a;
  --gold-dark: #b45309;
  --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  --gold-glow: rgba(245, 158, 11, 0.18);

  --emerald: #10b981;
  --emerald-light: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.15);

  --crimson: #ef4444;
  --crimson-light: #f87171;

  --elixir: #a855f7;
  --elixir-light: #c084fc;

  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --blurple-glow: rgba(88, 101, 242, 0.2);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-dark: #090d16;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: #202b3d;
  --border-gold: rgba(245, 158, 11, 0.35);

  /* Fonts */
  --font-display: "Russo One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  /* Fast, lightweight shadows (No heavy GPU blur) */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 4px 14px rgba(245, 158, 11, 0.25);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Crisp, high-contrast links */
a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top War Room Ticker Ribbon (Removed) --- */
.ticker-bar {
  display: none !important;
}

.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.ticker-dot.pulse {
  box-shadow: 0 0 6px var(--emerald);
}

/* --- Navigation Bar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 19, 0.96);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: var(--bg-card);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--gold-primary);
  color: var(--text-dark);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s ease;
  padding: 6px 2px;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
  padding: 16px 20px 20px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.mobile-nav-links a.active {
  color: var(--gold-primary);
  border-left: 3px solid var(--gold-primary);
}

/* --- Tactical Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  min-height: 44px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1.02rem;
  min-height: 48px;
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--text-dark);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  filter: brightness(1.08);
}

.btn-blurple {
  background-color: var(--blurple);
  color: #ffffff;
}

.btn-blurple:hover {
  background-color: var(--blurple-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #3b4b66;
}

.btn-discord-ghost {
  background: rgba(88, 101, 242, 0.12);
  color: #939aff;
  border-color: rgba(88, 101, 242, 0.35);
}

.btn-discord-ghost:hover {
  background: rgba(88, 101, 242, 0.25);
  color: #ffffff;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
  }
}

/* --- Hero Section --- */
.hero {
  padding: 56px 0 40px;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  color: #ffffff;
}

.hero h1 .highlight-gold {
  color: var(--gold-primary);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.06rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

/* Tactical Feature Chips in Hero */
.hero-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}

.chip-icon {
  color: var(--emerald);
  font-weight: bold;
}

.discord-mockup {
  width: 100%;
  max-width: 440px;
  background: #11141c;
  border: 1px solid #232d3f;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.discord-bar {
  background: #0b0e14;
  padding: 8px 14px;
  border-bottom: 1px solid #1a2333;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.discord-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.discord-body {
  padding: 16px;
}

.discord-msg-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.discord-bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  background: var(--bg-card);
}

.discord-bot-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.discord-tag {
  background: var(--blurple);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.discord-time {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Discord Embed Container */
.discord-embed {
  background: #161c28;
  border-left: 4px solid var(--emerald);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 12px;
}

.embed-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.embed-title-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-light);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.embed-stat-line {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.embed-tag {
  font-family: var(--font-mono);
  color: var(--gold-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.embed-equip-row {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.equip-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  color: #cbd5e1;
}

/* Discord Action Buttons */
.discord-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.discord-btn {
  background: #2b3548;
  color: #e2e8f0;
  border: 1px solid #3b4961;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.discord-btn:hover {
  background: #37445c;
  color: #ffffff;
}

.discord-btn.gold {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-primary);
  border-color: rgba(245, 158, 11, 0.4);
}

/* --- Stats Ribbon --- */
.stats-ribbon {
  margin: 40px auto 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* --- Section Headers --- */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  color: #ffffff;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Feature Showcase --- */
.features-section {
  padding: 60px 0;
}

/* Tactical Feature Navigation Pills */
.feature-nav-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.feature-nav-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 40px;
}

.feature-nav-pill:hover,
.feature-nav-pill.active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.feature-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  transition: border-color 0.2s ease;
}

.feature-block:hover {
  border-color: #2b3952;
}

.feature-block.reverse .feature-info {
  order: 2;
}

.feature-block.reverse .feature-visual {
  order: 1;
}

.feature-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.tag-emerald {
  background: var(--emerald-glow);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tag-gold {
  background: var(--gold-glow);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
}

.tag-blurple {
  background: var(--blurple-glow);
  color: #939aff;
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.tag-crimson {
  background: rgba(239, 68, 68, 0.15);
  color: var(--crimson-light);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.feature-points li {
  position: relative;
  padding-left: 26px;
  font-size: 0.94rem;
  color: var(--text-main);
  line-height: 1.55;
  display: block; /* MUST be block so mixed text nodes and code tags wrap together */
}

.point-icon {
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--emerald);
  font-weight: 900;
  user-select: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold-light);
  word-break: break-word;
}

.feature-cmd-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #090c13;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold-primary);
}

.feature-cmd-pill a {
  color: var(--text-dim);
  font-size: 0.76rem;
  text-decoration: underline;
}

.feature-cmd-pill a:hover {
  color: #ffffff;
}

/* Image Container Frame */
.media-frame {
  background: #07090e;
  border: 1px solid #202b3d;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.media-frame img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* --- Commands Section (Preview Grid) --- */
.commands-section {
  padding: 60px 0;
  background: #0b0e16;
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

.cmd-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.cmd-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
  .cmd-card:hover {
    border-color: var(--border-gold);
    background: var(--bg-card);
  }
}

.cmd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cmd-syntax {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
  word-break: break-word;
}

.cmd-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cmd-explanation {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cmd-copy-bar {
  background: #080b11;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cmd-copy-bar span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.copy-button {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 28px;
  min-width: 50px;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.copy-button:hover,
.copy-button.copied {
  background: var(--gold-primary);
  color: var(--text-dark);
}

/* --- FAQ Section --- */
.faq-section {
  padding: 60px 0;
}

.faq-container {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: border-color 0.15s ease;
}

.faq-card:hover {
  border-color: #2e3d55;
}

.faq-card summary {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  user-select: none;
  min-height: 36px;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold-primary);
  transition: transform 0.15s ease;
  line-height: 1;
}

.faq-card[open] summary::after {
  content: "−";
  color: var(--gold-light);
}

.faq-card[open] {
  border-color: var(--border-gold);
}

.faq-content {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

/* --- Tactical CTA Section --- */
.cta-section {
  padding: 40px 0 60px;
}

.cta-box {
  background: linear-gradient(135deg, #0f1422 0%, #161f33 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 28px;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Footer --- */
.site-footer {
  background: #06080d;
  border-top: 1px solid var(--border-card);
  padding: 48px 0 28px;
}

.footer-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 10px;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--gold-primary);
}

.footer-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.supercell-disclaimer {
  max-width: 640px;
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* =========================================================
   COMMANDS PAGE STYLING (commands.html)
   ========================================================= */
.docs-header {
  padding: 48px 0 32px;
  text-align: center;
}

.docs-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ffffff;
  margin-bottom: 12px;
}

.docs-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 30px;
}

/* Filter Wrapper */
.filter-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-input {
  width: 100%;
  background: #080b11;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #ffffff;
  font-size: 0.96rem;
  outline: none;
  min-height: 44px;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--gold-primary);
}

/* Horizontally Swipeable Category Pills on Mobile */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.category-pills::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  min-height: 38px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.pill-btn:hover,
.pill-btn.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* Full Command List on Commands Page */
.command-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 60px;
}

.command-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.15s ease;
}

.command-card:hover {
  border-color: #2b3952;
}

.cmd-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.cmd-name {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
  word-break: break-word;
}

.cmd-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cmd-badge.admin {
  background: rgba(239, 68, 68, 0.15);
  color: var(--crimson-light);
  border-color: rgba(239, 68, 68, 0.3);
}

.cmd-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 16px;
  line-height: 1.55;
}

/* Responsive Parameter Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.params-table th {
  padding: 8px 12px;
  background: #080b11;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-card);
}

.params-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.param-tag {
  font-family: var(--font-mono);
  color: var(--gold-primary);
  font-weight: 700;
}

.param-type {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.cmd-example {
  background: #080b11;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #e2e8f0;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  min-height: 32px;
  min-width: 60px;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--gold-primary);
  color: var(--text-dark);
  border-color: var(--gold-primary);
}

/* =========================================================
   RESPONSIVE & POTATO PHONE ADAPTATIONS
   ========================================================= */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-chips {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .feature-block.reverse .feature-info {
    order: 1;
  }
  .feature-block.reverse .feature-visual {
    order: 2;
  }

  .footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

/* Phones & Small Screens (<= 768px) */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-actions .btn-gold,
  .nav-actions .btn-discord-ghost {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 36px 0 24px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-lead {
    font-size: 0.96rem;
    margin-bottom: 22px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-chips {
    gap: 6px;
  }

  .chip {
    font-size: 0.74rem;
    padding: 4px 8px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  .feature-block {
    padding: 18px 14px;
  }

  .feature-title {
    font-size: 1.25rem;
  }

  .cmd-example {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cmd-example .copy-btn {
    align-self: flex-end;
  }

  .footer-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* Ultra-Budget & Potato Phones (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .hero {
    padding: 28px 0 18px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-lead {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-item {
    background: var(--bg-card);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  .cmd-preview-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 28px 14px;
  }
}
