/* =====================================================
   TRENDPULSE — Global Design System
   World Culture · Youth · Diversity · Trends
   ===================================================== */

/* ===== 1. CUSTOM PROPERTIES ===== */
:root {
  --primary:       #FF2D78;
  --primary-dark:  #C41F5A;
  --primary-light: rgba(255,45,120,0.1);
  --secondary:     #0066FF;
  --secondary-light: rgba(0,102,255,0.1);
  --accent1:       #FFB800;
  --accent1-light: rgba(255,184,0,0.1);
  --accent2:       #7C3AFF;
  --accent2-light: rgba(124,58,255,0.1);
  --accent3:       #00C853;
  --accent3-light: rgba(0,200,83,0.1);
  --accent4:       #FF6B35;
  --cyan:          #00D4FF;
  --dark:          #0D0D1A;
  --dark2:         #161625;
  --text:          #1A1A2E;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;
  --bg:            #F8FAFC;
  --bg2:           #F0F2F7;
  --bg3:           #E8ECF3;
  --white:         #FFFFFF;
  --border:        #E2E8F0;
  --border-dark:   #CBD5E1;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.06);
  --shadow:        0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.14);
  --shadow-xl:     0 24px 64px rgba(0,0,0,0.2);
  --radius-xs:     4px;
  --radius-sm:     8px;
  --radius:        16px;
  --radius-lg:     24px;
  --radius-xl:     32px;
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Outfit', sans-serif;
  --font-number:   'Bebas Neue', cursive;
  --font-label:    'Barlow Condensed', sans-serif;
  --transition:    all 0.25s cubic-bezier(0.2, 0, 0, 1);
  --transition-slow: all 0.5s cubic-bezier(0.2, 0, 0, 1);
}

/* ===== 2. RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

/* ===== 3. TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
}

/* ===== 4. LAYOUT UTILITIES ===== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1440px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.hidden { display: none !important; }

/* ===== 5. AD SLOTS ===== */
.ad-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  width: 100%;
}
.ad-label {
  font-size: 9px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
  font-family: var(--font-label);
  font-weight: 500;
}
.ad-slot {
  background: linear-gradient(145deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 10px;
  font-family: var(--font-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}
.ad-leaderboard .ad-slot  { width: min(728px, 100%); height: 90px; }
.ad-leaderboard-sm .ad-slot { width: min(728px, 100%); height: 90px; }
.ad-rectangle .ad-slot   { width: 300px; height: 250px; }
.ad-mobile .ad-slot      { width: min(320px, 100%); height: 50px; }
.ad-in-content .ad-slot  { width: 100%; height: 100px; }

/* ===== 6. NAVIGATION ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 32px;
  flex-shrink: 0;
}
.nav-logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.nav-logo-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--dark);
  letter-spacing: -0.5px;
}
.nav-logo-wordmark span { color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-links a:hover { background: var(--bg2); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-live {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,45,120,0.08);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.nav-live-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.8)} }
.nav-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

/* ===== 7. HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 10% 50%, rgba(255,45,120,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 10%, rgba(0,102,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 70% 90%, rgba(124,58,255,0.07) 0%, transparent 60%);
  animation: hero-grad 10s ease-in-out infinite alternate;
}
@keyframes hero-grad {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
.hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
}
.hero-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  width: 100%;
  gap: 64px;
}
.hero-left {}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,45,120,0.08);
  border: 1px solid rgba(255,45,120,0.18);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-label);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fade-up 0.8s 0.05s both;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 82px);
  font-weight: 800;
  line-height: 1.06;
  color: var(--dark);
  margin-bottom: 24px;
  letter-spacing: -2px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word {
  display: inline-block;
  animation: slide-word 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-title .word:nth-child(1) { animation-delay: 0.1s; }
.hero-title .word:nth-child(2) { animation-delay: 0.2s; }
.hero-title .word:nth-child(3) { animation-delay: 0.3s; }
.hero-title .word:nth-child(4) { animation-delay: 0.4s; }
@keyframes slide-word {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.hero-title .glow-word {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 40%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 300%;
  animation: slide-word 0.9s 0.2s cubic-bezier(0.16,1,0.3,1) both,
             grad-shift 4s 1.1s ease-in-out infinite;
}
@keyframes grad-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.75;
  animation: fade-up 1s 0.6s both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fade-up 1s 0.8s both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); border: 2px solid transparent; padding: 13px 26px; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; box-shadow: 0 4px 20px rgba(255,45,120,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,45,120,0.5); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-dark); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn svg { flex-shrink: 0; }

/* Globe container */
.hero-right { display: flex; align-items: center; justify-content: center; animation: fade-up 1.1s 0.2s both; }
.globe-wrap { position: relative; width: 460px; height: 460px; }
.globe-svg-elem { width: 100%; height: 100%; }
.globe-dot-pulse { animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 0%,100%{r:5;opacity:0.9} 50%{r:7;opacity:1} }
.globe-dot-pulse-2 { animation: dot-pulse 2s 0.7s ease-in-out infinite; }
.globe-dot-pulse-3 { animation: dot-pulse 2s 1.4s ease-in-out infinite; }
.globe-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  border: 1.5px solid rgba(255,45,120,0.25);
  animation: expand-ring 4s ease-out infinite;
}
.globe-ring:nth-child(2) { animation-delay: 1.3s; }
.globe-ring:nth-child(3) { animation-delay: 2.6s; }
@keyframes expand-ring {
  0%   { width: 120px; height: 120px; opacity: 0.8; }
  100% { width: 460px; height: 460px; opacity: 0; }
}
.globe-orbit {
  position: absolute;
  inset: 0;
  animation: globe-spin 18s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes globe-spin { to { transform: rotate(360deg); } }
.globe-orbit-rev { animation: globe-spin-rev 25s linear infinite; }
@keyframes globe-spin-rev { to { transform: rotate(-360deg); } }

/* ===== 8. TICKER ===== */
.ticker-bar {
  position: relative;
  z-index: 2;
  background: var(--dark);
  height: 44px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.ticker-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: white;
  padding: 0 20px;
  font-family: var(--font-label);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.ticker-badge::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0; bottom: 0;
  width: 20px;
  background: var(--primary);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}
.ticker-badge-dot { width: 5px; height: 5px; background: rgba(255,255,255,0.7); border-radius: 50%; animation: blink 1.5s infinite; }
.ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent 0, black 60px, black calc(100% - 60px), transparent 100%); }
.ticker-list {
  display: flex;
  align-items: center;
  white-space: nowrap;
  height: 44px;
  animation: ticker-move 50s linear infinite;
}
.ticker-list:hover { animation-play-state: paused; }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.2s;
}
.ticker-item:hover { background: rgba(255,255,255,0.05); }
.ticker-num {
  font-family: var(--font-number);
  font-size: 16px;
  color: var(--accent1);
  flex-shrink: 0;
}
.ticker-flag { flex-shrink: 0; line-height: 1; }
.ticker-flag .fi { width: 18px; height: 18px; border-radius: 2px; display: inline-block; }
.ticker-text { font-size: 12.5px; font-family: var(--font-display); font-weight: 500; color: rgba(255,255,255,0.8); text-transform: capitalize; }
.ticker-sep { color: rgba(255,255,255,0.15); margin: 0 4px; }

