/* XTrends v3 — TrendPulse exact match */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

.xtp-root {
  --black:   #0a0a0a;
  --surface: #111111;
  --card:    #181818;
  --border:  #2a2a2a;
  --white:   #f5f5f0;
  --muted:   #888;
  --accent:  #1d9bf0;
  --hot:     #ff4545;
  --green:   #00c851;
  --gold:    #f5a623;
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* ── AD BANNER TOP ── */
.xtp-ad-banner-top {
  background: #0a150a;
  border-bottom: 1px solid #1a3a1a;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.xtp-ad-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: #4caf50;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.65;
  white-space: nowrap;
}
.xtp-ad-creative { flex: 1; max-width: 728px; }

/* ── SITE HEADER ── */
.xtp-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.xtp-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.xtp-logo span { color: var(--hot); }
.xtp-nav {
  display: flex;
  gap: 4px;
}
.xtp-nav-item {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  border: 1px solid transparent;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.xtp-nav-item:hover { color: var(--white); border-color: var(--border); }
.xtp-nav-item--active { background: var(--white); color: var(--black) !important; font-weight: 600; border-color: transparent !important; }
.xtp-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.xtp-loc-select {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}
.xtp-refresh-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.xtp-refresh-btn:hover { opacity: 0.85; }

/* ── TICKER ── */
.xtp-ticker {
  background: var(--hot);
  padding: 7px 0;
  overflow: hidden;
}
.xtp-ticker-inner {
  display: flex;
  animation: xtp-tick 32s linear infinite;
  white-space: nowrap;
}
@keyframes xtp-tick { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.xtp-ticker-item {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.xtp-tdot { opacity: 0.45; }

/* ── MAIN LAYOUT ── */
.xtp-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
}
.xtp-content {
  border-right: 1px solid var(--border);
  min-height: 500px;
}

/* ── HERO ── */
.xtp-hero {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.xtp-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.xtp-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--white);
  margin: 0;
}
.xtp-title span { color: var(--hot); }
.xtp-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,69,69,.1);
  border: 1px solid rgba(255,69,69,.3);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hot);
  letter-spacing: 1px;
}
.xtp-live-dot {
  width: 6px; height: 6px;
  background: var(--hot);
  border-radius: 50%;
  animation: xtp-pulse 1.5s infinite;
}
@keyframes xtp-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
.xtp-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.xtp-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.xtp-meta-item strong { color: var(--white); font-weight: 600; }
.xtp-meta-right { margin-left: auto; }
.xtp-source-badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  background: rgba(29,155,240,.15);
  color: var(--accent);
  border: 1px solid rgba(29,155,240,.25);
}
.xtp-source-badge:empty { display: none; }

/* ── CONTROLS ── */
.xtp-controls {
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 56px;
  z-index: 90;
}
.xtp-view-tabs {
  display: flex;
  gap: 2px;
  background: var(--card);
  padding: 3px;
  border-radius: 8px;
}
.xtp-vtab {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--muted);
  letter-spacing: .5px;
  transition: all .15s;
}
.xtp-vtab--active { background: var(--white); color: var(--black); }
.xtp-filter-pills { display: flex; gap: 6px; }
.xtp-fpill {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
}
.xtp-fpill--active { border-color: var(--accent); color: var(--accent); background: rgba(29,155,240,.08); }

