/* ===========================
   INTERACTION PAGE
   Terminal Confessional style
   =========================== */

:root {
  --accent: #00ffcc;
  --accent2: #ff6b6b;
  --gold: #f0c040;
  --purple: #c77dff;
  --bg: #0a0b0d;
  --surface: #111316;
  --surface2: #1a1d22;
  --border: #2a2d35;
  --text: #e8eaf0;
  --text-muted: #8891a5;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;
}

body.dark { background: var(--bg); color: var(--text); }
body:not(.dark) {
  --bg: #f5f6fa; --surface: #ffffff; --surface2: #f0f1f5;
  --border: #d0d3df; --text: #1a1d22; --text-muted: #6b7180;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); line-height: 1.6; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* NAV overrides */
.nav-link-active2 {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 6px;
  font-weight: 600;
}
.nav-link-special-green {
  color: #00ffcc !important;
  border: 1px solid rgba(0,255,204,0.3);
  padding: 5px 12px !important;
  border-radius: 6px;
}

/* TICKER */
.ticker-bar {
  background: #0d1117; border-bottom: 1px solid var(--border);
  padding: 10px 20px; display: flex; gap: 16px; align-items: center; overflow: hidden;
}
.ticker-label { color: var(--gold); font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.ticker-track { display: flex; animation: ticker-scroll 70s linear infinite; white-space: nowrap; }
.ticker-track span { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* HERO */
.ix-hero { padding: 80px 24px 60px; max-width: 1280px; margin: 0 auto; }
.ix-hero-tag { font-family: var(--font-mono); color: var(--purple); font-size: 0.85rem; margin-bottom: 20px; opacity: 0.8; }
.ix-hero-title { font-family: var(--font-mono); font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 700; line-height: 1.1; color: var(--text); margin-bottom: 20px; }
.ix-hero-title .accent { color: var(--accent); }
.ix-hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 680px; line-height: 1.7; }

/* SECTION HEADERS */
.ix-section-header { text-align: center; margin-bottom: 40px; }
.ix-section-header h2 { font-family: var(--font-mono); font-size: 1.5rem; color: var(--text); margin-bottom: 8px; }
.section-sub { color: var(--text-muted); font-size: 0.875rem; }

/* COUNTRY TABS */
.ix-country-section { padding: 60px 0; }
.ix-country-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px;
}
.ix-ctab {
  padding: 10px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-family: var(--font-body); font-size: 0.9rem;
  color: var(--text-muted); transition: all 0.2s ease;
}
.ix-ctab:hover { border-color: var(--purple); color: var(--text); }
.ix-ctab.active { background: rgba(199,125,255,0.1); border-color: var(--purple); color: var(--purple); font-weight: 600; }

/* COUNTRY PANELS */
.ix-cpanel { display: none; animation: panelIn 0.3s ease; }
.ix-cpanel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.ix-cpanel-header {
  display: flex; align-items: center; gap: 20px; padding: 24px 28px;
  border-radius: 14px; margin-bottom: 28px; border: 1px solid var(--border);
  flex-wrap: wrap;
}
.us-h { background: rgba(0,100,255,0.07); border-left: 4px solid #4a90d9; }
.pt-h { background: rgba(0,160,100,0.07); border-left: 4px solid #3da975; }
.cr-h { background: rgba(0,180,180,0.07); border-left: 4px solid #00b4b4; }
.ng-h { background: rgba(0,200,60,0.07); border-left: 4px solid #21bf73; }
.sg-h { background: rgba(232,131,42,0.07); border-left: 4px solid #e8832a; }
.tr-h { background: rgba(220,60,30,0.07); border-left: 4px solid #e04020; }
.ae-h { background: rgba(197,160,40,0.07); border-left: 4px solid #c5a028; }
.ix-cp-flag { font-size: 2.5rem; flex-shrink: 0; }
.ix-cpanel-header h3 { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text); margin-bottom: 4px; }
.ix-cpanel-header p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

.ix-readiness-meter {
  margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0;
}
.ix-readiness-label { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; }
.ix-meter-bar { width: 140px; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.ix-meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 3px; }
.ix-readiness-val { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--accent); }

/* INTERACTION GRID */
.ix-interaction-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px;
}
.ix-int-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; transition: transform 0.2s ease;
}
.ix-int-card:hover { transform: translateY(-3px); }
.ix-int-icon { font-size: 1.5rem; margin-bottom: 10px; }
.ix-int-card h4 { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text); margin-bottom: 10px; }
.ix-int-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }

/* EXAMPLE CHAT */
.ix-example-chat { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.msg { padding: 10px 14px; border-radius: 12px; font-size: 0.8rem; line-height: 1.5; max-width: 90%; }
.avatar-msg {
  background: rgba(0,255,204,0.08); border: 1px solid rgba(0,255,204,0.2);
  color: var(--text); border-radius: 12px 12px 12px 2px; font-family: var(--font-mono);
}
.user-msg {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 12px 12px 2px 12px;
  margin-left: auto;
}

/* TECH INTERFACE LIST */
.ix-int-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ix-int-list li { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.tag {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 0.65rem; font-family: var(--font-mono); font-weight: 700; flex-shrink: 0;
}
.tag.good { background: rgba(0,255,204,0.12); color: var(--accent); border: 1px solid rgba(0,255,204,0.25); }
.tag.warn { background: rgba(240,192,64,0.12); color: var(--gold); border: 1px solid rgba(240,192,64,0.25); }
.tag.future { background: rgba(199,125,255,0.12); color: var(--purple); border: 1px solid rgba(199,125,255,0.25); }

/* GAP CARD */
.ix-gap-card { border-color: rgba(255,107,107,0.3); }
.gap-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 0.8rem; }
.gap-status { font-size: 0.7rem; margin-top: 2px; flex-shrink: 0; }
.gap-item.closed .gap-status { color: var(--accent); }
.gap-item.medium .gap-status { color: var(--gold); }
.gap-item.open .gap-status { color: var(--accent2); }
.gap-item span:last-child { color: var(--text-muted); line-height: 1.4; }
.gap-item strong { color: var(--text); }

/* OPP CARD */
.ix-opp-card { border-color: rgba(0,255,204,0.2); background: rgba(0,255,204,0.03); }
.ix-opp-list { list-style: none; counter-reset: opp; display: flex; flex-direction: column; gap: 10px; }
.ix-opp-list li {
  counter-increment: opp; font-size: 0.8rem; color: var(--text-muted);
  padding-left: 24px; position: relative; line-height: 1.5;
}
.ix-opp-list li::before {
  content: counter(opp); position: absolute; left: 0;
  background: var(--accent); color: #000; width: 16px; height: 16px;
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); top: 1px;
}
.ix-opp-list li strong { color: var(--text); }

.ix-opp-markets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ix-opp-markets span { font-size: 0.72rem; padding: 3px 10px; background: var(--surface2); border-radius: 12px; color: var(--text-muted); border: 1px solid var(--border); }

/* GAP SUMMARY TABLE */
.ix-gap-summary { padding: 60px 0; border-top: 1px solid var(--border); }
.ix-gap-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.ix-gap-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.8rem; }
.ix-gap-table thead { background: var(--surface); }
.ix-gap-table th { padding: 14px 16px; text-align: left; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ix-gap-table th:first-child { color: var(--text); }
.ix-gap-table tbody tr { border-bottom: 1px solid var(--border); }
.ix-gap-table tbody tr:last-child { border-bottom: none; }
.ix-gap-table tbody tr:hover { background: var(--surface2); }
.ix-gap-table td { padding: 12px 16px; }
.dim-label { color: var(--text-muted); font-size: 0.8rem; }
.bold { font-weight: 700; }
.g5 { color: var(--accent); }
.g4 { color: #7ec8e3; }
.g3 { color: var(--gold); }
.g2 { color: #ff9a6c; }
.g1 { color: var(--accent2); }

.ix-gap-legend {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  margin-top: 16px; font-family: var(--font-mono); font-size: 0.75rem;
}
.ix-gap-legend span { padding: 4px 12px; background: var(--surface); border-radius: 6px; border: 1px solid var(--border); }

/* OPPORTUNITIES SECTION */
.ix-opps-section { padding: 60px 0; border-top: 1px solid var(--border); }
.ix-opps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.ix-opp-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; position: relative; transition: transform 0.2s ease;
}
.ix-opp-block:hover { transform: translateY(-3px); }
.ix-opp-rank {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 10px; padding: 3px 10px; border-radius: 4px; display: inline-block;
}
.priority-1 { border-left: 4px solid var(--accent); }
.priority-1 .ix-opp-rank { background: rgba(0,255,204,0.1); color: var(--accent); }
.priority-2 { border-left: 4px solid var(--gold); }
.priority-2 .ix-opp-rank { background: rgba(240,192,64,0.1); color: var(--gold); }
.priority-3 { border-left: 4px solid var(--purple); }
.priority-3 .ix-opp-rank { background: rgba(199,125,255,0.1); color: var(--purple); }
.ix-opp-block h3 { font-family: var(--font-mono); font-size: 1rem; color: var(--text); margin-bottom: 10px; }
.ix-opp-block p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }

/* MODES SECTION */
.ix-modes-section { padding: 60px 0; border-top: 1px solid var(--border); }
.ix-modes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.ix-mode-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; text-align: center; transition: all 0.2s ease;
}
.ix-mode-card:hover { border-color: var(--purple); transform: translateY(-4px); }
.ix-mode-icon { font-size: 2rem; margin-bottom: 12px; }
.ix-mode-card h4 { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); margin-bottom: 8px; }
.ix-mode-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.ix-mode-where { font-size: 0.7rem; color: var(--accent); font-family: var(--font-mono); padding: 4px 10px; background: rgba(0,255,204,0.06); border-radius: 6px; border: 1px solid rgba(0,255,204,0.15); }