/* ===== 9. STATS BAR ===== */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 36px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-number);
  font-size: 38px;
  line-height: 1;
  color: var(--primary);
  letter-spacing: 1px;
}
.stat-num.blue   { color: var(--secondary); }
.stat-num.purple { color: var(--accent2); }
.stat-num.gold   { color: var(--accent1); }
.stat-lbl {
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* ===== 10. SECTION LAYOUT ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--dark); }
.section-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-hd-left {}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tag-pink    { background: var(--primary-light);  color: var(--primary);  border: 1px solid rgba(255,45,120,0.2); }
.tag-blue    { background: var(--secondary-light); color: var(--secondary); border: 1px solid rgba(0,102,255,0.2); }
.tag-purple  { background: var(--accent2-light);  color: var(--accent2);  border: 1px solid rgba(124,58,255,0.2); }
.tag-gold    { background: var(--accent1-light);  color: #966D00;         border: 1px solid rgba(255,184,0,0.3); }
.tag-green   { background: var(--accent3-light);  color: #007A32;         border: 1px solid rgba(0,200,83,0.2); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.8px;
}
.section-title-white { color: white; }
.section-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  max-width: 480px;
}
.section-sub-white { color: rgba(255,255,255,0.55); }
.see-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid var(--border-dark);
  background: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}