/* ── SEARCHBAR ── */
.xtp-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  color: var(--muted);
}
.xtp-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.xtp-search-input::placeholder { color: var(--muted); }
.xtp-search-drop {
  display: none;
  position: absolute;
  top: 100%; left: 28px; right: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.xtp-sdrop-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--white);
  border-bottom: 1px solid var(--border);
}
.xtp-sdrop-item:last-child { border-bottom: none; }
.xtp-sdrop-item:hover { background: var(--surface); }
.xtp-sdrop-item small { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* ── LIST ── */
.xtp-list { padding: 0; }
.xtp-item {
  display: flex;
  align-items: center;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  position: relative;
  animation: xtp-fadein .3s ease both;
}
@keyframes xtp-fadein { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.xtp-item:hover { background: rgba(255,255,255,.02); }
.xtp-item--hot::before {
  content:''; position:absolute; left:0; top:0; bottom:0;
  width:3px; background:var(--hot);
}
.xtp-item:hover .xtp-actions { opacity:1; }
.xtp-rank {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  width: 28px;
  flex-shrink: 0;
}
.xtp-rank--top { color: var(--gold); font-weight: 700; font-size: 13px; }
.xtp-item-body { flex: 1; min-width: 0; }
.xtp-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.xtp-item-name a { color: inherit; text-decoration: none; }
.xtp-item-name a:hover { color: var(--accent); }
.xtp-hash { color: var(--accent) !important; }
.xtp-item-sub { font-size: 11px; color: var(--muted); }
.xtp-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.xtp-bar-fill { height:100%; border-radius:2px; background:linear-gradient(90deg,var(--accent),var(--hot)); transition:width 1s ease; }
.xtp-vol { font-family:'DM Mono',monospace; font-size:11px; color:var(--muted); text-align:right; flex-shrink:0; margin-left:12px; line-height:1.4; }
.xtp-vol-n { font-size:13px; font-weight:600; color:var(--white); display:block; }
.xtp-actions { display:flex; gap:5px; margin-left:10px; flex-shrink:0; opacity:0; transition:opacity .15s; }
.xtp-act-btn {
  width:28px; height:28px;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--card);
  color:var(--muted);
  font-size:12px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  transition:all .15s;
}
.xtp-act-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ── TAGS ── */
.xtp-tag { font-size:9px; font-weight:700; letter-spacing:1px; text-transform:uppercase; padding:2px 6px; border-radius:3px; flex-shrink:0; }
.xtp-tag--hot   { background:rgba(255,69,69,.15); color:var(--hot); border:1px solid rgba(255,69,69,.2); }
.xtp-tag--news  { background:rgba(0,200,81,.1); color:var(--green); border:1px solid rgba(0,200,81,.2); }
.xtp-tag--pol   { background:rgba(245,166,35,.1); color:var(--gold); border:1px solid rgba(245,166,35,.2); }
.xtp-tag--sport { background:rgba(29,155,240,.1); color:var(--accent); border:1px solid rgba(29,155,240,.2); }

/* ── GRID ── */
.xtp-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--border); margin:1px 0; }
.xtp-grid-item { background:var(--surface); padding:18px 20px; cursor:pointer; transition:background .15s; position:relative; text-decoration:none; display:block; }
.xtp-grid-item:hover { background:var(--card); }
.xtp-grid-rank { font-family:'DM Mono',monospace; font-size:10px; color:var(--muted); margin-bottom:8px; }
.xtp-grid-name { font-size:15px; font-weight:600; color:var(--white); margin-bottom:5px; line-height:1.3; }
.xtp-grid-vol  { font-family:'DM Mono',monospace; font-size:11px; color:var(--muted); }
.xtp-grid-fire { position:absolute; top:8px; right:10px; font-size:11px; }
.xtp-spark     { position:absolute; bottom:10px; right:10px; opacity:.3; }

/* ── PILLS ── */
.xtp-pills { padding:20px 28px; display:flex; flex-wrap:wrap; gap:8px; }
.xtp-pill {
  padding:8px 16px; border:1px solid var(--border); border-radius:30px;
  font-size:13px; font-weight:500; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px;
  color:var(--white); text-decoration:none; transition:all .2s;
}
.xtp-pill:hover { border-color:var(--accent); background:rgba(29,155,240,.08); color:var(--accent); }
.xtp-pill--hash { border-color:rgba(29,155,240,.3); color:var(--accent); }
.xtp-pill-vol { font-family:'DM Mono',monospace; font-size:10px; color:var(--muted); background:var(--card); padding:1px 6px; border-radius:10px; }

/* ── AD STRIP ── */
.xtp-ad-strip {
  padding:10px 28px; background:#0a150a;
  border-top:1px solid #1a3a1a; border-bottom:1px solid #1a3a1a;
  display:flex; align-items:center; gap:10px;
}

