:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --ink-900: #0b1220;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(37, 99, 235, .08);
  --shadow-lg: 0 24px 60px rgba(37, 99, 235, .15);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--blue-600); }
.muted { color: var(--ink-500); }
code { font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace; font-size: 13px; background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; color: var(--blue-700); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--ink-100);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand strong { color: var(--blue-600); }
.links { display: flex; gap: 28px; font-weight: 500; color: var(--ink-700); }
.links a { transition: color .15s; }
.links a:hover { color: var(--blue-600); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--blue-700); border: 1px solid var(--blue-200); }
.btn-ghost:hover { background: var(--blue-50); border-color: var(--blue-400); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Hero */
.hero {
  position: relative; padding: 80px 0 100px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 30%, rgba(96,165,250,.15), transparent 60%),
    linear-gradient(180deg, var(--blue-50) 0%, #ffffff 100%);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-200); border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
.lead { font-size: 17px; color: var(--ink-700); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 28px; font-weight: 700; color: var(--blue-700); }
.hero-stats span { font-size: 13px; color: var(--ink-500); }

/* Hero rotator card */
.hero-card { position: relative; }
.card-glow { position: absolute; inset: -20px; background: radial-gradient(ellipse at center, rgba(59,130,246,.25), transparent 70%); filter: blur(40px); z-index: 0; }
.rotator {
  position: relative; z-index: 1;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.rotator-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-500); font-weight: 500; margin-bottom: 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); }
.dot.live { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.timer { margin-left: auto; padding: 4px 10px; background: var(--blue-50); color: var(--blue-700); border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rotator-body { display: flex; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--ink-100); transition: opacity .3s; }
.flag { font-size: 64px; line-height: 1; }
.rotator-country { font-size: 24px; font-weight: 700; }
.rotator-city { color: var(--ink-500); font-size: 14px; }
.rotator-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--ink-100); }
.rotator-meta > div { display: flex; flex-direction: column; gap: 4px; }
.rotator-meta span { font-size: 12px; color: var(--ink-500); }
.rotator-meta strong { font-size: 16px; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.rotator-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; }
.rotator-foot span { font-size: 12px; color: var(--ink-500); }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--ink-500); font-size: 16px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius); padding: 32px; transition: all .25s; }
.feature:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--blue-50); border-radius: 12px; font-size: 24px; margin-bottom: 16px; }
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--ink-500); font-size: 14px; }