.see-all-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ===== 11. REGION TABS ===== */
.region-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.region-tab {
  padding: 8px 18px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.region-tab:hover { border-color: var(--primary); color: var(--primary); }
.region-tab.active { background: var(--primary); border-color: var(--primary); color: white; }
.region-tab .region-count {
  background: rgba(255,255,255,0.3);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}
.region-tab:not(.active) .region-count { background: var(--bg2); color: var(--text-muted); }

/* ===== 12. COUNTRY GRID ===== */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.country-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.country-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  opacity: 0;
  transition: opacity 0.2s;
}
.country-card:hover { border-color: rgba(255,45,120,0.18); transform: translateY(-4px); box-shadow: var(--shadow); }
.country-card:hover::after { opacity: 1; }
.cc-head { display: flex; align-items: center; gap: 12px; }
.cc-flag {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  border: 2px solid var(--border);
  background: var(--bg2);
}
.cc-flag .fi.fis {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background-size: cover !important;
}
.cc-flag.world-flag {
  background: linear-gradient(135deg, #0d0d1a 0%, #0066ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-info {}
.cc-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--dark);
  line-height: 1.3;
}
.cc-meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-label); margin-top: 2px; }
.cc-trend-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.cc-trend-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  text-transform: capitalize;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-traffic {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,200,83,0.08);
  color: #007A32;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== 13. TREND CARDS ===== */