/* ── SIDEBAR ── */
.xtp-sidebar { padding:0; background:var(--surface); }
.xtp-sidebar-ad {
  background:#0a150a; border-bottom:1px solid #1a3a1a;
  padding:12px; display:flex; flex-direction:column; align-items:center; gap:6px;
}
.xtp-side-tabs { display:flex; border-bottom:1px solid var(--border); }
.xtp-stab {
  flex:1; padding:12px; text-align:center;
  font-size:11px; font-weight:600; letter-spacing:.5px; text-transform:uppercase;
  cursor:pointer; color:var(--muted);
  border-bottom:2px solid transparent; transition:all .15s;
}
.xtp-stab--active { color:var(--white); border-bottom-color:var(--white); }
.xtp-widget { padding:18px 16px; border-bottom:1px solid var(--border); }
.xtp-widget-head {
  font-family:'Bebas Neue',sans-serif; font-size:16px; letter-spacing:1px;
  color:var(--white); margin-bottom:12px;
  display:flex; align-items:center; justify-content:space-between;
}
.xtp-widget-live {
  font-family:'DM Mono',monospace; font-size:9px;
  background:var(--hot); color:#fff; padding:2px 7px; border-radius:3px; letter-spacing:1px;
}
.xtp-wrow { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid var(--border); cursor:pointer; }
.xtp-wrow:last-child { border-bottom:none; }
.xtp-wrow-num { font-family:'DM Mono',monospace; font-size:10px; color:var(--muted); width:16px; flex-shrink:0; }
.xtp-wrow-name {
  font-size:12px; font-weight:500; color:var(--white);
  flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  text-decoration:none; transition:color .15s;
}
.xtp-wrow-name:hover { color:var(--accent); }
.xtp-wrow-on { color:var(--accent) !important; font-weight:600; }
.xtp-wrow-vol { font-family:'DM Mono',monospace; font-size:10px; color:var(--muted); flex-shrink:0; }
.xtp-wrow-dot { font-size:10px; color:var(--accent); margin-left:auto; flex-shrink:0; }
.xtp-related-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); cursor:pointer; }
.xtp-related-item:last-child { border-bottom:none; }
.xtp-related-thumb { width:54px; height:42px; border-radius:4px; background:var(--card); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:18px; }
.xtp-related-title { font-size:11px; font-weight:500; color:var(--white); line-height:1.4; margin-bottom:3px; }
.xtp-related-meta { font-size:10px; color:var(--muted); }

/* ── LOADING / STATES ── */
.xtp-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:48px 24px; gap:12px; color:var(--muted); font-size:13px; }
.xtp-spinner { width:28px; height:28px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:xtp-spin .7s linear infinite; }
@keyframes xtp-spin { to{transform:rotate(360deg)} }
.xtp-mini-spinner { width:18px; height:18px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:xtp-spin .7s linear infinite; margin:12px auto; }
.xtp-error { padding:32px 24px; text-align:center; color:var(--hot); font-size:13px; }
.xtp-empty { padding:32px 24px; text-align:center; color:var(--muted); font-size:13px; }

/* ── FOOTER ── */
.xtp-footer { padding:10px 24px; font-size:11px; color:var(--muted); border-top:1px solid var(--border); text-align:center; background:var(--surface); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .xtp-main { grid-template-columns:1fr; }
  .xtp-sidebar { display:none; }
  .xtp-nav { display:none; }
  .xtp-grid { grid-template-columns:repeat(2,1fr); }
  .xtp-title { font-size:30px; }
}

/* ═══════════════════════════════════════════════════════════════
   XTRENDS MEGA MENU — Location Navigator
   ═══════════════════════════════════════════════════════════════ */
.xt-megamenu-wrap { position: relative; display: inline-block; font-family: 'Barlow', 'Barlow Condensed', system-ui, sans-serif; }

/* Trigger button */
.xt-mm-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 2px solid #1a1a1a; color: #1a1a1a;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 14px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.xt-mm-trigger:hover, .xt-mm-trigger.open { background: #1a1a1a; color: #fff; }
.xt-mm-trigger .xt-mm-caret { transition: transform .2s; }
.xt-mm-trigger.open .xt-mm-caret { transform: rotate(180deg); }

/* Panel */
.xt-mm-panel {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 9999;
  background: #fff; border: 2px solid #1a1a1a;
  min-width: 720px; max-width: 960px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.12);
}
.xt-mm-panel.is-open { display: block; }

/* Position right-aligned when near edge */
.xt-mm-panel.align-right { left: auto; right: 0; }

.xt-mm-inner { padding: 0; }

