/* ============ DARK THEME (default) ============ */
:root {
  /* Warm charcoal with teal accent */
  --bg: #0f1117;
  --bg-card: #171921;
  --bg-card-hover: #1e212c;
  --bg-table-row: #151720;
  --bg-table-row-alt: #13151d;
  --bg-table-head: #121419;
  --border: rgba(130, 200, 200, 0.09);
  --border-hover: rgba(130, 200, 200, 0.2);
  --text: #e6eaf0;
  --text-muted: #9ca6b8;
  --text-dim: #6b7590;
  /* Warm teal accent */
  --accent: #14b8a6;
  --accent-light: #2dd4bf;
  --accent-bg: rgba(20, 184, 166, 0.1);
  /* Secondary accent — warm amber for highlights */
  --accent-warm: #f59e0b;
  --accent-warm-bg: rgba(245, 158, 11, 0.1);
  /* Status colors — warm palette */
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.1);
  --yellow: #fbbf24;
  --yellow-bg: rgba(251, 191, 36, 0.1);
  --orange: #fb923c;
  --orange-bg: rgba(251, 146, 60, 0.1);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);
  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.1);
  /* Chrome */
  --nav-bg: rgba(15, 17, 23, 0.92);
  --nav-link-hover: rgba(20, 184, 166, 0.06);
  --modal-overlay: rgba(0, 0, 0, 0.65);
  --row-hover: rgba(20, 184, 166, 0.06);
  --row-alt: rgba(130, 200, 200, 0.02);
  --row-border: rgba(130, 200, 200, 0.06);
  --scrollbar-thumb: rgba(20, 184, 166, 0.15);
  --scrollbar-thumb-hover: rgba(20, 184, 166, 0.3);
  --dot-empty: rgba(130, 200, 200, 0.12);
  --cat-tag-bg: rgba(20, 184, 166, 0.07);
  /* Hero gradient */
  --hero-gradient: linear-gradient(135deg, rgba(20, 184, 166, 0.07) 0%, rgba(245, 158, 11, 0.04) 50%, transparent 100%);
  --hero-stat-color: var(--accent-light);
  /* Layout */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: "Inter", -apple-system, "Segoe UI", sans-serif;
  --max-w: 1400px;
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0faf8;
  --bg-table-row: #ffffff;
  --bg-table-row-alt: #f8fbfa;
  --bg-table-head: #eef5f3;
  --border: rgba(20, 184, 166, 0.1);
  --border-hover: rgba(20, 184, 166, 0.22);
  --text: #1a1d26;
  --text-muted: #4f5b6e;
  --text-dim: #8592a6;
  --accent: #0d9488;
  --accent-light: #0f766e;
  --accent-bg: rgba(13, 148, 136, 0.06);
  --accent-warm: #d97706;
  --accent-warm-bg: rgba(217, 119, 6, 0.06);
  --green: #059669;
  --green-bg: rgba(5, 150, 105, 0.06);
  --yellow: #d97706;
  --yellow-bg: rgba(217, 119, 6, 0.06);
  --orange: #ea580c;
  --orange-bg: rgba(234, 88, 12, 0.06);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.06);
  --purple: #7c3aed;
  --purple-bg: rgba(124, 58, 237, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-link-hover: rgba(13, 148, 136, 0.05);
  --modal-overlay: rgba(26, 29, 38, 0.2);
  --row-hover: rgba(13, 148, 136, 0.04);
  --row-alt: rgba(13, 148, 136, 0.02);
  --row-border: rgba(13, 148, 136, 0.06);
  --scrollbar-thumb: rgba(13, 148, 136, 0.14);
  --scrollbar-thumb-hover: rgba(13, 148, 136, 0.26);
  --dot-empty: rgba(13, 148, 136, 0.1);
  --cat-tag-bg: rgba(13, 148, 136, 0.05);
  --hero-gradient: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(245, 158, 11, 0.03) 50%, transparent 100%);
  --hero-stat-color: var(--accent);
  --shadow: 0 4px 20px rgba(13, 148, 136, 0.06);
  --shadow-lg: 0 12px 40px rgba(13, 148, 136, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.nav-logo:hover { opacity: 0.85; text-decoration: none; }

.logo-icon { font-size: 22px; }
.logo-accent { color: var(--accent-light); font-weight: 800; }

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { background: var(--nav-link-hover); color: var(--text); text-decoration: none; }
.nav-link.active {
  background: var(--accent-bg);
  color: var(--accent-light);
  position: relative;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-fav-icon { font-size: 15px; }
.nav-fav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 24px;
  background: var(--hero-gradient);
  border-radius: 0 0 var(--radius) var(--radius);
  animation: fadeInDown 0.5s ease-out;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 680px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  animation: fadeInUp 0.6s ease-out both;
}

.hero-stat:nth-child(1) { animation-delay: 0.1s; }
.hero-stat:nth-child(2) { animation-delay: 0.2s; }
.hero-stat:nth-child(3) { animation-delay: 0.3s; }

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--hero-stat-color);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============ FILTERS ============ */
.filters-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 16px;
}

.filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeIn 0.4s ease-out;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); font-weight: 600; }

.filter-select, .filter-input {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}

.filter-select:focus, .filter-input:focus { border-color: var(--accent); }
.filter-select { padding-right: 28px; cursor: pointer; }

.filter-actions { flex-direction: row; align-items: center; gap: 12px; margin-left: auto; }

/* Filter presets */
.filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 22px 0;
}

.filter-presets-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-right: 4px;
}

.preset-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.preset-btn:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-bg); }
.preset-btn.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-light); font-weight: 600; }

/* Multi-select dropdown */
.multi-select { position: relative; }

.multi-select-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 160px;
}

.multi-select-toggle:focus { border-color: var(--accent); outline: none; }

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 50;
  padding: 6px 0;
  max-height: 260px;
  overflow-y: auto;
}

.multi-select.open .multi-select-dropdown { display: block; }

.multi-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s;
}

.multi-opt:hover { background: var(--nav-link-hover); color: var(--text); }

.multi-opt input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.results-count { font-size: 13px; color: var(--text-dim); white-space: nowrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }

/* Favorite button */
.btn-fav {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-fav:hover { border-color: var(--red); color: var(--red); }
.btn-fav.is-fav { background: var(--red-bg); border-color: rgba(239, 68, 68, 0.3); color: var(--red); }

/* ============ TABLE ============ */
.table-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.methods-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.methods-table th {
  position: sticky;
  top: 0;
  background: var(--bg-table-head);
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  z-index: 2;
}

.methods-table th:hover { color: var(--text-muted); }
.methods-table th.sorted-asc::after { content: " \25B2"; font-size: 9px; }
.methods-table th.sorted-desc::after { content: " \25BC"; font-size: 9px; }

.methods-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--row-border);
  vertical-align: middle;
}

.methods-table tr:nth-child(even) td { background: var(--row-alt); }
.methods-table tr:hover td { background: var(--row-hover); }

.method-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent-light);
  cursor: pointer;
  min-width: 220px;
}

.method-name-cell:hover { text-decoration: underline; }

.method-flag { font-size: 18px; }
.method-country-tag { font-size: 11px; color: var(--text-dim); font-weight: 400; }

.cell-clickable {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cell-clickable:hover { background: var(--nav-link-hover); }
.cell-clickable::after { content: "\24D8"; font-size: 10px; color: var(--text-dim); opacity: 0; transition: opacity 0.12s; }
.cell-clickable:hover::after { opacity: 1; }

/* Table fav star */
.table-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  opacity: 0.3;
  transition: opacity 0.15s, transform 0.15s;
}
.table-fav-btn:hover { opacity: 0.7; transform: scale(1.2); }
.table-fav-btn.is-fav { opacity: 1; }

/* Rating dots */
.rating-dots { display: inline-flex; gap: 3px; }
.rating-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-empty);
}

