/* ░░░ ToolWizHub — DNS & Cert Health · trendy glass / gradient theme ░░░ */

/* ── Splash screen ────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  background:
    radial-gradient(56% 46% at 50% 42%, rgba(255, 184, 72, 0.16), transparent 70%),
    radial-gradient(120% 90% at 100% 0%, #123a44 0%, transparent 55%),
    radial-gradient(120% 90% at 0% 100%, #2a1840 0%, transparent 55%),
    #07070d;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  animation: splash-failsafe 0s linear 5s forwards; /* reveal app even if JS never runs */
}
html.no-splash .splash { display: none; }
.splash.is-hiding { opacity: 0; visibility: hidden; pointer-events: none; }
.splash.is-hiding .splash__stage { transform: scale(1.08); }

.splash__stage {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.splash__glow {
  position: absolute; top: 42%; left: 50%; width: 320px; height: 320px;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(255, 184, 72, 0.34), rgba(34, 211, 238, 0.16) 45%, transparent 70%);
  filter: blur(10px); animation: splash-glow 2.4s ease-in-out infinite;
}
@keyframes splash-glow {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.9); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.1); }
}
.splash__logo {
  position: relative; width: clamp(150px, 42vw, 200px); height: auto;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.55));
  animation: splash-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             splash-float 3.2s ease-in-out 0.8s infinite;
}
@keyframes splash-in {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes splash-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash__tagline {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 14px;
  letter-spacing: 7px; text-transform: uppercase; padding-left: 7px;
  color: #ffd486; text-shadow: 0 2px 12px rgba(255, 184, 72, 0.4);
  opacity: 0; animation: splash-fade 0.6s ease 0.55s forwards;
}
@keyframes splash-fade { to { opacity: 0.95; } }
.splash__bar { width: 168px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.splash__bar > span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #ffb648, #22d3ee, #e879f9);
  animation: splash-bar 1.5s ease 0.3s forwards;
}
@keyframes splash-bar { from { width: 0; } to { width: 100%; } }
.splash__sparkles { position: absolute; inset: -10% -20%; pointer-events: none; }
.splash__sparkles span {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 2px rgba(255, 212, 134, 0.9);
  opacity: 0; animation: splash-sparkle 1.9s ease-in-out infinite;
}
.splash__sparkles span:nth-child(1) { top: 26%; left: 28%; animation-delay: 0s; }
.splash__sparkles span:nth-child(2) { top: 20%; left: 70%; animation-delay: 0.45s; }
.splash__sparkles span:nth-child(3) { top: 58%; left: 20%; animation-delay: 0.9s; }
.splash__sparkles span:nth-child(4) { top: 62%; left: 78%; animation-delay: 0.25s; }
.splash__sparkles span:nth-child(5) { top: 36%; left: 86%; animation-delay: 0.65s; }
.splash__sparkles span:nth-child(6) { top: 78%; left: 48%; animation-delay: 1.1s; }
@keyframes splash-sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  40%      { opacity: 1; transform: scale(1.25); }
  70%      { opacity: 0.6; transform: scale(0.9); }
}
@keyframes splash-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

:root {
  --bg: #07070d;
  --text: #f4f5fb;
  --soft: #c2c6da;
  --muted: #8087a0;
  --faint: #5a6080;

  /* glass surfaces */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* brand gradient */
  --c1: #22d3ee;   /* cyan   */
  --c2: #818cf8;   /* indigo */
  --c3: #e879f9;   /* fuchsia */
  --grad: linear-gradient(110deg, var(--c1), var(--c2) 55%, var(--c3));

  --ok: #34d399;
  --warn: #fbbf24;
  --fail: #fb7185;

  --r: 22px;
  --r-sm: 14px;
  --r-pill: 999px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* animated gradient mesh blobs */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 50vw; height: 50vw; top: -14vw; right: -10vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.5), transparent 70%);
  animation: drift1 18s var(--ease) infinite alternate;
}
body::after {
  width: 46vw; height: 46vw; bottom: -16vw; left: -10vw;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.42), transparent 70%);
  animation: drift2 22s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate(-8vw, 10vw) scale(1.15); } }
@keyframes drift2 { to { transform: translate(8vw, -8vw) scale(1.1); } }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

.app { max-width: 1280px; margin: 0 auto; padding: 22px clamp(20px, 4vw, 48px) 64px; }