.trends-wrap {
  display: grid;
  grid-template-columns: 1fr 312px;
  gap: 32px;
  align-items: start;
}
.trends-list { display: flex; flex-direction: column; gap: 10px; }
.trend-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1.5px solid var(--border);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.trend-card:hover { border-color: rgba(255,45,120,0.22); box-shadow: var(--shadow); transform: translateX(5px); }
.trend-rank {
  font-family: var(--font-number);
  font-size: 52px;
  line-height: 1;
  color: var(--bg3);
  flex-shrink: 0;
  width: 58px;
  text-align: right;
  transition: color 0.2s;
}
.trend-card:hover .trend-rank { color: var(--bg2); }
.trend-rank.is-top { color: rgba(255,184,0,0.25); }
.trend-card:hover .trend-rank.is-top { color: rgba(255,184,0,0.45); }
.trend-body { flex: 1; min-width: 0; }
.trend-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 8px;
  text-transform: capitalize;
  line-height: 1.3;
  transition: color 0.15s;
}
.trend-title:hover { color: var(--primary) !important; }
.trend-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.trend-traffic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0,200,83,0.09);
  color: #007A32;
}
.trend-date { font-size: 11px; color: var(--text-light); font-family: var(--font-label); }
.trend-news {}
.trend-news-item {
  display: flex;
  gap: 8px;
  padding: 5px 6px;
  border-top: 1px solid var(--bg2);
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  cursor: pointer;
}
.trend-news-item:first-child { border-top: none; }
.trend-news-item:hover { background: var(--bg2); }
.trend-news-item:hover .trend-news-title { color: var(--secondary); }
.trend-news-bullet { width: 5px; height: 5px; background: var(--primary); border-radius: 50%; flex-shrink: 0; margin-top: 5px; transition: background 0.15s; }
.trend-news-item:hover .trend-news-bullet { background: var(--secondary); }
.trend-news-info {}
.trend-news-title {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.trend-news-src { font-size: 10px; color: var(--secondary); font-weight: 700; font-family: var(--font-label); margin-top: 2px; }
.trend-thumb-link { display: block; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.trend-thumb-link:hover .trend-thumb { opacity: 0.85; transform: scale(1.03); }
.trend-thumb { transition: opacity 0.2s, transform 0.2s; }
.trend-thumb {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg2);
}
.trend-thumb-placeholder {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

/* Country selector */
.selector-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.selector-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}
.selector-select {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.selector-select:focus, .selector-select:hover { border-color: var(--primary); }

/* ===== 14. SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.sidebar-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}
.sidebar-item:hover { background: var(--bg2); }
.sidebar-item-num {
  font-family: var(--font-number);
  font-size: 20px;
  color: var(--text-light);
  min-width: 24px;
  text-align: center;
}
.sidebar-item-text { font-family: var(--font-display); font-weight: 600; font-size: 12px; text-transform: capitalize; color: var(--text); }

/* ===== 15. YEAR IN REVIEW ===== */
.year-bar {
  background: var(--dark2);
  padding: 60px 24px;
}
.year-inner { max-width: 1280px; margin: 0 auto; }
.year-timeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.year-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.year-btn:hover { border-color: var(--accent2); color: var(--accent2); background: rgba(124,58,255,0.1); }
.year-btn.active { background: var(--accent2); border-color: var(--accent2); color: white; }
.category-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.cat-tab:hover { border-color: var(--cyan); color: var(--cyan); }
.cat-tab.active { background: rgba(0,212,255,0.12); border-color: var(--cyan); color: var(--cyan); }
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.year-item {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.year-item:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.year-item-rank {
  font-family: var(--font-number);
  font-size: 28px;
  color: rgba(255,255,255,0.2);
  line-height: 1;
  flex-shrink: 0;
  min-width: 32px;
}
.year-item-name { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: rgba(255,255,255,0.85); line-height: 1.35; }
.year-loading { text-align: center; color: rgba(255,255,255,0.4); padding: 40px; font-family: var(--font-display); }

/* ===== 16. DAILY LIFECYCLE ===== */
.snapshot-list { display: flex; flex-direction: column; gap: 20px; }
.snapshot-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.snapshot-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.snapshot-time {
  font-family: var(--font-number);
  font-size: 28px;
  color: var(--primary);
}
.snapshot-count {
  font-family: var(--font-label);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.snapshot-trends {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.snapshot-trend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.snapshot-trend:hover { background: var(--bg2); }
.st-rank {
  font-family: var(--font-number);
  font-size: 20px;
  color: var(--text-light);
  min-width: 26px;
}
.st-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text);
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-traffic { font-size: 10px; font-family: var(--font-label); color: var(--text-light); }

/* ===== 17. COUNTRY PAGE ===== */
.country-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}
.country-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.country-hero-flag {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 3px solid var(--border);
}
.country-hero-flag .fi.fis { width: 80px !important; height: 80px !important; border-radius: 50% !important; }
.country-hero-info {}
.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.country-hero-name {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -1px;
}
.country-hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-label);
}
.country-hero-actions { margin-left: auto; display: flex; gap: 10px; }

/* ===== 18. FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.55);
  padding: 64px 24px 28px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 52px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-text { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: white; }
.footer-logo-text span { color: var(--primary); }
.footer-desc { font-size: 13.5px; line-height: 1.75; max-width: 300px; }
.footer-col-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a { font-size: 13.5px; color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-col-links a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,0.3); transition: color 0.2s; }
.footer-legal a:hover { color: rgba(255,255,255,0.7); }
.footer-labels {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.footer-virtues {
  position: absolute;
  bottom: 12px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-virtues-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}
.footer-label-img {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0.9;
  flex: 0 0 auto;
}
.footer-ad-info { font-size: 11px; color: rgba(255,255,255,0.2); margin-top: 6px; }

/* ===== 19. SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* ===== 20. LOADING ===== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px;
  gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-family: var(--font-display); font-size: 14px; color: var(--text-muted); }

/* ===== 21. RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero-body { grid-template-columns: 1fr; padding: 60px 24px 40px; }
  .hero-right { display: none; }
  .trends-wrap { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-live { display: none; }
  .nav-menu-btn { display: flex; }
  .hero-body { padding: 48px 16px 32px; }
  .stats-inner { gap: 0; }
  .stat-item { padding: 0 20px; }
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 48px 0; }
  .ad-leaderboard .ad-slot { height: 50px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 38px; letter-spacing: -1px; }
  .stat-item { padding: 0 12px; }
  .country-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .year-grid { grid-template-columns: 1fr 1fr; }
  .trends-wrap { gap: 20px; }
}

/* ===== 22. MISC / UTILITIES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 800; font-family: var(--font-label);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-fire { background: rgba(255,107,53,0.12); color: #C44A1A; }
.badge-up   { background: rgba(0,200,83,0.1); color: #007A32; }
.badge-hot  { background: rgba(255,45,120,0.1); color: var(--primary); }
.capitalize { text-transform: capitalize; }
.truncate-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.truncate-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 15px;
}
hr.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ===== SOCIAL SHARE BAR ===== */
.trend-share-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--bg2);
  flex-wrap: wrap;
}
.share-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  margin-right: 2px;
  flex-shrink: 0;
}
.share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
  position: relative;
}
.share-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}
.share-btn:hover {
  background: var(--brand, var(--primary));
  color: #fff;
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand, var(--primary)) 40%, transparent);
}
.share-btn:active {
  transform: translateY(0) scale(0.96);
}
/* Tooltip on hover */
.share-btn::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: var(--dark);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}
.share-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ===== SHARE TOAST ===== */
.share-toast {
  position: absolute;
  z-index: 9999;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 24px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(6px);
}
.share-toast-in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.share-toast-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== 23. MAP PAGE ===== */

