:root {
  --bg-0: #08090c;
  --bg-1: #0e1017;
  --bg-2: #14161f;
  --bg-3: #1a1d28;
  --bg-hover: #1e2130;
  --border-0: #1c1f2e;
  --border-1: #262a3a;
  --border-2: #333850;
  --text-0: #f0f1f5;
  --text-1: #b0b5c8;
  --text-2: #6e7490;
  --text-3: #454b64;
  --accent: #4d8eff;
  --accent-hover: #3a7aef;
  --accent-glow: rgba(77, 142, 255, 0.12);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.10);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.10);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.10);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
  --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--bg-0);
  color: var(--text-0);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border-0);
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 17px; letter-spacing: -0.3px;
  display: flex; align-items: center; gap: 2px;
}
.nav-logo em { font-style: normal; color: var(--accent); }
.nav-logo small { color: var(--text-3); font-weight: 500; font-size: 13px; }
.nav-links { display: flex; gap: 6px; }
.nav-link {
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  color: var(--text-2); border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text-1); background: var(--bg-2); }

/* Hero */
.hero {
  position: relative;
  padding: 140px clamp(16px, 4vw, 40px) 80px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; overflow: hidden;
}
.hero-glow {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{opacity:.6} 50%{opacity:1} }

.hero-grid {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 600px;
  background-image: linear-gradient(var(--border-0) 1px, transparent 1px), linear-gradient(90deg, var(--border-0) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none; opacity: 0.5;
}

.hero-content { position: relative; z-index: 2; max-width: 720px; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 10px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 100px; font-size: 12px; font-weight: 500;
  color: var(--text-2); margin-bottom: 32px;
  animation: fadeUp .6s ease-out both;
}
.pill-dot {
  width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; box-shadow: 0 0 8px var(--green);
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-title {
  font-size: clamp(38px, 7vw, 64px); font-weight: 800;
  line-height: 1.05; letter-spacing: -2px; margin-bottom: 20px;
  animation: fadeUp .6s ease-out .08s both;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(15px, 2.2vw, 18px); font-weight: 400;
  color: var(--text-1); line-height: 1.65;
  max-width: 520px; margin: 0 auto 44px;
  animation: fadeUp .6s ease-out .16s both;
}

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

/* Search */
.search-container {
  position: relative; z-index: 2;
  width: 100%; max-width: 580px; margin: 0 auto;
  animation: fadeUp .6s ease-out .24s both;
}
.search-box {
  display: flex; align-items: center;
  background: var(--bg-2); border: 1.5px solid var(--border-1);
  border-radius: 14px; padding: 5px 5px 5px 18px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--border-1), 0 0 40px var(--accent-glow);
}
.search-icon { flex-shrink: 0; color: var(--text-3); margin-right: 12px; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--font-mono); font-size: 17px; font-weight: 500;
  color: var(--text-0); padding: 15px 0; min-width: 0;
}
.search-input::placeholder {
  font-family: var(--font-display); font-weight: 400;
  font-size: 15px; color: var(--text-3);
}
.search-btn {
  flex-shrink: 0; padding: 14px 26px;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  border: none; border-radius: 10px; cursor: pointer;
  transition: background var(--transition), transform .12s; white-space: nowrap;
}
.search-btn:hover { background: var(--accent-hover); }
.search-btn:active { transform: scale(.96); }

.search-hints {
  margin-top: 14px; font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
}
.search-hints kbd {
  font-family: var(--font-mono); font-size: 12px;
  padding: 3px 9px; background: var(--bg-3);
  border: 1px solid var(--border-1); border-radius: 6px;
  color: var(--text-2); cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.search-hints kbd:hover { border-color: var(--border-2); color: var(--text-1); }

/* Result card */
.result { max-width: 580px; margin: 0 auto; overflow: hidden; }
.result-card {
  display: none; margin-top: 20px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--radius-xl); overflow: hidden;
  animation: cardIn .4s cubic-bezier(.16,1,.3,1);
}
.result-card.show { display: block; }
@keyframes cardIn { from{opacity:0;transform:translateY(12px) scale(.98)} to{opacity:1;transform:translateY(0) scale(1)} }