/* Search row */
.xt-mm-search-row {
  display: flex; align-items: center; gap: 0;
  border-bottom: 2px solid #1a1a1a; background: #f5f3ef;
}
.xt-mm-search {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
}
.xt-mm-search svg { flex-shrink: 0; color: #999; }
.xt-mm-search input {
  flex: 1; border: none; background: none; outline: none; font-size: 14px;
  color: #1a1a1a; font-family: inherit;
}
.xt-mm-search input::placeholder { color: #bbb; }
.xt-mm-close {
  border: none; background: none; border-left: 2px solid #1a1a1a;
  padding: 10px 14px; cursor: pointer; font-size: 14px; color: #666;
  transition: all .12s;
}
.xt-mm-close:hover { background: #d41f1f; color: #fff; border-left-color: #d41f1f; }

/* Countries grid */
.xt-mm-countries {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-height: 480px; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: #ccc #f5f3ef;
}
.xt-mm-countries::-webkit-scrollbar { width: 6px; }
.xt-mm-countries::-webkit-scrollbar-thumb { background: #ccc; }

/* Country card */
.xt-mm-country {
  border-right: 1px solid #e8e8e4; border-bottom: 1px solid #e8e8e4;
  transition: background .1s;
}
.xt-mm-country:nth-child(4n) { border-right: none; }
.xt-mm-country.hidden { display: none; }

.xt-mm-country-head {
  display: flex; align-items: stretch;
}
.xt-mm-country-link {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; text-decoration: none; color: #1a1a1a;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 13px; text-transform: uppercase; letter-spacing: .03em;
  transition: all .1s; min-width: 0;
}
.xt-mm-country-link:hover { background: #f5f3ef; color: #d41f1f; }
.xt-mm-country-link.is-active { color: #d41f1f; font-weight: 800; }
.xt-mm-flag { font-size: 16px; flex-shrink: 0; line-height: 1; }
.xt-mm-cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Expand button */
.xt-mm-expand {
  border: none; background: none; border-left: 1px solid #e8e8e4;
  padding: 0 9px; cursor: pointer; color: #999; flex-shrink: 0;
  transition: all .1s; display: flex; align-items: center;
}
.xt-mm-expand:hover { background: #1a1a1a; color: #fff; border-left-color: #1a1a1a; }
.xt-mm-expand.expanded svg { transform: rotate(180deg); }
.xt-mm-expand svg { transition: transform .2s; }

/* Sub panel (states + cities) */
.xt-mm-sub {
  display: none; background: #f9f8f5; border-top: 1px solid #e8e8e4;
  padding: 8px 10px 10px;
}
.xt-mm-sub.is-open { display: block; }
.xt-mm-sub-section { margin-bottom: 8px; }
.xt-mm-sub-section:last-child { margin-bottom: 0; }
.xt-mm-sub-label {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 9px; text-transform: uppercase; letter-spacing: .15em;
  color: #999; margin-bottom: 4px; padding-bottom: 3px;
  border-bottom: 1px solid #e0ddd8;
}
.xt-mm-sub-item {
  display: block; padding: 3px 4px; font-size: 12px; color: #444;
  text-decoration: none; border-radius: 0; transition: all .1s;
  font-family: 'Barlow', sans-serif; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.xt-mm-sub-item:hover { background: #e8e6e1; color: #d41f1f; padding-left: 7px; }
.xt-mm-sub-item.is-active { color: #d41f1f; font-weight: 600; }

/* No results */
.xt-mm-no-results {
  padding: 32px 20px; text-align: center;
  font-size: 14px; color: #999; grid-column: 1 / -1;
}

/* Worldwide special styling */
.xt-mm-country[data-slug="worldwide"] .xt-mm-country-link {
  background: #1a1a1a; color: #fff;
}
.xt-mm-country[data-slug="worldwide"] .xt-mm-country-link:hover {
  background: #d41f1f; color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .xt-mm-panel { min-width: calc(100vw - 2rem); }
  .xt-mm-countries { grid-template-columns: repeat(3, 1fr); }
  .xt-mm-country:nth-child(4n) { border-right: 1px solid #e8e8e4; }
  .xt-mm-country:nth-child(3n) { border-right: none; }
}
@media (max-width: 600px) {
  .xt-mm-countries { grid-template-columns: repeat(2, 1fr); max-height: 360px; }
  .xt-mm-country:nth-child(3n) { border-right: 1px solid #e8e8e4; }
  .xt-mm-country:nth-child(2n) { border-right: none; }
}