/* ── App bar / brand ──────────────────────────────── */
.appbar { display: flex; align-items: center; margin-bottom: 30px; }
.brand {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 10px 16px 10px 12px; border-radius: var(--r-pill); text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.brand:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.brand__mark { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.brand__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.brand__text strong { font-family: var(--display); font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -0.2px; }
.brand__text span { font-size: 9px; letter-spacing: 0.2em; color: var(--muted); font-weight: 600; }

/* ── Hero / search ────────────────────────────────── */
.hero { text-align: center; margin: 40px 0 40px; }
.hero__title {
  font-family: var(--display); font-size: clamp(26px, 6.2vw, 52px); font-weight: 700;
  letter-spacing: -1px; line-height: 1.08; color: #fff; overflow-wrap: anywhere;
}
.hero__hl {
  background: linear-gradient(110deg, var(--c1), #2dd4bf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { color: var(--soft); margin: 14px auto 30px; max-width: 500px; font-size: 16px; }

.search {
  display: flex; gap: 8px; width: 100%; max-width: 580px; margin: 0 auto;
  background: var(--glass); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 8px 8px 8px 22px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s, box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
}
.search:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 1.5px var(--c1), 0 0 34px rgba(34, 211, 238, 0.28);
  transform: translateY(-1px);
}
.search__input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  color: var(--text); font-size: 16px; font-family: var(--mono); padding: 11px 0;
}
.search__btn { flex-shrink: 0; }
.search__input::placeholder { color: var(--faint); }
.search__btn {
  padding: 0 28px; border-radius: var(--r-pill); font-weight: 700; font-size: 15px; color: #04141a;
  background: var(--grad); background-size: 160% 160%;
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.4);
  transition: transform 0.18s var(--ease), box-shadow 0.25s, background-position 0.5s;
}
.search__btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 12px 30px rgba(232, 121, 249, 0.45); }
.search__btn:active { transform: translateY(0) scale(0.97); }
.search__btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.hint { color: var(--muted); font-size: 13.5px; margin-top: 18px; }
.example {
  color: var(--c1); font-family: var(--mono); font-size: 13px; padding: 0 2px;
  border-bottom: 1px dashed rgba(34, 211, 238, 0.4); transition: color 0.15s, border-color 0.15s;
}
.example:hover { color: var(--c3); border-bottom-color: var(--c3); }

/* ── Results ──────────────────────────────────────── */
.results { display: flex; flex-direction: column; gap: 16px; }
.results > * { animation: rise 0.45s var(--ease) backwards; }
.results > *:nth-child(2) { animation-delay: 0.05s; }
.results > *:nth-child(3) { animation-delay: 0.1s; }
.results > *:nth-child(4) { animation-delay: 0.15s; }
.results > *:nth-child(5) { animation-delay: 0.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.result-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--r);
  background: var(--glass-2); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.result-head__id { display: flex; align-items: center; gap: 14px; }
.result-head__domain { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 7px; }
.result-head__server { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.result-head__label { font-size: 10px; letter-spacing: 0.18em; color: var(--faint); font-weight: 600; }
.result-head__ip { font-family: var(--mono); font-size: 18px; color: var(--soft); }

/* ── icon boxes ───────────────────────────────────── */
.icon-box {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-2); border: 1px solid var(--line); color: var(--c1);
}
.icon-box svg { width: 17px; height: 17px; }
.icon-box--lg { width: 46px; height: 46px; border-radius: 14px; }
.icon-box--lg svg { width: 24px; height: 24px; }

/* ── three-card grid ──────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .cards-grid { grid-template-columns: 1fr; } }

.card__head-left { display: flex; align-items: center; gap: 11px; }
.card__title { font-family: var(--display); font-weight: 600; font-size: 14.5px; }

/* status chips (domain registration) */
.kv--stack { flex-direction: column; align-items: flex-start; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em;
  padding: 4px 8px; border-radius: 7px; color: var(--muted);
  background: var(--glass-2); border: 1px solid var(--line);
}