.result-hero { padding: 28px 28px 20px; display: flex; align-items: flex-start; gap: 16px; }
.result-flag { font-size: 52px; line-height: 1; }
.result-meta { flex: 1; }
.result-country { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.result-dial-code { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--accent); margin-top: 2px; }

.risk-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px; margin-top: 12px;
}
.risk-low { background: var(--green-dim); color: var(--green); }
.risk-medium { background: var(--yellow-dim); color: var(--yellow); }
.risk-high { background: var(--red-dim); color: var(--red); }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border-0); }
.result-cell { padding: 16px 24px; border-bottom: 1px solid var(--border-0); }
.result-cell:nth-child(odd) { border-right: 1px solid var(--border-0); }
.result-cell-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin-bottom: 4px; }
.result-cell-value { font-size: 14px; font-weight: 500; color: var(--text-1); }
.result-cta { display: flex; padding: 16px 24px; border-top: 1px solid var(--border-0); }
.result-cta a {
  flex: 1; text-align: center; padding: 10px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  border-radius: 8px; transition: background var(--transition);
}
.result-cta a:hover { background: var(--accent-glow); }

/* Sections */
.section { max-width: 1120px; margin: 0 auto; padding: 64px clamp(16px, 4vw, 40px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.section-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ''; width: 3px; height: 14px; background: var(--accent); border-radius: 2px; }
.section-more { font-size: 12px; font-weight: 600; color: var(--text-3); transition: color var(--transition); }
.section-more:hover { color: var(--accent); }

/* Scam cards */
.scam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.scam-card {
  background: var(--bg-1); border: 1px solid var(--border-0);
  border-radius: var(--radius-lg); padding: 22px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  cursor: pointer; display: block;
}
.scam-card:hover { border-color: var(--border-1); background: var(--bg-2); transform: translateY(-2px); }
.scam-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.scam-flag { font-size: 26px; }
.scam-code { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.scam-country { color: var(--text-2); font-size: 13px; font-weight: 500; margin-left: auto; }
.scam-text { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* Popular grid */
.popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.popular-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 22px 8px 18px;
  background: var(--bg-1); border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition), transform .15s;
  cursor: pointer;
}
.popular-item:hover { border-color: var(--border-1); background: var(--bg-2); transform: translateY(-3px); }
.popular-flag { font-size: 36px; line-height: 1; }
.popular-code { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.popular-name { font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.3; }

/* Filters */
.filters { display: flex; gap: 5px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 13px; font-family: var(--font-display); font-size: 12px; font-weight: 600;
  color: var(--text-3); background: none; border: 1px solid transparent;
  border-radius: 7px; cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover { color: var(--text-2); background: var(--bg-2); }
.filter-btn.on { color: var(--accent); background: var(--accent-glow); border-color: rgba(77,142,255,.2); }

/* Countries grid */
.countries-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 5px; }
.cell {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 14px 4px 11px;
  background: var(--bg-1); border: 1px solid transparent;
  border-radius: 9px; cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform .12s;
}
.cell:hover { border-color: var(--border-1); background: var(--bg-2); transform: translateY(-1px); }
.cell-flag { font-size: 28px; line-height: 1; }
.cell-code { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-2); }
.cell-name { font-size: 9px; color: var(--text-3); text-align: center; line-height: 1.2; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bottom CTA */
.bottom-cta { text-align: center; padding: 80px clamp(16px,4vw,40px); position: relative; }
.bottom-cta h2 { font-size: clamp(24px,4vw,36px); font-weight: 700; letter-spacing: -1px; margin-bottom: 12px; }
.bottom-cta p { color: var(--text-2); font-size: 15px; margin-bottom: 28px; }
.bottom-cta .search-container { max-width: 480px; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-0);
  padding: 28px clamp(16px,4vw,40px);
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: var(--text-3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-3); transition: color var(--transition); }
.footer-links a:hover { color: var(--text-2); }

/* Country page */
.country-page { max-width: 900px; margin: 0 auto; padding: 100px clamp(16px,4vw,40px) 60px; }
.country-hero { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
.country-flag { font-size: 72px; line-height: 1; }
.country-name { font-size: clamp(28px,5vw,42px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
.country-code { font-family: var(--font-mono); font-weight: 600; font-size: 18px; color: var(--accent); margin-top: 4px; }

.country-section { margin-bottom: 48px; }
.country-section h2 {
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-0);
}
.country-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text-1); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.info-cell {
  background: var(--bg-1); border: 1px solid var(--border-0);
  border-radius: var(--radius); padding: 16px;
}
.info-cell-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); margin-bottom: 4px; }
.info-cell-value { font-size: 15px; font-weight: 500; color: var(--text-1); }