.rating-dot.filled { background: var(--accent); }
.rating-dot.filled.r1 { background: var(--red); }
.rating-dot.filled.r2 { background: var(--orange); }
.rating-dot.filled.r3 { background: var(--yellow); }
.rating-dot.filled.r4 { background: var(--green); }
.rating-dot.filled.r5 { background: #10b981; }

/* Larger dots on detail pages */
.attr-card .rating-dots { gap: 4px; }
.attr-card .rating-dot { width: 9px; height: 9px; }

/* Difficulty badge */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.diff-1 { background: var(--green-bg); color: var(--green); }
.diff-2 { background: rgba(34, 197, 94, 0.08); color: #86efac; }
.diff-3 { background: var(--yellow-bg); color: var(--yellow); }
.diff-4 { background: var(--orange-bg); color: var(--orange); }
.diff-5 { background: var(--red-bg); color: var(--red); }

/* Category tag */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--cat-tag-bg);
  color: var(--text-muted);
}

.category-tag svg { flex-shrink: 0; }

/* ============ VIEW TOGGLE (table/cards) ============ */
.view-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
}

.view-toggle-btn:hover { border-color: var(--border-hover); color: var(--text); }
.view-toggle-btn.active { background: var(--accent-bg); border-color: rgba(59, 130, 246, 0.3); color: var(--accent-light); }

/* ============ CARDS VIEW ============ */
.methods-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding: 0;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-top-color: var(--accent);
}

.method-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.method-card-flag { font-size: 32px; flex-shrink: 0; }

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

.method-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 2px;
  line-height: 1.3;
}

.method-card-country {
  font-size: 12px;
  color: var(--text-dim);
}

.method-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.method-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.method-card-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.method-card-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.method-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.3;
  transition: opacity 0.15s, transform 0.15s;
  padding: 2px;
}

.method-card-fav:hover { opacity: 0.7; transform: scale(1.2); }
.method-card-fav.is-fav { opacity: 1; }

/* ============ LOADING / EMPTY ============ */
.table-loading, .table-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* ============ SKELETON LOADING ============ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-line {
  height: 14px;
  background: var(--dot-empty);
  border-radius: 6px;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w100 { width: 100%; }
.skeleton-line.h20 { height: 20px; }
.skeleton-line.h10 { height: 10px; }

.skeleton-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dot-empty);
  animation: shimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.25s ease-out;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.12s;
}

.modal-close:hover { background: var(--nav-link-hover); }

.modal-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent-bg);
  color: var(--accent-light);
}

.modal-body { padding: 16px 24px 24px; }

.attr-value-big {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-light);
}

.attr-rating { margin-bottom: 12px; }
.attr-details { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }

