:root {
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --secondary: #0ea5e9;
  --dark: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
textarea { resize: vertical; min-height: 160px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 8px 24px rgba(15,23,42,0.02);
}
.header-inner {
  min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--dark);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: var(--shadow);
}
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav a {
  color: var(--text); font-weight: 600; font-size: 0.95rem; padding: 8px 10px; border-radius: 10px;
}
.main-nav a:hover {
  background: var(--primary-soft); color: var(--primary-strong);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
.search-wrap {
  position: relative; width: min(360px, 100%);
}
.search-wrap input {
  padding-left: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
}
.search-wrap::before {
  content: '⌕'; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem;
}
.search-results {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(420px, 86vw); background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; display: none; z-index: 100;
}
.search-results.show { display: block; }
.search-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text);
}
.search-item:hover { background: var(--bg); text-decoration: none; }
.hero {
  padding: 72px 0 28px;
  background: linear-gradient(180deg, rgba(239,246,255,0.8) 0%, rgba(248,250,252,0.5) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 28px; align-items: center;
}
.kicker {
  display: inline-block; background: linear-gradient(90deg, rgba(37,99,235,0.12), rgba(14,165,233,0.12)); color: var(--primary-strong); padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px;
}
h1, h2, h3, h4 {
  margin-top: 0; color: var(--dark); line-height: 1.1;
}
h1 { font-size: clamp(2.5rem, 4vw, 4.2rem); margin-bottom: 14px; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 2.5vw, 2.6rem); margin-bottom: 18px; }
.lead {
  color: var(--muted); font-size: 1.08rem; max-width: 640px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 24px 0 22px;
}
.hero-search { margin-top: 18px; }
.category-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.75); border: 1px solid rgba(226,232,240,0.9); border-radius: 999px; padding: 8px 12px; font-size: 0.82rem; font-weight: 700; color: var(--dark);
}
.hero-card, .panel, .tool-card {
  background: rgba(255,255,255,0.9); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-card { padding: 22px; }
.hero-summary { display: grid; gap: 14px; }
.metric {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; background: linear-gradient(180deg, #f8fbff, #ffffff); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
}
.metric span { color: var(--muted); }
.metric strong { font-size: 1.2rem; color: var(--dark); }
.section { padding: 30px 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px;
}
.tool-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.tool-card {
  padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
}
.tool-card-header {
  display: flex; align-items: center; gap: 12px;
}
.tool-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #dbeafe, #eff6ff); color: var(--primary-strong); font-size: 1.4rem; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.08);
}
.card-meta {
  color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px;
}
.tool-card h3 { margin: 0; font-size: 1.08rem; }
.tool-card p { margin: 0; color: var(--muted); }
.secondary-link {
  font-weight: 700;
  color: var(--primary-strong);
}
.secondary-link:hover {
  color: var(--primary);
}
.card-actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.form-grid .card-actions { flex-wrap: wrap; }
.button, .button-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 18px; cursor: pointer; border: 1px solid transparent; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: white; border-color: var(--primary); box-shadow: 0 10px 22px rgba(37,99,235,0.18);
}
.button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  text-decoration: none;
}
.button-secondary {
  background: white; color: var(--dark); border-color: var(--border);
}
.button-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(37,99,235,0.25);
  text-decoration: none;
}
.button-ghost {
  background: transparent; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-weight: 700; color: var(--text); cursor: pointer;
}
.layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 24px; }
.panel {
  padding: 22px;
}
.feature-list, .article-list {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
}
.feature-list li, .article-list li {
  background: linear-gradient(180deg, #f8fbff, #ffffff); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
}
.analytics-section { padding-top: 10px; }
.analytics-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  font-size: 0.8rem;
  font-weight: 700;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
  animation: pulse 1.8s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}
.analytics-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}
.analytics-card {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}
.visitors-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
}
.analytics-label {
  color: var(--dark);
  font-weight: 800;
  font-size: 1.05rem;
}
.analytics-number {
  margin: 16px 0 12px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--dark);
}
.analytics-meta {
  color: var(--muted);
  font-size: 0.88rem;
}
.country-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.country-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.country-flag {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  font-size: 1.2rem;
}
.country-name {
  color: var(--dark);
  font-weight: 700;
}
.country-value {
  color: var(--primary-strong);
  font-weight: 800;
  white-space: nowrap;
}
.cta-box {
  background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%); color: white; border-radius: 20px; padding: 28px 30px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; box-shadow: 0 22px 46px rgba(29,78,216,0.18);
}
.cta-box h2, .cta-box p { color: white; margin: 0; }
footer {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%); color: #dbeafe; padding: 42px 0 18px; margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 24px;
}
.footer-grid h4 { color: white; margin-bottom: 12px; }
.footer-grid a { color: #dbeafe; display: block; margin-bottom: 8px; }
.copy {
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 18px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.content-page .page-header { padding: 34px 0 18px; }
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 10px; }
.tool-shell { padding-bottom: 18px; }
.tool-panel {
  background: white; border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: 16px; }
label {
  display: block; color: var(--dark); font-weight: 700; margin-bottom: 8px;
}
.result-card {
  background: linear-gradient(180deg, #f8fbff, #ffffff); border: 1px solid #dbeafe; border-radius: 14px; padding: 16px; margin-top: 8px;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.stat-box span { color: var(--muted); display: block; margin-bottom: 6px; }
.stat-box strong { color: var(--dark); font-size: 1.2rem; }
.article-content h2 { margin-top: 26px; }
.article-content h3 { margin-top: 18px; }
blockquote {
  margin: 22px 0; padding: 18px 20px; border-left: 4px solid var(--primary); background: #f8fafc; border-radius: 0 12px 12px 0;
}
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 18px; z-index: 1000; background: white; border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); display: none; gap: 16px; align-items: center; justify-content: space-between;
}
.cookie-banner.show { display: flex; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.empty-state {
  padding: 16px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); text-align: center;
}
.ad-slot {
  margin: 28px 0; border: 1px dashed #bfdbfe; background: linear-gradient(180deg, #f8fbff, #ffffff); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted);
}
.ad-slot strong { display: block; color: var(--dark); margin-bottom: 8px; }
@media (max-width: 980px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-open .main-nav {
    display: flex; position: absolute; left: 16px; right: 16px; top: 72px; background: white; border: 1px solid var(--border); border-radius: 18px; padding: 14px; flex-direction: column; box-shadow: var(--shadow);
  }
  .hero-grid, .layout, .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 64px; }
  .search-wrap { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .hero { padding-top: 46px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button, .button-secondary { width: 100%; }
}