/* Hero */
.map-hero {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.map-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 90% at 0% 50%, rgba(255,45,120,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 45% 65% at 100% 15%, rgba(0,102,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 35% 55% at 65% 85%, rgba(124,58,255,0.09) 0%, transparent 60%);
  pointer-events: none;
}
.map-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.map-hero-text { flex: 1; min-width: 260px; }
.map-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,45,120,0.12);
  border: 1px solid rgba(255,45,120,0.25);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-label);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.map-hero-eyebrow-dot {
  width: 5px; height: 5px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 1.5s infinite;
  flex-shrink: 0;
}
.map-hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 800;
  color: white;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.map-hero-title-accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.map-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.48);
  line-height: 1.72;
  max-width: 440px;
}
.map-hero-sub strong { color: rgba(255,255,255,0.78); font-weight: 600; }
.map-hero-stats {
  display: flex;
  gap: 40px;
  flex-shrink: 0;
}
.map-stat { text-align: center; }
.map-stat-num {
  font-family: var(--font-number);
  font-size: 38px;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
}
.map-stat-lbl {
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  margin-top: 5px;
}

/* Map section */
.map-section {
  background: #0D0E1F;
}
.map-outer-layout {
  display: flex;
  align-items: stretch;
  /* Fixed height prevents the frame from expanding when panel content loads */
  height: 680px;
  overflow: hidden;
}

/* Left: map area */
.map-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 14px;
  overflow: hidden;
}
.map-svg-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: #06101E;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 2px 32px rgba(0,0,0,0.5);
  min-height: 320px;
}
#world-map-svg {
  width: 100%;
  height: auto;
  display: block;
  cursor: default;
}

/* D3 map element styles */
.map-ocean         { fill: #06101E; }
.map-graticule     { fill: none; stroke: rgba(255,255,255,0.04); stroke-width: 0.5; }
.map-borders       { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 0.4; }
.map-sphere-border { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 1; }

.country-path      { transition: fill 0.18s ease; }
.country-unavailable { fill: #1B1D34; }
.country-available   { fill: rgba(255,45,120,0.26); cursor: pointer; }
.country-available:hover,
.country-available.hovered { fill: rgba(255,45,120,0.55); }
.country-available.selected {
  fill: var(--primary);
  filter: drop-shadow(0 0 8px rgba(255,45,120,0.55));
}

/* Pin markers for tiny territories */
.country-pin {
  fill: rgba(255,45,120,0.5);
  stroke: rgba(255,255,255,0.4);
  stroke-width: 0.8;
  cursor: pointer;
  transition: fill 0.18s ease;
}
.country-pin:hover,
.country-pin.hovered { fill: rgba(255,45,120,0.85); }
.country-pin.selected {
  fill: var(--primary);
  filter: drop-shadow(0 0 5px rgba(255,45,120,0.7));
}

/* Floating tooltip */
#map-tooltip {
  position: absolute;
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(10,10,26,0.96);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  pointer-events: none;
  white-space: nowrap;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Map loading overlay */
.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #06101E;
  z-index: 20;
}
.map-loading .loading-text { color: rgba(255,255,255,0.38); }

/* Dark-context spinner */
.map-spinner {
  border-color: rgba(255,255,255,0.1) !important;
  border-top-color: var(--primary) !important;
}

/* Legend */
.map-legend {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.32);
}
.map-legend-selected { display: none; }
.map-legend-swatch {
  width: 22px; height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.swatch-available  { background: rgba(255,45,120,0.45); border: 1px solid rgba(255,45,120,0.6); }
.swatch-unavailable{ background: #1B1D34;              border: 1px solid rgba(255,255,255,0.12); }
.swatch-selected   { background: var(--primary);       border: 1px solid rgba(255,45,120,0.8);  }

/* Right: Trends panel */
.map-panel {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0D0D1A;
  border-left: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  /* Ensure it fills the fixed-height outer layout */
  height: 100%;
}

/* Placeholder */
.map-panel-placeholder {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  gap: 14px;
  overflow-y: auto;
}
.map-panel-placeholder-icon {
  width: 80px; height: 80px;
  background: rgba(255,45,120,0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 1px solid rgba(255,45,120,0.15);
}
.map-panel-placeholder-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.map-panel-placeholder-text {
  font-size: 13.5px;
  color: rgba(255,255,255,0.36);
  line-height: 1.65;
  max-width: 270px;
}
.map-panel-placeholder-text strong { color: rgba(255,255,255,0.65); font-weight: 600; }
.map-panel-placeholder-suggestions { width: 100%; margin-top: 6px; }
.map-placeholder-label {
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
  display: block;
  margin-bottom: 10px;
}
.map-placeholder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.map-chip:hover {
  background: rgba(255,45,120,0.12);
  border-color: rgba(255,45,120,0.3);
  color: rgba(255,255,255,0.85);
}
.map-chip-flag {
  width: 16px !important;
  height: 16px !important;
  border-radius: 2px !important;
  display: inline-block !important;
  flex-shrink: 0;
}

/* Content area — JS switches this from display:none to display:flex */
.map-panel-content {
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  display: none;
  /* When flex: height fills the panel so the trends area can scroll */
  height: 100%;
}

/* Panel header */
.map-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.map-panel-flag { flex-shrink: 0; }
.map-panel-country-info { flex: 1; min-width: 0; }
.map-panel-region {
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 3px;
  font-weight: 700;
}
.map-panel-country-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-panel-full-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: rgba(255,45,120,0.1);
  color: var(--primary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.18s, transform 0.18s;
  border: 1px solid rgba(255,45,120,0.2);
}
.map-panel-full-link:hover {
  background: rgba(255,45,120,0.22);
  transform: translateX(2px);
}

/* Panel meta bar */
.map-panel-meta {
  display: none; /* shown via JS */
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-label);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.28);
  flex-shrink: 0;
}
.map-panel-live-dot {
  width: 5px; height: 5px;
  background: var(--accent3);
  border-radius: 50%;
  animation: blink 1.5s infinite;
  flex-shrink: 0;
}
.map-panel-view-all {
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
  font-size: 10px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.map-panel-view-all:hover { opacity: 0.75; text-decoration: underline; }

/* Panel loading state */
.map-panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 20px;
}
.map-panel-loading .loading-text {
  color: rgba(255,255,255,0.35);
  text-align: center;
}
.map-panel-loading .loading-text strong { color: rgba(255,255,255,0.6); }

/* Scrollable trends list */
.map-panel-trends {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.map-panel-trends::-webkit-scrollbar { width: 4px; }
.map-panel-trends::-webkit-scrollbar-track  { background: transparent; }
.map-panel-trends::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Individual trend item */
.map-trend-item {
  display: flex;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.map-trend-item:last-child { border-bottom: none; }
.map-trend-item:hover { background: rgba(255,255,255,0.03); }

.map-trend-rank {
  font-family: var(--font-number);
  font-size: 24px;
  color: rgba(255,255,255,0.18);
  min-width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.15;
  padding-top: 1px;
}
.map-trend-body { flex: 1; min-width: 0; }
.map-trend-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.38;
  display: block;
  margin-bottom: 5px;
  text-decoration: none;
  transition: color 0.15s;
  text-transform: capitalize;
}
.map-trend-title:hover { color: var(--primary); }
.map-trend-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-label);
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}
.map-trend-meta svg { opacity: 0.5; color: var(--primary); }