/* Attribute comparison indicator */
.attr-comparison {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.attr-comparison.above { color: var(--green); background: var(--green-bg); }
.attr-comparison.below { color: var(--red); background: var(--red-bg); }
.attr-comparison.avg { color: var(--text-dim); background: var(--cat-tag-bg); }

/* Source official highlight */
.source-official { border-color: rgba(52, 211, 153, 0.25) !important; background: var(--green-bg); }

.source-divider { border: none !important; padding: 4px 0 !important; }

.source-other-toggle {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 0;
  list-style: none;
  user-select: none;
}

.source-other-toggle::-webkit-details-marker { display: none; }
.source-other-toggle::before { content: "\\25B6 "; font-size: 9px; margin-right: 4px; }
details[open] > .source-other-toggle::before { content: "\\25BC "; }

.source-other-list {
  list-style: none;
  padding: 0;
  margin-top: 6px;
}

.source-other-list li {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: 13px;
}

.attr-sources h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.attr-sources ul { list-style: none; }

.attr-sources li {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
  transition: background 0.12s;
}

.attr-sources li:hover { background: var(--row-alt); }

.attr-sources a { display: flex; align-items: center; gap: 8px; }

.btn-report-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-report-link:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
.btn-report-link.reported { border-color: var(--green); color: var(--green); background: var(--green-bg); cursor: default; }

.source-type {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.source-type.official { background: var(--green-bg); color: var(--green); }
.source-type.community { background: var(--accent-bg); color: var(--accent-light); }
.source-type.media { background: var(--yellow-bg); color: var(--yellow); }

/* ============ METHOD DETAIL ============ */
.method-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.method-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.method-header-flag { font-size: 48px; }

.method-header-info h1 {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.method-header-country { color: var(--text-muted); font-size: 15px; }

.method-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.back-link:hover { color: var(--text); text-decoration: none; }

.detail-section { margin-bottom: 32px; }

.detail-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-description {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Attributes grid */
.attrs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.attr-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--row-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.attr-card:hover { background: var(--cat-tag-bg); border-color: var(--border-hover); }

.attr-card-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.attr-card-value { font-size: 14px; font-weight: 600; text-align: right; }

/* Instructions (stepper) */
.instructions-list {
  counter-reset: step;
  position: relative;
}

.instruction-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  margin-bottom: 0;
  padding-bottom: 24px;
  counter-increment: step;
  position: relative;
}

.instruction-step:last-child { padding-bottom: 0; }

/* Vertical connector line */
.instruction-step::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.instruction-step:last-child::before { display: none; }

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-light);
  position: relative;
  z-index: 1;
  transition: background 0.2s, transform 0.2s;
}

.instruction-step:hover .step-number {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.step-content h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.step-link {
  font-size: 12px;
  padding: 3px 8px;
  background: var(--accent-bg);
  border-radius: 4px;
}

/* Pros & Cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pros-list, .cons-list {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.pros-list { background: rgba(34, 197, 94, 0.04); border-color: rgba(34, 197, 94, 0.15); }
.cons-list { background: rgba(239, 68, 68, 0.04); border-color: rgba(239, 68, 68, 0.15); }

.pros-list h3 { color: var(--green); font-size: 14px; margin-bottom: 10px; }
.cons-list h3 { color: var(--red); font-size: 14px; margin-bottom: 10px; }

.pros-list li, .cons-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
  list-style: none;
}

.pros-list li::before { content: "+ "; color: var(--green); font-weight: 700; }
.cons-list li::before { content: "- "; color: var(--red); font-weight: 700; }

/* Telegram channels */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.channel-card {
  padding: 14px;
  background: var(--row-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s;
}

.channel-card:hover { border-color: var(--border-hover); }
.channel-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.channel-card p { font-size: 12px; color: var(--text-dim); }
.channel-card a { font-size: 12px; }

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

.story-card {
  padding: 14px;
  background: var(--row-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.story-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.story-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.story-card .story-source { font-size: 12px; color: var(--text-dim); }

/* ============ COUNTRIES PAGE ============ */
.countries-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.countries-region-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.region-filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.region-filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.region-filter-btn.active { background: var(--accent-bg); border-color: rgba(59, 130, 246, 0.3); color: var(--accent-light); }

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.country-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out both;
}

.country-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.country-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.country-card-flag { font-size: 36px; }

.country-card-name {
  font-size: 18px;
  font-weight: 700;
}

.country-card-methods-count {
  font-size: 12px;
  color: var(--text-dim);
}

.country-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.country-stat {
  padding: 8px 10px;
  background: var(--row-alt);
  border-radius: 6px;
}

.country-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.country-stat-value {
  font-size: 13px;
  font-weight: 600;
}

.country-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.country-cat-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  background: var(--cat-tag-bg);
  color: var(--text-dim);
}

/* ============ COUNTRY DETAIL ============ */
.country-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.country-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.country-detail-flag { font-size: 64px; }

.country-detail-info h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  margin-bottom: 4px;
}

.country-detail-subtitle { color: var(--text-muted); font-size: 15px; }

.country-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.country-overview-stat {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.country-overview-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.country-overview-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.country-methods-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.country-method-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.country-method-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.country-method-card-info { flex: 1; }

.country-method-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.country-method-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.country-method-card-meta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ============ FAVORITES ============ */
.favorites-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.favorites-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.favorites-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.fav-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.fav-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.fav-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.fav-card-flag { font-size: 24px; }
.fav-card-name { font-weight: 600; color: var(--accent-light); font-size: 15px; }
.fav-card-country { font-size: 12px; color: var(--text-dim); margin-left: auto; }

.fav-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.fav-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fav-card-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.fav-card-remove:hover { background: var(--red-bg); color: var(--red); }

/* ============ COMPARE ============ */
.compare-selectors {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-select {
  appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  min-width: 240px;
  cursor: pointer;
}

.compare-table-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-table th, .compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--row-border);
  text-align: left;
}

.compare-table th {
  background: var(--bg-table-head);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 600;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ============ ABOUT ============ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.about-card p { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin-bottom: 8px; }
.about-card ul { padding-left: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.about-card li { margin-bottom: 6px; }

.agent-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.agent-box {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.agent-expert { background: rgba(34, 197, 94, 0.04); border-color: rgba(34, 197, 94, 0.2); }
.agent-critic { background: rgba(234, 179, 8, 0.04); border-color: rgba(234, 179, 8, 0.2); }

.agent-icon { font-size: 32px; margin-bottom: 8px; }
.agent-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.agent-box p { font-size: 13px; color: var(--text-muted); }
.agent-arrow { font-size: 28px; color: var(--text-dim); }
.agent-result { text-align: center; font-weight: 600; color: var(--accent-light); margin-top: 8px; }

/* ============ FOOTER ============ */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ============ LEGALITY BANNER ============ */
.legality-banner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.legality-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--green-bg);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  animation: fadeIn 0.5s ease-out;
}

[data-theme="light"] .legality-banner-inner {
  border-color: rgba(5, 150, 105, 0.2);
}

.legality-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.legality-banner-text {
  line-height: 1.4;
}

.legality-banner-text a {
  color: inherit;
  text-decoration: underline;
}

/* ============ MAP ============ */
.map-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

#worldMap {
  height: 500px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 1;
}

.map-popup-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.map-popup-count {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.map-popup-methods {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
}

.map-popup-methods li {
  padding: 3px 0;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}

.map-popup-methods li:last-child { border-bottom: none; }

.map-popup-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #0d9488);
}

/* Custom marker */
.country-marker {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(20, 184, 166, 0.35);
  transition: transform 0.2s;
  animation: markerPulse 2.5s ease-in-out infinite;
}

.country-marker:hover {
  transform: scale(1.2);
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(20, 184, 166, 0.35); }
  50% { box-shadow: 0 2px 20px rgba(20, 184, 166, 0.55); }
}

/* ============ HERO GLOW ============ */
.hero-home {
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -60%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, rgba(245, 158, 11, 0.04) 40%, transparent 70%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(-40px, 30px) scale(1.15); opacity: 1; }
}

