/* MOKLAV Global DNS Checker — Moklav UIUX style: clean, light, card-based. */
:root {
  --ink: #12263a;
  --muted: #5b7186;
  --line: #dbe5ee;
  --bg: #f4f8fb;
  --card: #ffffff;
  --brand: #0b5fa5;
  --brand-dark: #083f6e;
  --ok: #1a9e54;
  --diff: #d98a06;
  --fail: #d64545;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(11, 47, 82, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; color: var(--ink); }
.logo span { color: var(--brand); }
.head-tag { color: var(--muted); font-size: .85rem; }
.site-nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; font-size: .92rem; }
.site-nav a { color: var(--ink); }

/* Hero + checker card */
.hero { padding: 34px 0 8px; text-align: center; }
.hero h1 { font-size: 2rem; margin: 0 0 8px; line-height: 1.25; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 640px; }
.checker {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 22px 0;
}
.check-form { display: flex; gap: 10px; flex-wrap: wrap; }
.check-form input[type="text"] {
  flex: 1 1 260px; min-width: 0; padding: 13px 14px; font-size: 1.05rem;
  border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink);
}
.check-form select {
  padding: 13px 10px; font-size: 1rem; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.check-form button {
  padding: 13px 26px; font-size: 1.05rem; font-weight: 700; border: 0; cursor: pointer;
  border-radius: 10px; background: var(--brand); color: #fff;
}
.check-form button:hover { background: var(--brand-dark); }
.check-form button:disabled { opacity: .55; cursor: wait; }
.status { min-height: 1.4em; margin: 10px 2px 0; color: var(--muted); font-size: .95rem; }
.status-error { color: var(--fail); }
.privacy-note { font-size: .85rem; color: var(--muted); margin: 6px 2px 0; }

/* Map */
.map-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin: 0 0 22px;
}
#worldmap { width: 100%; height: auto; display: block; }
.map-dots circle { fill: #c3d5e4; }
.marker { cursor: pointer; }
.marker-halo { fill: rgba(11, 95, 165, .12); }
.marker-dot { fill: #8fa9bd; stroke: #fff; stroke-width: 2; }
.marker-ok .marker-dot { fill: var(--ok); }
.marker-ok .marker-halo { fill: rgba(26, 158, 84, .15); }
.marker-diff .marker-dot { fill: var(--diff); }
.marker-diff .marker-halo { fill: rgba(217, 138, 6, .16); }
.marker-fail .marker-dot { fill: var(--fail); }
.marker-fail .marker-halo { fill: rgba(214, 69, 69, .14); }
.marker-icon { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); padding: 8px 4px 2px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; }
.legend .l-ok { background: var(--ok); } .legend .l-diff { background: var(--diff); }
.legend .l-fail { background: var(--fail); } .legend .l-idle { background: #8fa9bd; }

/* Results */
.summary { font-size: 1.02rem; margin: 4px 2px 12px; }
.summary .note { color: var(--muted); font-size: .9rem; }
.country-head { margin: 18px 2px 8px; font-size: 1rem; color: var(--brand-dark); }
.row {
  display: grid; grid-template-columns: 1.1fr 1.6fr .4fr .7fr; gap: 10px; align-items: center;
  width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 14px; margin: 0 0 8px; cursor: pointer; font: inherit; color: var(--ink);
}
.row:hover { border-color: var(--brand); }
.row.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(11, 95, 165, .18); }
.row-loc strong { display: block; }
.row-loc small { color: var(--muted); display: block; overflow-wrap: anywhere; }
.row-val { overflow-wrap: anywhere; font-family: Consolas, "Courier New", monospace; font-size: .92rem; }
.row-ttl { color: var(--muted); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: #e2f5ea; color: #0f7a3d; }
.badge-diff { background: #fdf0da; color: #9c6503; }
.badge-fail { background: #fbe3e3; color: #b03030; }
.muted { color: var(--muted); }

/* Detail */
.detail {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin: 16px 0 22px;
}
.detail h3 { margin: 0 0 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 14px; }
.detail-grid dt { font-size: .8rem; color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
table.answers { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.answers th, table.answers td { border-top: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
table.answers th { color: var(--muted); font-weight: 600; }

/* Content cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 22px 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card h2, .card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.prose {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 26px; margin: 22px 0;
}
.prose h2 { margin-top: 1.2em; } .prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #2c4257; }
.ad-slot {
  margin: 26px 0; padding: 14px; text-align: center; color: var(--muted); font-size: .8rem;
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fff;
}

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 34px; background: var(--card); }
.site-foot .wrap { padding-top: 18px; padding-bottom: 22px; color: var(--muted); font-size: .88rem; }
.site-foot nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

/* Small screens */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.55rem; }
  .checker { padding: 14px; }
  .check-form button { flex: 1 1 100%; }
  .row { grid-template-columns: 1fr auto; }
  .row-val { grid-column: 1 / -1; order: 3; }
  .row-ttl { display: none; }
  .prose { padding: 18px; }
}