/* News links inside trend item */
.map-trend-news { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.map-news-link {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.52);
  text-decoration: none;
  padding: 3px 4px 3px 0;
  border-radius: 4px;
  transition: color 0.14s, background 0.14s;
  line-height: 1.45;
  cursor: pointer;
}
.map-news-link.has-url:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.05);
}
.map-news-link.has-url:hover .map-news-title {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.35);
  text-underline-offset: 2px;
}
.map-news-bullet {
  width: 4px; height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 5px;
}
.map-news-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.map-news-src {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

/* Responsive */
@media (max-width: 960px) {
  .map-outer-layout {
    flex-direction: column;
    height: auto;       /* remove fixed height when stacked */
    overflow: visible;
  }
  .map-left {
    border-right: none;
    padding: 16px 16px 12px;
    overflow: visible;
    height: auto;
  }
  .map-svg-container { min-height: 240px; flex: none; }
  .map-panel {
    width: 100%;
    height: auto;
    min-height: 400px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .map-panel-content  { height: auto; }
  .map-panel-trends   { max-height: 480px; }  /* scroll within bounded box on mobile */
}
@media (max-width: 640px) {
  .map-hero-inner  { flex-direction: column; gap: 24px; }
  .map-hero-stats  { justify-content: center; }
  .map-panel-country-name { font-size: 17px; }
}

/* ===== 24. DARK MODE ===== */

/* ---- Variable overrides ---- */
[data-theme="dark"] {
  --bg:           #0F1724;
  --bg2:          #161E2E;
  --bg3:          #1C2740;
  --white:        #1C2740;
  --border:       #1E2D45;
  --border-dark:  #253650;
  --text:         #E2E8F2;
  --text-muted:   #8B9EC0;
  --text-light:   #5A6E90;
  --dark:         #E2E8F2;
  --dark2:        #C8D4E8;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.4);
  --shadow:       0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.6);
  --shadow-xl:    0 24px 64px rgba(0,0,0,0.7);
}

/* ---- Base ---- */
[data-theme="dark"] body    { background: var(--bg); color: var(--text); }
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 { color: var(--text); }

/* ---- Navigation ---- */
[data-theme="dark"] .site-nav {
  background: rgba(15,23,36,0.96);
  border-bottom-color: var(--border);
}
[data-theme="dark"] .nav-logo-wordmark { color: var(--text); }
[data-theme="dark"] .nav-links a { color: var(--text-muted); }
[data-theme="dark"] .nav-links a:hover { background: var(--bg2); color: var(--text); }
[data-theme="dark"] .nav-links a.active { color: var(--primary); background: var(--primary-light); }

/* Mobile nav */
[data-theme="dark"] .nav-links[style*="flex"] {
  background: var(--bg2) !important;
  border-bottom-color: var(--border) !important;
}

/* ---- Theme toggle button ---- */
.nav-theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  background: transparent;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-theme-btn:hover {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border-dark);
}
[data-theme="dark"] .nav-theme-btn {
  color: var(--text-muted);
  border-color: var(--border);
}
[data-theme="dark"] .nav-theme-btn:hover {
  background: var(--bg3);
  color: var(--text);
}

