:root {
  --bg: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --ink: #0f172a;
  --muted: #5b6474;
  --muted-soft: #7a8396;
  --accent: #2a66ff;
  --accent-dark: #1747c8;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.04);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(81, 136, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(67, 198, 172, 0.08), transparent 28%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.page-glow {
  position: fixed;
  z-index: 0;
  inset: auto;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.9;
  pointer-events: none;
}
.glow-1 {
  width: 360px;
  height: 360px;
  right: 8vw;
  top: 8vh;
  background: rgba(42, 102, 255, 0.12);
}
.glow-2 {
  width: 320px;
  height: 320px;
  left: 6vw;
  bottom: 8vh;
  background: rgba(67, 198, 172, 0.12);
}

.app-shell,
.about-shell {
  position: relative;
  z-index: 1;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.hero {
  width: min(100%, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transition: transform 180ms ease, background 180ms ease;
}

.brand-link:hover { transform: translateY(-1px); background: rgba(255,255,255,0.35); }
.brand-link-small { align-self: flex-start; margin-bottom: 10px; padding-left: 0; }

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(42, 102, 255, 0.08);
}
.brand-mark img { width: 32px; height: 32px; }

.brand-wordmark {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.brand-wordmark .accent { color: var(--accent); }
.brand-wordmark .tld {
  color: var(--muted-soft);
  font-weight: 700;
}
.brand-link-small .brand-mark { width: 44px; height: 44px; }
.brand-link-small .brand-mark img { width: 28px; height: 28px; }
.brand-link-small .brand-wordmark { font-size: clamp(1.55rem, 2vw, 1.95rem); }

.search-form { width: 100%; }
.search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-wrap:focus-within {
  border-color: rgba(42, 102, 255, 0.25);
  box-shadow: 0 24px 60px rgba(42, 102, 255, 0.12), 0 4px 16px rgba(15, 23, 42, 0.04);
}

#domain {
  width: 100%;
  min-width: 0;
  padding: 19px 20px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.3vw, 1.18rem);
}
#domain::placeholder { color: #8a93a5; }

.search-button {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 28px rgba(42, 102, 255, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(42, 102, 255, 0.32);
  filter: saturate(1.05);
}
.search-button:active { transform: translateY(0); }
.search-button:disabled {
  cursor: wait;
  opacity: 0.88;
}
.search-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-message {
  min-height: 1.25rem;
  margin: -2px 0 0;
  color: #c33643;
  text-align: center;
  font-size: 0.95rem;
}

.error-message.notice {
  color: var(--muted);
}

.result-card {
  width: 100%;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.result-domain {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.98rem;
  word-break: break-word;
}
.result-headline {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.result-subheadline {
  margin: 14px 0 0;
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  color: var(--ink);
}
.result-context {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.result-actions { margin-top: 18px; }

.more-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.more-stats {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 12px;
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.96rem;
}
.stat-row strong {
  color: var(--ink);
  text-align: right;
  font-weight: 600;
}

.site-footer {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

.about-page {
  display: block;
  padding: 28px 20px 60px;
}
.about-shell {
  width: min(100%, 840px);
  margin: 0 auto;
}
.about-card {
  padding: 34px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.about-card h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.about-card p {
  margin: 0 0 16px;
  line-height: 1.7;
  color: #263246;
}
.about-card .fine-print {
  color: var(--muted);
  font-size: 0.96rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .app-shell { padding: 22px 14px; }
  .hero { gap: 18px; }
  .brand-link { gap: 10px; padding: 4px; }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .brand-mark img { width: 28px; height: 28px; }
  .brand-wordmark { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .search-wrap { padding: 10px; gap: 10px; border-radius: 24px; }
  #domain { padding: 16px 16px; font-size: 1rem; }
  .search-button { width: 56px; height: 56px; border-radius: 16px; }
  .result-card { padding: 24px; border-radius: 24px; }
  .stat-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .stat-row strong { text-align: left; }
  .about-card { padding: 24px; }
}