/* ============ HOME MINI MAP ============ */
.home-map-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 24px;
}

.home-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-map-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.home-map-expand {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  transition: color 0.15s;
}

.home-map-expand:hover {
  color: var(--accent);
  text-decoration: none;
}

.home-map-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}

.home-map-wrap:hover {
  border-color: var(--border-hover);
}

#homeMap {
  height: 280px;
  z-index: 1;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.25s, transform 0.25s, background 0.15s;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ============ SMOOTH PAGE TRANSITIONS ============ */
.page {
  animation: fadeIn 0.3s ease-out;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 99;
  }

  .nav-links.open { opacity: 1; pointer-events: auto; }

  .nav-link { font-size: 18px; padding: 14px 24px; }

  .nav-inner { padding: 0 16px; }
  .hero { padding: 32px 16px 16px; }
  .methods-cards { grid-template-columns: 1fr; }
  .legality-banner { padding: 0 16px; }
  .filters-bar, .table-section, .compare-selectors, .compare-table-wrap,
  .countries-section, .favorites-content { padding-left: 16px; padding-right: 16px; }
  .filters-inner { padding: 12px; }
  .filter-group { min-width: 100%; }
  .filter-actions { margin-left: 0; }
  .pros-cons { grid-template-columns: 1fr; }
  .method-header { flex-direction: column; }
  .attrs-grid { grid-template-columns: 1fr; }
  .countries-grid { grid-template-columns: 1fr; }
  .favorites-grid { grid-template-columns: 1fr; }
  .country-detail-header { flex-direction: column; text-align: center; }
  .hero-stats { justify-content: center; }
  .compare-select { min-width: 100%; }
  .home-map-section { padding: 0 16px 16px; }
  #homeMap { height: 220px; }
  .home-map-header { flex-direction: column; gap: 6px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .method-header-flag { font-size: 36px; }
  .country-detail-flag { font-size: 48px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-left: 8px;
}

.theme-toggle:hover { border-color: var(--border-hover); color: var(--text); background: var(--nav-link-hover); }

/* Theme icon visibility */
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: inline; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: inline; }