/* Servers */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.server-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius); padding: 24px; transition: all .25s; }
.server-card.active { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59,130,246,.12), var(--shadow-md); transform: translateY(-2px); }
.server-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-md); }
.server-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.server-flag { font-size: 32px; line-height: 1; }
.server-loc { display: flex; flex-direction: column; flex: 1; }
.server-loc strong { font-size: 16px; font-weight: 700; }
.server-loc span { font-size: 13px; color: var(--ink-500); }
.server-status { width: 10px; height: 10px; border-radius: 50%; }
.server-status.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.server-status.offline { background: #ef4444; }
.server-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.server-meta > div { display: flex; flex-direction: column; gap: 2px; }
.server-meta span { font-size: 11px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; }
.server-meta strong { font-size: 14px; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.server-bar { height: 4px; background: var(--ink-100); border-radius: 2px; overflow: hidden; margin-bottom: 16px; }
.server-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-600)); border-radius: 2px; }
.server-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-foot code { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* API */
.api-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.api-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius); padding: 28px; transition: all .25s; }
.api-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.api-method { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; margin-bottom: 16px; }
.api-method.get { background: #ecfdf5; color: #047857; }
.api-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.api-card p { color: var(--ink-500); font-size: 14px; margin-bottom: 16px; }
.api-card code { display: block; padding: 10px 14px; margin-bottom: 16px; word-break: break-all; }

/* Footer */
.site-footer { background: var(--ink-900); color: #cbd5e1; padding: 64px 0 24px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { padding: 4px 0; font-size: 14px; color: var(--ink-300); }
.footer-grid a:hover { color: #fff; }
.footer-bottom { padding-top: 24px; font-size: 13px; color: var(--ink-500); text-align: center; }

/* Rotator tabs */
.rotator-tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-soft); border-radius: 12px; margin-bottom: 18px; }
.rtab { flex: 1; padding: 8px 14px; border: none; background: transparent; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-500); cursor: pointer; transition: all .2s; font-family: inherit; }
.rtab.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.rpane { display: none; }
.rpane.active { display: block; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.dns-foot { flex-direction: column; align-items: stretch; gap: 8px; }
.dns-host-row { display: flex; align-items: center; gap: 8px; }
.dns-host-row code { flex: 1; font-size: 13px; padding: 8px 10px; word-break: break-all; }

/* DNS hero card */
.dns-hero {
  max-width: 760px; margin: 0 auto;
  background: linear-gradient(180deg, #fff 0%, var(--blue-50) 100%);
  border: 1px solid var(--blue-200);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.dns-hero-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.dns-flag-big { font-size: 56px; line-height: 1; transition: transform .3s; }
.dns-hero-info { flex: 1; display: flex; flex-direction: column; gap: 2px; transition: opacity .25s; }
.dns-hero-eyebrow { font-size: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.dns-hero-info strong { font-size: 28px; font-weight: 800; color: var(--ink-900); letter-spacing: -.01em; }
.dns-hero-info .muted { font-size: 14px; }
.dns-hero-timer { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; height: 72px; background: #fff; border: 1px solid var(--blue-200); border-radius: 16px; box-shadow: var(--shadow-sm); }
.dns-hero-timer span { font-size: 28px; font-weight: 800; color: var(--blue-700); font-variant-numeric: tabular-nums; line-height: 1; }
.dns-hero-timer small { font-size: 10px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

.dns-hero-host { background: #fff; border: 1px solid var(--ink-100); border-radius: 14px; padding: 18px 20px; margin-bottom: 20px; }
.dns-hero-host .dns-label { display: block; margin-bottom: 10px; }
.dns-hero-host-row { display: flex; align-items: center; gap: 12px; }
.dns-hero-host-row code { flex: 1; font-size: 16px; font-weight: 600; padding: 12px 14px; background: var(--bg-soft); color: var(--blue-700); word-break: break-all; transition: opacity .25s; }

.dns-hero-ips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.dns-hero-ips > div { background: #fff; border: 1px solid var(--ink-100); border-radius: 12px; padding: 14px; }
.dns-hero-ips .dns-label { display: block; margin-bottom: 6px; }
.dns-hero-ips code { display: block; font-size: 12px; padding: 0; background: transparent; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .25s; }

.dns-hero-progress { height: 4px; background: rgba(37,99,235,.15); border-radius: 2px; overflow: hidden; margin-bottom: 24px; }
.dns-hero-progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); width: 100%; border-radius: 2px; transition: width 1s linear; }

.dns-hero-howto { background: rgba(37,99,235,.06); border-left: 3px solid var(--blue-500); border-radius: 8px; padding: 14px 16px; font-size: 13px; color: var(--ink-700); line-height: 1.7; }
.dns-hero-howto strong { color: var(--blue-700); display: block; margin-bottom: 4px; }

.dns-label { font-size: 11px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* DNS Primary (featured branded) */
.dns-primary {
  max-width: 760px; margin: 0 auto 36px;
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 100%);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 50px -12px rgba(37,99,235,.4);
  position: relative; overflow: hidden;
  color: #fff;
}
.dns-primary::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}
.dns-primary-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  margin-bottom: 20px; position: relative;
}
.dns-primary-badge .dot.live { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
.dns-primary-head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; position: relative; }
.dns-primary-head .dns-flag-big { font-size: 56px; }
.dns-primary-info { display: flex; flex-direction: column; gap: 4px; }
.dns-primary-info strong { font-size: 24px; font-weight: 800; color: #fff; }
.dns-primary-info .muted { color: rgba(255,255,255,.8); font-size: 13px; }

.dns-primary .dns-hero-host { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); backdrop-filter: blur(10px); position: relative; }
.dns-primary .dns-hero-host .dns-label { color: rgba(255,255,255,.75); }
.dns-primary .dns-hero-host-row code { background: rgba(0,0,0,.2); color: #fff; font-size: 18px; }
.dns-primary .dns-hero-host-row .btn-primary { background: #fff; color: var(--blue-700); }
.dns-primary .dns-hero-host-row .btn-primary:hover { background: var(--blue-50); }

.dns-primary .dns-hero-ips { position: relative; }
.dns-primary .dns-hero-ips > div { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.dns-primary .dns-hero-ips .dns-label { color: rgba(255,255,255,.75); }
.dns-primary .dns-hero-ips code { color: #fff; }

.dns-primary .dns-hero-howto { background: rgba(0,0,0,.18); border-left-color: #fff; color: rgba(255,255,255,.92); position: relative; }
.dns-primary .dns-hero-howto strong { color: #fff; }
.dns-primary .dns-hero-howto code { background: rgba(255,255,255,.18); color: #fff; padding: 2px 6px; border-radius: 4px; }

.dns-alt-head { max-width: 760px; margin: 0 auto 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dns-alt-head h3 { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 0; }
.dns-alt-head .muted { font-size: 13px; }

@media (max-width: 640px) {
  .dns-primary { padding: 24px; }
  .dns-primary-info strong { font-size: 20px; }
  .dns-primary .dns-hero-host-row code { font-size: 14px; }
}

/* Proxy section */
.proxy-rotator {
  max-width: 880px; margin: 0 auto 36px;
  background: linear-gradient(180deg, #fff 0%, var(--blue-50) 100%);
  border: 1px solid var(--blue-200);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.proxy-rotator-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.proxy-flag { font-size: 48px; line-height: 1; }
.proxy-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.proxy-eyebrow { font-size: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.proxy-num { color: var(--blue-700); font-family: 'Inter', monospace; }
.proxy-info strong { font-size: 24px; font-weight: 800; color: var(--ink-900); }
.proxy-info .muted { font-size: 13px; }
.proxy-type-chip {
  display: inline-flex; align-items: center;
  background: var(--blue-700); color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.proxy-type-chip.type-https { background: #16a34a; }
.proxy-type-chip.type-socks5 { background: #7c3aed; }
.proxy-type-chip.type-socks4 { background: #db2777; }
.proxy-type-chip.type-http { background: var(--blue-700); }

.proxy-endpoint { background: #fff; border: 1px solid var(--ink-100); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.proxy-endpoint .dns-label { display: block; margin-bottom: 10px; }

.proxy-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.proxy-meta > div { background: #fff; border: 1px solid var(--ink-100); border-radius: 12px; padding: 12px 14px; }
.proxy-meta .dns-label { display: block; margin-bottom: 4px; }
.proxy-meta code { display: block; font-size: 13px; padding: 0; background: transparent; color: var(--ink-900); font-weight: 600; }
.status-online { color: #16a34a !important; }

.proxy-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.proxy-card {
  background: #fff; border: 1px solid var(--ink-100); border-radius: 14px;
  padding: 16px; transition: all .2s; box-shadow: var(--shadow-sm);
}
.proxy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.proxy-card.active { border-color: var(--blue-500); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.proxy-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.proxy-card-flag { font-size: 22px; }
.proxy-card-num { font-size: 12px; font-weight: 700; color: var(--ink-500); font-family: monospace; }
.proxy-card-head .proxy-type-chip { margin-left: auto; padding: 3px 8px; font-size: 10px; }
.proxy-card-country { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.proxy-card-city { font-size: 12px; color: var(--ink-500); margin-bottom: 10px; }
.proxy-card-ip code { display: block; background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--blue-700); word-break: break-all; }

@media (max-width: 640px) {
  .proxy-rotator { padding: 22px; }
  .proxy-meta { grid-template-columns: repeat(2, 1fr); }
  .proxy-info strong { font-size: 18px; }
}

.dns-changing .dns-flag-big,
.dns-changing .dns-hero-info,
.dns-changing #dns-big-host,
.dns-changing #dns-big-ipv4,
.dns-changing #dns-big-ipv6,
.dns-changing #dns-big-proto { opacity: 0.25; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--ink-900); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .3s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .features, .api-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .links { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .features, .api-grid, .servers { grid-template-columns: 1fr; }
  .dns-hero { padding: 24px; }
  .dns-hero-head { gap: 12px; }
  .dns-flag-big { font-size: 40px; }
  .dns-hero-info strong { font-size: 22px; }
  .dns-hero-ips { grid-template-columns: 1fr; }
  .dns-hero-host-row { flex-direction: column; align-items: stretch; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 22px; }
}
