:root {
  --bg: #0b1220;
  --bg-soft: #111b2f;
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.13);
  --text: #f7fbff;
  --muted: #9fb0c7;
  --accent: #4f8cff;
  --accent-2: #24d18f;
  --danger: #ff5d6c;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --header: rgba(11,18,32,.72);
}

html[data-theme="light"] {
  --bg: #f5f8ff;
  --bg-soft: #ffffff;
  --card: rgba(255,255,255,.82);
  --card-border: rgba(18,32,56,.12);
  --text: #111827;
  --muted: #5f6f86;
  --accent: #2563eb;
  --accent-2: #079669;
  --danger: #e11d48;
  --shadow: 0 24px 70px rgba(15,23,42,.12);
  --header: rgba(245,248,255,.78);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 26%, transparent), transparent 30%),
    radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 35%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: var(--header);
  border-bottom: 1px solid var(--card-border);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}

.desktop-nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.desktop-nav a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border: 1px solid var(--card-border);
  background: var(--card); color: var(--text); border-radius: 14px;
  cursor: pointer; font-weight: 800;
}

.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px;
  align-items: center; padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 10px; color: var(--accent-2); letter-spacing: .04em;
  font-size: 14px; font-weight: 700;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(42px, 8vw, 78px); letter-spacing: -2px; }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 21px; }

.lead { color: var(--muted); line-height: 2; max-width: 720px; font-size: 17px; }

.ip-card, .status-panel, .detail-card, .wide-card, .privacy-card, .map-card {
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 90%, white 10%), var(--card));
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.ip-card { padding: 24px; margin: 30px 0 22px; }
.label, .muted { color: var(--muted); }
.ip-row {
  display: flex; direction: ltr; align-items: center; justify-content: space-between;
  gap: 16px; margin: 12px 0;
}
.ip-row strong { font-size: clamp(28px, 5vw, 52px); overflow-wrap: anywhere; }

.btn {
  border: 0; border-radius: 15px; padding: 14px 20px; color: white;
  background: linear-gradient(135deg, var(--accent), #7a5cff);
  cursor: pointer; font-weight: 800;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 24%, transparent);
}
.btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn-secondary { background: color-mix(in srgb, var(--text) 12%, transparent); box-shadow: none; color: var(--text); }
.btn-ghost { background: transparent; border: 1px solid var(--card-border); box-shadow: none; color: var(--text); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.status-panel { padding: 28px; min-height: 430px; }
.status-circle {
  width: 230px; height: 230px; margin: 0 auto 24px; border-radius: 999px;
  display: grid; place-items: center; align-content: center; gap: 8px;
  border: 1px solid var(--card-border);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 18%, transparent), color-mix(in srgb, var(--card) 70%, transparent));
}
.status-circle p { margin: 0; color: var(--muted); }
.status-circle strong { font-size: 26px; }

#status-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--danger) 12%, transparent);
}
#status-dot.ok {
  background: var(--accent-2);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-2) 12%, transparent);
}

.mini-grid, .details-grid, .test-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.mini-grid div {
  padding: 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.mini-grid span, .detail-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.mini-grid strong, .detail-card strong { overflow-wrap: anywhere; }

.section { padding: 44px 0; }
.section-title { margin-bottom: 22px; }
.details-grid { grid-template-columns: repeat(4, 1fr); }
.detail-card { padding: 20px; min-height: 118px; box-shadow: none; }

.wide-card, .privacy-card, .map-card { padding: 24px; box-shadow: none; }
.info-line {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--card-border);
}
.info-line:last-child { border-bottom: 0; }
.info-line span { color: var(--muted); }
code, pre {
  direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere;
  color: var(--text);
}
pre {
  margin: 18px 0 0; padding: 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--card-border);
  min-height: 58px;
}

.map-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 18px;
  align-items: stretch;
}
.map-card iframe {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 20px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}

.test-card { min-height: 230px; }
.test-card:nth-child(3) { grid-column: 1 / -1; }
.test-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
  margin: 14px 0;
}
.api-row code {
  flex: 1;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--card-border);
}

.site-footer {
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  padding: 28px 0;
  margin-top: 30px;
}
.site-footer .container { display: flex; justify-content: center; text-align: center; }

.toast {
  position: fixed; bottom: 22px; right: 22px; transform: translateY(120px);
  opacity: 0; background: var(--accent-2); color: #06120d; padding: 12px 18px;
  border-radius: 14px; font-weight: 800; transition: .25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

html[dir="ltr"] body { font-family: Arial, Tahoma, sans-serif; }
html[dir="ltr"] .toast { right: auto; left: 22px; }

@media (max-width: 920px) {
  .hero, .map-card { grid-template-columns: 1fr; padding-top: 42px; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .desktop-nav { display: none; }
  .test-grid { grid-template-columns: 1fr; }
  .test-card:nth-child(3) { grid-column: auto; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 22px, 1120px); }
  .nav { height: 64px; gap: 12px; }
  .brand span:last-child { display: none; }
  h1 { letter-spacing: -1px; }
  .ip-card, .status-panel, .wide-card, .privacy-card, .map-card { border-radius: 22px; }
  .ip-row, .api-row, .test-head { flex-direction: column; align-items: stretch; }
  .ip-row .btn, .api-row .btn { width: 100%; }
  .mini-grid, .details-grid { grid-template-columns: 1fr; }
  .info-line { grid-template-columns: 1fr; gap: 8px; }
}

.copyright{
  margin:0;
  text-align:center;
  direction: ltr;
  color:var(--muted);
}
.copyright a{
  color:var(--accent);
  font-weight:700;
}
.copyright a:hover{
  text-decoration:underline;
}