/* ---- "Near you" banner ---- */
.near-you-banner {
  background: var(--secondary-light);
  border-bottom: 1px solid rgba(0,102,255,0.15);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--secondary);
}
.near-you-banner .near-you-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  transition: var(--transition);
}
.near-you-banner .near-you-dismiss:hover { color: var(--text); }
[data-theme="dark"] .near-you-banner {
  background: rgba(0,102,255,0.08);
  border-bottom-color: rgba(0,102,255,0.12);
}

/* ---- Hero ---- */
[data-theme="dark"] .hero { background: var(--bg); }
[data-theme="dark"] .hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,45,120,0.12) 0%, transparent 70%);
}
[data-theme="dark"] .hero-mesh { opacity: 0.06; }
[data-theme="dark"] .hero-eyebrow { background: rgba(255,45,120,0.1); color: var(--primary); }
[data-theme="dark"] .hero-title { color: var(--text); }
[data-theme="dark"] .hero-sub { color: var(--text-muted); }

/* ---- Sections ---- */
[data-theme="dark"] .section      { background: var(--bg); }
[data-theme="dark"] .section-alt  { background: var(--bg2); }
[data-theme="dark"] .section-title { color: var(--text); }
[data-theme="dark"] .section-sub   { color: var(--text-muted); }