/* FOOTER */
.footer { background: #050608; border-top: 1px solid var(--border); padding: 40px 24px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-logo { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.footer-tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.footer-ascii { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); white-space: pre; }
.footer-right { display: flex; gap: 20px; }
.footer-right a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-right a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .ix-interaction-grid { grid-template-columns: 1fr; }
  .ix-opps-grid { grid-template-columns: 1fr; }
  .ix-cpanel-header { flex-direction: column; }
  .ix-readiness-meter { margin-left: 0; align-items: flex-start; }
}
@media (max-width: 600px) {
  .ix-hero-title { font-size: 2rem; }
  .ix-modes-grid { grid-template-columns: 1fr 1fr; }
}

/* ======== NAV DROPDOWN ======== */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: rgba(0,255,204,0.08); border: 1px solid rgba(0,255,204,0.25);
  color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem;
  font-weight: 700; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: background 0.2s ease; white-space: nowrap;
}
.nav-dropdown-btn:hover { background: rgba(0,255,204,0.15); }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #111316; border: 1px solid #2a2d35; border-radius: 10px;
  padding: 6px; min-width: 220px; z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-drop-item {
  padding: 9px 14px; border-radius: 7px; text-decoration: none;
  font-size: 0.85rem; font-weight: 500; transition: background 0.15s ease; white-space: nowrap;
}
.nav-drop-item:hover { background: #1a1d22; }
.gold-item   { color: #f0c040; }
.green-item  { color: #00ffcc; }
.purple-item { color: #c77dff; }
.pro-item    { color: #a78bfa; font-weight: 700; }
