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

:root {
  --blue:       #0066ff;
  --blue-dark:  #0052cc;
  --bg:         #f8fafc;
  --card:       #ffffff;
  --text:       #0f172a;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --green:      #059669;
  --red:        #dc2626;
  --header-bg:  #0f172a;
  --r:          12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: 15px;
}

/* ── Header ── */
.site-header {
  background: var(--header-bg);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo img { display: block; height: 38px; }
.header-back {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.header-back:hover { color: #fff; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
}
.hero-inner { max-width: 620px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.hero p {
  color: rgba(255,255,255,0.72);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

/* ── Search bar ── */
.search-wrap {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
  margin: 0 auto;
}
.search-wrap input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 9px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.search-wrap input:focus {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.15);
}
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-btn:hover { background: var(--blue-dark); }
.search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Main section ── */
.tool-section {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
}

/* ── States ── */
.state-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.state-empty i { font-size: 2.5rem; opacity: 0.18; display: block; margin-bottom: 1rem; }
.state-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result card ── */
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

.result-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.result-domain {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--text);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.875rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-badge.registered {
  background: #dcfce7;
  color: #166534;
}
.status-badge.available {
  background: #dbeafe;
  color: #1e40af;
}
.status-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Info grid ── */
.result-body { padding: 1.5rem; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.info-item {}
.info-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.info-value.mono { font-family: 'Courier New', monospace; }

/* ── Status tags ── */
.status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.status-tag.active { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* ── Nameservers ── */
.ns-section { margin-top: 1.25rem; }
.ns-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.ns-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ns-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text);
}
.ns-item i { color: var(--text-muted); font-size: 0.75rem; }

/* ── RDAP notice ── */
.rdap-notice {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #92400e;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

/* ── Error ── */
.error-card {
  background: var(--card);
  border: 1px solid #fecaca;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
  animation: fadeIn 0.25s ease;
}
.error-card i { font-size: 2rem; color: var(--red); margin-bottom: 0.75rem; display: block; }
.error-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.error-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ── Footer ── */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.75);
  padding: 1.25rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; }
.footer-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}
.footer-cta:hover { background: var(--blue-dark); }
.footer-home {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}
.footer-home:hover { color: #fff; }

@media (max-width: 600px) {
  .search-wrap { flex-direction: column; }
  .info-grid { grid-template-columns: 1fr; }
  .result-head { flex-direction: column; align-items: flex-start; }
  .hero { padding: 2rem 1rem 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