/* ---- Stats bar ---- */
[data-theme="dark"] .stats-bar { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .stat-val  { color: var(--text); }
[data-theme="dark"] .stat-lbl  { color: var(--text-muted); }

/* ---- Country cards ---- */
[data-theme="dark"] .country-card {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .country-card:hover {
  background: var(--bg3);
  border-color: var(--border-dark);
}
[data-theme="dark"] .cc-name  { color: var(--text); }
[data-theme="dark"] .cc-meta  { color: var(--text-muted); }
[data-theme="dark"] .cc-trend-title { color: var(--text); }
[data-theme="dark"] .cc-traffic     { color: var(--text-muted); }
[data-theme="dark"] .near-you-highlight { border-color: var(--secondary) !important; background: rgba(0,102,255,0.08) !important; }

/* ---- Trend cards ---- */
[data-theme="dark"] .trend-card {
  background: var(--bg2);
  border-color: var(--border);
}
[data-theme="dark"] .trend-card:hover { background: var(--bg3); }
[data-theme="dark"] .trend-title      { color: var(--text) !important; }
[data-theme="dark"] .trend-traffic-badge { background: var(--bg3); color: var(--text-muted); }
[data-theme="dark"] .trend-date       { color: var(--text-light); }
[data-theme="dark"] .trend-news-item  { background: var(--bg3); }
[data-theme="dark"] .trend-news-item:hover { background: var(--bg); border-color: var(--border-dark); }
[data-theme="dark"] .trend-news-title { color: var(--text); }
[data-theme="dark"] .trend-news-src   { color: var(--text-muted); }
[data-theme="dark"] .trend-thumb-placeholder { background: var(--bg3); color: var(--text-light); }
[data-theme="dark"] .share-bar { border-top-color: var(--border); }
[data-theme="dark"] .share-btn { background: var(--bg3); color: var(--text-muted); }
[data-theme="dark"] .share-btn:hover { background: var(--bg2); color: var(--text); }

/* ---- Snapshot cards ---- */
[data-theme="dark"] .snapshot-card { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .snapshot-hd   { border-bottom-color: var(--border); }
[data-theme="dark"] .snapshot-time { color: var(--text); }
[data-theme="dark"] .snapshot-count { color: var(--text-muted); }
[data-theme="dark"] .snapshot-trend { border-bottom-color: var(--border); }
[data-theme="dark"] .st-rank        { color: var(--text-muted); }
[data-theme="dark"] .st-title       { color: var(--text); }
[data-theme="dark"] .st-traffic     { color: var(--text-muted); }

/* ---- Sidebar / Year preview cards ---- */
[data-theme="dark"] .sidebar-card { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .year-card    { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .year-item    { border-bottom-color: var(--border); }
[data-theme="dark"] .year-item-rank { color: var(--text-muted); }
[data-theme="dark"] .year-item-name { color: var(--text); }

/* ---- Region tabs ---- */
[data-theme="dark"] .region-tab {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="dark"] .region-tab:hover { background: var(--bg3); color: var(--text); }
[data-theme="dark"] .region-tab.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
[data-theme="dark"] .region-count { color: var(--text-light); }

/* ---- See-all button ---- */
[data-theme="dark"] .btn-ghost { background: var(--bg2); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .btn-ghost:hover { background: var(--bg3); border-color: var(--border-dark); }

/* ---- Select inputs ---- */
[data-theme="dark"] .selector-select,
[data-theme="dark"] select {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .selector-select:hover,
[data-theme="dark"] select:hover { border-color: var(--border-dark); }

/* ---- Country hero (country.html) ---- */
[data-theme="dark"] .country-hero { background: var(--bg2); border-bottom-color: var(--border); }
[data-theme="dark"] .country-page-title { color: var(--text); }
[data-theme="dark"] .country-page-meta  { color: var(--text-muted); }
[data-theme="dark"] .country-breadcrumb { color: var(--text-muted); }
[data-theme="dark"] .updated-badge { background: rgba(0,200,83,0.1); color: #00C853; }

/* ---- Daily hero (daily.html) ---- */
[data-theme="dark"] .daily-hero { background: var(--bg2); border-bottom-color: var(--border); }
[data-theme="dark"] .daily-page-title { color: var(--text); }
[data-theme="dark"] .daily-meta { color: var(--text-muted); }
[data-theme="dark"] .today-badge { background: rgba(0,200,83,0.1); color: #00C853; }

/* ---- Year-review page ---- */
[data-theme="dark"] .yir-hero { background: var(--bg); }
[data-theme="dark"] .yir-card { background: var(--bg2); border-color: var(--border); }

/* ---- Ad slots ---- */
[data-theme="dark"] .ad-wrap   { background: var(--bg2) !important; border-color: var(--border) !important; }
[data-theme="dark"] .ad-slot   { background: linear-gradient(145deg, var(--bg2) 0%, var(--bg3) 100%); border-color: var(--border-dark); color: var(--text-light); }
[data-theme="dark"] .ad-label  { color: var(--text-light); }

/* ---- Loading states ---- */
[data-theme="dark"] .loading-state { color: var(--text-muted); }
[data-theme="dark"] .no-results    { color: var(--text-muted); }
[data-theme="dark"] .spinner { border-color: var(--border); border-top-color: var(--primary); }

/* ---- Footer ---- */
[data-theme="dark"] .site-footer { background: #080E1A; border-top-color: var(--border); }
[data-theme="dark"] .footer-logo-text  { color: var(--text); }
[data-theme="dark"] .footer-desc       { color: var(--text-muted); }
[data-theme="dark"] .footer-col-title  { color: var(--text); }
[data-theme="dark"] .footer-col-links a { color: var(--text-muted); }
[data-theme="dark"] .footer-col-links a:hover { color: var(--primary); }
[data-theme="dark"] .footer-copy   { color: var(--text-light); }
[data-theme="dark"] .footer-legal a { color: var(--text-light); }
[data-theme="dark"] .footer-legal a:hover { color: var(--text); }
[data-theme="dark"] .footer-labels { border-top-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .footer-label-img { opacity: 0.95; }

/* ---- Ticker ---- */
[data-theme="dark"] .ticker-wrap { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .ticker-item { color: var(--text-muted); }
[data-theme="dark"] .ticker-item:hover { background: var(--bg3); color: var(--text); }
[data-theme="dark"] .ticker-num  { color: var(--text-light); }

/* ---- Trending now sidebar ---- */
[data-theme="dark"] .trending-sidebar { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .trending-item    { border-bottom-color: var(--border); }
[data-theme="dark"] .trending-item:hover { background: var(--bg3); }

/* ---- Share snapshot button ---- */
[data-theme="dark"] .share-snapshot-btn { background: var(--bg2); border-color: var(--border); color: var(--text-muted); }
[data-theme="dark"] .share-snapshot-btn:hover { background: var(--bg3); color: var(--text); }