.dial-box {
  background: var(--bg-1); border: 1px solid var(--border-0);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
}
.dial-box code {
  font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--accent);
}
.dial-box p { color: var(--text-2); font-size: 14px; margin-top: 8px; line-height: 1.6; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px; color: var(--text-3);
  padding: 10px 16px; border-bottom: 1px solid var(--border-1);
}
.data-table td {
  padding: 10px 16px; font-size: 14px; color: var(--text-1);
  border-bottom: 1px solid var(--border-0);
}
.data-table tr:hover td { background: var(--bg-1); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

/* Scam page */
.scam-page { max-width: 800px; margin: 0 auto; padding: 100px clamp(16px,4vw,40px) 60px; }
.scam-page h1 { font-size: clamp(24px,4vw,36px); font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; line-height: 1.15; }
.scam-page .intro { font-size: 16px; color: var(--text-1); line-height: 1.7; margin-bottom: 32px; }

.tip-card {
  background: var(--bg-1); border: 1px solid var(--border-0);
  border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
}
.tip-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.tip-card p, .tip-card li { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.tip-card ul { padding-left: 20px; }
.tip-card li { margin-bottom: 4px; }

/* Blog */
.blog-page { max-width: 800px; margin: 0 auto; padding: 100px clamp(16px,4vw,40px) 60px; }
.blog-page h1 { font-size: clamp(24px,4vw,36px); font-weight: 800; letter-spacing: -1px; margin-bottom: 32px; }

.article-card {
  background: var(--bg-1); border: 1px solid var(--border-0);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 12px;
  transition: border-color var(--transition), transform var(--transition);
  display: block;
}
.article-card:hover { border-color: var(--border-1); transform: translateY(-2px); }
.article-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.article-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.article-card .meta { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.article-body { font-size: 16px; color: var(--text-1); line-height: 1.8; }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.article-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--accent); }
.article-body a:hover { text-decoration: underline; }

/* Static pages */
.static-page { max-width: 700px; margin: 0 auto; padding: 100px clamp(16px,4vw,40px) 60px; }
.static-page h1 { font-size: clamp(24px,4vw,36px); font-weight: 800; letter-spacing: -1px; margin-bottom: 24px; }
.static-page p { font-size: 15px; color: var(--text-1); line-height: 1.7; margin-bottom: 16px; }
.static-page h2 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.static-page ul { padding-left: 24px; margin-bottom: 16px; }
.static-page li { font-size: 15px; color: var(--text-1); line-height: 1.6; margin-bottom: 6px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 120px 16px 56px; }
  .hero-title { letter-spacing: -1px; }
  .search-input { font-size: 16px; }
  .search-btn { padding: 14px 18px; font-size: 13px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-cell:nth-child(odd) { border-right: none; }
  .scam-grid { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .countries-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .country-hero { flex-direction: column; gap: 12px; }
  .info-grid { grid-template-columns: 1fr; }
}