/* primary records sections */
.rec-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rec-section:last-child { border-bottom: none; }
.rec-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rec-section__label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.rec-section__count { font-size: 10px; letter-spacing: 0.1em; color: var(--faint); text-transform: uppercase; }
.rec-box { background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.rec-box__line { font-family: var(--mono); font-size: 12.5px; color: var(--soft); padding: 2px 0; word-break: break-all; }
.rec-more {
  display: block; text-align: left; font-family: var(--mono); font-size: 11.5px;
  color: var(--c2); padding: 6px 0 2px; cursor: pointer; transition: color 0.15s;
}
.rec-more:hover { color: var(--c3); }

/* full DNS sections */
.dns-section { padding: 8px 0 14px; }
.dns-section + .dns-section { border-top: 1px solid var(--line); padding-top: 16px; }
.dns-section__title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.dns-section__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 8px var(--c1); }
.dns-entry {
  font-family: var(--mono); font-size: 12px; color: var(--soft);
  background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 14px; margin-bottom: 8px; word-break: break-all; line-height: 1.5;
}
.dns-entry:last-child { margin-bottom: 0; }
/* SOA record grid */
.soa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.soa-cell {
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px;
}
.soa-cell__k { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.soa-cell__v { font-family: var(--mono); font-size: 12.5px; color: var(--soft); word-break: break-all; }

.caa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .caa-grid { grid-template-columns: 1fr; } }
.caa-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0,0,0,0.22); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 14px;
}
.caa-row__val { font-family: var(--mono); font-size: 12.5px; color: var(--soft); word-break: break-all; }
.caa-row__tag {
  flex-shrink: 0; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--c1); background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.25);
  padding: 3px 8px; border-radius: 6px;
}

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--r-pill); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid transparent;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.pill--ok   { color: var(--ok);   background: rgba(52,211,153,0.1);  border-color: rgba(52,211,153,0.25); }
.pill--warn { color: var(--warn); background: rgba(251,191,36,0.1);  border-color: rgba(251,191,36,0.25); }
.pill--fail { color: var(--fail); background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.25); }

.card {
  border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
}
.card__body { padding: 8px 20px 16px; }

/* key/value rows */
.kv { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--muted); min-width: 120px; flex-shrink: 0; }
.kv__v { color: var(--text); font-family: var(--mono); word-break: break-word; }

/* findings */
.finding { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: none; }
.finding__icon {
  flex-shrink: 0; font-weight: 800; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.finding--ok   .finding__icon { color: var(--ok);   background: rgba(52,211,153,0.14); }
.finding--warn .finding__icon { color: var(--warn); background: rgba(251,191,36,0.14); }
.finding--fail .finding__icon { color: var(--fail); background: rgba(251,113,133,0.14); }

/* DNS records */
.dns-type { padding: 11px 0; border-bottom: 1px solid var(--line); }
.dns-type:last-child { border-bottom: none; }
.dns-type__label {
  display: inline-block; min-width: 56px; font-weight: 700; font-size: 11px;
  color: var(--c1); font-family: var(--mono); vertical-align: top;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.dns-type__vals { display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--soft); }
.dns-type__vals div { padding: 1px 0; word-break: break-all; }
.dns-empty { color: var(--faint); }

/* state messages */
.state {
  text-align: center; padding: 34px 20px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.state--error { color: var(--fail); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 12px;
  background: conic-gradient(from 0deg, transparent, var(--c1), var(--c2), var(--c3));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────── */
.app-footer { display: flex; justify-content: center; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.app-footer__brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; opacity: 0.5; transition: opacity 0.2s; }
.app-footer__brand:hover { opacity: 1; }
.app-footer__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.app-footer__brand img { height: 20px; width: auto; display: block; }

@media (max-width: 560px) {
  .kv { flex-direction: column; gap: 2px; }
  .kv__k { min-width: 0; }
  .search { padding-left: 18px; }
  .search__btn { padding: 0 18px; }
  .hero { margin: 28px 0 32px; }
  .hero__sub { font-size: 15px; }
  .hint { font-size: 12.5px; line-height: 1.9; }
  /* stack the result header so domain + server IP don't fight for width */
  .result-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .result-head__server { text-align: left; }
  .soa-grid { grid-template-columns: 1fr; }
}

/* ── overflow guards (no element should exceed the viewport) ─────────── */
.results, .cards-grid, .card, .card__body, .result-head, .result-head__id,
.rec-box, .dns-entry, .soa-cell, .caa-row { min-width: 0; max-width: 100%; }
.result-head__id { flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
