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

:root {
  --bg: #050a18;
  --bg-gradient: linear-gradient(135deg, #050a18 0%, #0d1528 50%, #0a1020 100%);
  --surface: rgba(17, 25, 45, 0.7);
  --surface-hover: rgba(22, 32, 55, 0.85);
  --surface-solid: #111b2d;
  --border: rgba(56, 97, 251, 0.12);
  --border-hover: rgba(56, 97, 251, 0.3);
  --border-glow: rgba(56, 97, 251, 0.5);
  --text: #e4e8f1;
  --text-dim: #6b7a99;
  --text-bright: #f0f4ff;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-hover: #5b9cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --accent-gradient-warm: linear-gradient(135deg, #3b82f6, #06b6d4);
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --orange: #fb923c;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.08);
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection { background: rgba(59,130,246,0.3); color: var(--text-bright); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.35); }
html { scroll-behavior: smooth; scrollbar-color: rgba(59,130,246,0.2) transparent; }

body {
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.container {
  width: 100%;
  max-width: 920px;
  padding: 48px 24px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
header {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeDown 0.7s var(--transition);
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, rgba(139,92,246,0.06) 40%, transparent 70%);
  border-radius: 50%;
  animation: heroBreath 4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 25%, #06b6d4 50%, #8b5cf6 75%, #3b82f6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 4s linear infinite;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  opacity: 0.5;
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 3.5px;
  font-weight: 400;
  margin-top: 8px;
}

/* ===== Search ===== */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  animation: fadeUp 0.6s var(--transition) 0.1s both;
  position: relative;
}

.search-box::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: searchBreath 3s ease-in-out infinite;
  z-index: -1;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.search-input-wrap:focus-within .search-icon { opacity: 0.9; }

.search-input-wrap input {
  width: 100%;
  padding: 17px 42px 17px 46px;
  background: var(--surface);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all 0.35s var(--transition);
}

.search-input-wrap input::placeholder { color: var(--text-dim); transition: color 0.3s; }

.search-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 0 30px rgba(59,130,246,0.1), inset 0 0 20px rgba(59,130,246,0.03);
  background: rgba(17, 25, 45, 0.95);
  animation: borderGlow 2s ease-in-out infinite;
}

.search-input-wrap input:focus::placeholder { color: rgba(107,122,153,0.5); }

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 50%;
  transition: all 0.25s;
  z-index: 2;
}
.clear-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }


.search-box button#searchBtn {
  padding: 17px 40px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 1.5px;
  animation: btnPulse 3s ease-in-out infinite;
}

.btn-text { position: relative; z-index: 1; }

.btn-ripple {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s;
  border-radius: inherit;
}

.search-box button#searchBtn:active .btn-ripple {
  opacity: 1;
  transform: scale(2.5);
  transition: all 0.1s;
}

.search-box button#searchBtn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.search-box button#searchBtn:hover::before { left: 100%; }

.search-box button#searchBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow), 0 0 60px rgba(59,130,246,0.12);
}
.search-box button#searchBtn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.search-box button#searchBtn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  animation: none;
}

.search-box button#searchBtn:disabled {
  cursor: not-allowed;
}

/* ===== Quick Bar ===== */
.quick-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  animation: fadeUp 0.6s var(--transition) 0.15s both;
}

.quick-section { display: flex; align-items: center; gap: 8px; }

.quick-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quick-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.quick-list::-webkit-scrollbar { display: none; }

.quick-item {
  padding: 5px 14px;
  background: rgba(59,130,246,0.05);
  border: 1px solid rgba(59,130,246,0.1);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s var(--transition);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.quick-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}

.quick-item:hover {
  color: var(--text-bright);
  border-color: rgba(59,130,246,0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
}

.quick-item:hover::before { opacity: 1; }

.quick-clear {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.25s;
  flex-shrink: 0;
  padding: 2px 6px;
}
.quick-clear:hover { opacity: 1; color: var(--red); }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 28px;
  background: var(--surface);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  animation: fadeUp 0.6s var(--transition) 0.2s both;
  position: relative;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1;
  padding: 10px 6px 12px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2.5px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: transform 0.3s var(--transition);
}

.tab-icon { font-size: 0.88rem; }

.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.tab:hover::after {
  transform: translateX(-50%) scaleX(0.6);
}

.tab.active {
  background: rgba(59,130,246,0.08);
  color: var(--accent);
  font-weight: 600;
}

.tab.active::after {
  transform: translateX(-50%) scaleX(1);
  box-shadow: 0 0 8px rgba(59,130,246,0.4);
}

/* ===== Result Card ===== */
.result {
  background: var(--surface);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  animation: slideUp 0.5s var(--transition);
  box-shadow: var(--shadow), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.result.result-enter {
  animation: resultEnter 0.5s var(--transition) forwards;
}

@keyframes resultEnter {
  from { opacity: 0.6; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Query meta bar */
.query-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(135deg, rgba(59,130,246,0.03), transparent);
  margin: -30px -30px 20px;
  padding: 16px 28px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.query-domain {
  font-size: 0.82rem;
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(59,130,246,0.08);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(59,130,246,0.12);
  font-weight: 600;
}

.query-time {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.result::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), rgba(139,92,246,0.2), transparent);
}

.result h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.result h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: var(--accent-gradient);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59,130,246,0.3);
  flex-shrink: 0;
}

/* Source badge */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(59,130,246,0.06));
  color: #a78bfa;
  margin-bottom: 16px;
  border: 1px solid rgba(139,92,246,0.15);
  box-shadow: 0 0 16px rgba(139,92,246,0.06);
}

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.25s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(59,130,246,0.08); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ===== Info Grid ===== */
.info-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.info-label, .info-value {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s;
}

.info-label {
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 500;
  position: relative;
  padding-left: 24px;
}

.info-label::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  transition: opacity 0.2s;
}

.info-grid > div:hover .info-label::before,
.info-label:hover::before { opacity: 1; }

.info-value {
  font-size: 0.9rem;
  word-break: break-all;
  color: var(--text);
}

.info-grid > div:nth-child(4n+1),
.info-grid > div:nth-child(4n+2) {
  background: rgba(255,255,255,0.018);
}

.info-grid > div:hover {
  background: rgba(59,130,246,0.04);
}

.info-grid > .info-label:last-of-type,
.info-grid > .info-value:last-child {
  border-bottom: none;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s;
}

.badge-green { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.15); box-shadow: 0 0 12px rgba(52,211,153,0.06); }
.badge-red { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.15); box-shadow: 0 0 12px rgba(248,113,113,0.06); }
.badge-yellow { background: rgba(251,191,36,0.12); color: var(--yellow); border: 1px solid rgba(251,191,36,0.15); box-shadow: 0 0 12px rgba(251,191,36,0.06); }
.badge-purple { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.15); box-shadow: 0 0 12px rgba(139,92,246,0.06); }
.badge-orange { background: rgba(251,146,60,0.12); color: var(--orange); border: 1px solid rgba(251,146,60,0.15); box-shadow: 0 0 12px rgba(251,146,60,0.06); }

/* ===== DNS Table ===== */
.dns-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.dns-table th, .dns-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

.dns-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255,255,255,0.015);
}

.dns-table tr:last-child td { border-bottom: none; }
.dns-table tbody tr { transition: background 0.2s; }
.dns-table tbody tr:hover { background: rgba(59,130,246,0.04); }

/* ===== Port Summary ===== */
.port-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.port-bar-wrap {
  flex: 1;
  max-width: 120px;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.port-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.6s var(--transition);
}

.port-pct {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green);
  min-width: 32px;
}

/* ===== Security Score ===== */
.security-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.security-score-num {
  font-size: 0.9rem;
  padding: 4px 14px;
}

.security-score-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== SSL Ring ===== */
.ssl-ring-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  margin-bottom: 18px;
  transition: all 0.3s var(--transition);
}

.ssl-ring-card:hover {
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ssl-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.ssl-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ssl-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ssl-ring-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
}

.ssl-ring-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.ssl-ring-info { flex: 1; }

.ssl-ring-status { margin-bottom: 6px; }

.ssl-ring-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ===== Redirect ===== */
.redirect-chain { margin-top: 8px; }

.redirect-step {
  padding: 12px 16px;
  font-size: 0.85rem;
  border-left: 2px solid var(--border);
  margin-left: 8px;
  margin-bottom: 4px;
  transition: all 0.3s var(--transition);
  border-radius: 0 8px 8px 0;
  background: rgba(255,255,255,0.01);
}

.redirect-step:hover {
  border-left-color: var(--accent);
  background: rgba(59,130,246,0.04);
  padding-left: 22px;
  box-shadow: inset 3px 0 12px rgba(59,130,246,0.06);
}

/* ===== Subdomain ===== */
.subdomain-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.subdomain-item {
  padding: 9px 14px;
  font-size: 0.84rem;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  word-break: break-all;
  transition: all 0.25s var(--transition);
  position: relative;
  overflow: hidden;
}

.subdomain-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.25s;
}

.subdomain-item:hover {
  background: rgba(59,130,246,0.06);
  border-color: var(--border-hover);
  transform: translateX(4px);
  padding-left: 18px;
}

.subdomain-item:hover::before { opacity: 1; }

.subdomain-item.stagger-in {
  opacity: 0;
  transform: translateY(8px);
  animation: staggerFade 0.35s var(--transition) forwards;
}

@keyframes staggerFade {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Raw Whois ===== */
.raw-whois {
  margin-top: 12px;
  padding: 18px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.7;
  border: 1px solid rgba(255,255,255,0.04);
}

.raw-whois::-webkit-scrollbar { width: 4px; }
.raw-whois::-webkit-scrollbar-track { background: transparent; }
.raw-whois::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

details summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 10px 0;
  transition: color 0.2s;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

details summary:hover { color: var(--accent); }
details[open] summary { color: var(--accent); }

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 52px;
  color: var(--text-dim);
  font-size: 0.95rem;
  animation: fadeUp 0.3s ease;
}

.spinner-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
}

.spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255,255,255,0.04);
  border-top-color: var(--accent);
  border-right-color: rgba(139,92,246,0.4);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.3));
}

.spinner-inner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.04);
  border-bottom-color: rgba(139,92,246,0.6);
  border-left-color: rgba(6,182,212,0.3);
  border-radius: 50%;
  animation: spin 0.5s linear infinite reverse;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#loadingText {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}

.loading-progress {
  width: 220px;
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  margin: 16px auto 0;
  overflow: hidden;
}

.loading-bar {
  width: 40%;
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  animation: loadingSlide 1.2s ease-in-out infinite;
}

/* ===== Error ===== */
.error {
  background: linear-gradient(135deg, rgba(248,113,113,0.06), rgba(239,68,68,0.02));
  border: 1.5px solid rgba(248,113,113,0.18);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--red);
  text-align: center;
  font-size: 0.9rem;
  animation: slideUp 0.3s var(--transition);
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.error::before {
  content: '⚠️';
  display: block;
  font-size: 1.8rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px rgba(248,113,113,0.3));
}

.hidden { display: none !important; }

/* ===== Footer ===== */
footer {
  margin-top: auto;
  padding: 40px 24px;
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

footer::before {
  content: '';
  display: block;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.4), rgba(139,92,246,0.3), transparent);
  margin: 0 auto 20px;
  animation: footerLine 3s ease-in-out infinite;
}

@keyframes footerLine {
  0%, 100% { opacity: 0.5; width: 80px; }
  50% { opacity: 1; width: 140px; }
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.25s;
}
footer a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 12px rgba(59,130,246,0.3);
}

/* ===== Domain Age Card ===== */
.domain-age-card {
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition);
  animation: ageCardIn 0.6s var(--transition) both;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
@keyframes ageCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.domain-age-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  transition: opacity 0.4s;
}
.domain-age-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.03), transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.domain-age-card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.domain-age-card:hover::before { opacity: 0.08; }

/* Card Top Row */
.age-card-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px 16px;
  position: relative;
  z-index: 1;
}

/* Ring */
.age-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  z-index: 1;
}
.age-ring {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}
.age-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 7;
}
.age-ring-fg {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--transition);
  filter: drop-shadow(0 0 6px var(--ring-color, rgba(59,130,246,0.4)));
}
.age-ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  z-index: 2;
}

/* Content */
.age-content { flex: 1; z-index: 1; min-width: 0; }
.age-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  opacity: 0.7;
}
.age-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 6px;
  line-height: 1.2;
}
.age-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.age-days { font-weight: 600; color: var(--text); }
.age-dot { opacity: 0.3; }
.age-desc {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  opacity: 0.7;
  font-style: italic;
}

/* Expiry block */
.age-expiry-block {
  flex-shrink: 0;
  z-index: 1;
  text-align: center;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 130px;
}
.expiry-status {
  font-size: 0.68rem;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.expiry-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.expiry-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}
.expiry-num { font-size: 1.4rem; font-weight: 800; }
.expiry-unit { font-size: 0.7rem; color: var(--text-dim); }
.expiry-date { font-size: 0.65rem; color: var(--text-dim); margin-top: 4px; opacity: 0.6; }
.badge-green .expiry-num { color: var(--green); }
.badge-yellow .expiry-num { color: var(--yellow); }
.badge-red .expiry-num { color: var(--red); }
.expiry-bar {
  margin-top: 8px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.expiry-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s var(--transition);
}
.expiry-bar-fill.green { background: var(--green); }
.expiry-bar-fill.yellow { background: var(--yellow); }
.expiry-bar-fill.red { background: var(--red); }

/* Milestones */
.age-milestones {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px 16px;
  position: relative;
  z-index: 1;
}
.age-milestones::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.age-ms {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.25;
  transition: all 0.3s;
  position: relative;
}
.age-ms.reached {
  opacity: 1;
}
.age-ms-icon { font-size: 1.1rem; }
.age-ms-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.age-ms.reached .age-ms-label { color: var(--text); }

/* === Age Tiers === */
.age-legendary {
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(245,158,11,0.02));
  border: 1px solid rgba(251,191,36,0.2);
  --ring-color: rgba(251,191,36,0.5);
}
.age-legendary::before { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.age-legendary .age-ring-fg { stroke: url(#grad-legendary); }
.age-legendary .age-label { color: #fbbf24; }
.age-legendary .age-number { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.age-veteran {
  background: linear-gradient(135deg, rgba(52,211,153,0.08), rgba(16,185,129,0.02));
  border: 1px solid rgba(52,211,153,0.2);
  --ring-color: rgba(52,211,153,0.5);
}
.age-veteran::before { background: linear-gradient(135deg, #34d399, #10b981); }
.age-veteran .age-ring-fg { stroke: url(#grad-veteran); }
.age-veteran .age-label { color: #34d399; }
.age-veteran .age-number { background: linear-gradient(135deg, #34d399, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.age-mature {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(37,99,235,0.02));
  border: 1px solid rgba(59,130,246,0.2);
  --ring-color: rgba(59,130,246,0.5);
}
.age-mature::before { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.age-mature .age-ring-fg { stroke: url(#grad-mature); }
.age-mature .age-label { color: #3b82f6; }

.age-young {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(124,58,237,0.02));
  border: 1px solid rgba(139,92,246,0.2);
  --ring-color: rgba(139,92,246,0.5);
}
.age-young::before { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.age-young .age-ring-fg { stroke: url(#grad-young); }
.age-young .age-label { color: #8b5cf6; }

.age-new {
  background: linear-gradient(135deg, rgba(248,113,113,0.08), rgba(239,68,68,0.02));
  border: 1px solid rgba(248,113,113,0.2);
  --ring-color: rgba(248,113,113,0.5);
}
.age-new::before { background: linear-gradient(135deg, #f87171, #ef4444); }
.age-new .age-ring-fg { stroke: url(#grad-new); }
.age-new .age-label { color: #f87171; }

/* ===== Screenshot Bar ===== */
.screenshot-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  animation: fadeDown 0.3s var(--transition);
}
.screenshot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  backdrop-filter: blur(12px);
}
.screenshot-btn:hover {
  color: var(--accent);
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.12);
}
.screenshot-btn:active { transform: scale(0.97); }
.screenshot-btn.is-loading { opacity: 0.6; pointer-events: none; }
.screenshot-icon { font-size: 1rem; }

/* ===== Ad Banner ===== */
.ad-banner {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.ad-banner:hover { border-color: var(--border-hover); }

.ad-banner a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ad-banner img { max-height: 60px; border-radius: 6px; }
.ad-banner .ad-text { font-size: 0.9rem; }

.ad-banner .ad-tag {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.6rem;
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: 1px;
}

/* ===== Friend Links ===== */
.friend-links {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 1;
}

.friend-links h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 14px;
  text-align: center;
}

.friend-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.friend-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.3s var(--transition);
}

.friend-link:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  background: rgba(59,130,246,0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.1);
}

.friend-link img { width: 16px; height: 16px; border-radius: 50%; }

/* ===== Toast ===== */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s var(--transition);
  pointer-events: none;
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Animations ===== */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes loadingSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(150%); }
  100% { transform: translateX(-100%); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(59,130,246,0.1); }
  50% { box-shadow: 0 0 40px rgba(59,130,246,0.2); }
}

@keyframes heroBreath {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(59,130,246,0.2); }
  50% { box-shadow: 0 4px 30px rgba(59,130,246,0.35), 0 0 60px rgba(139,92,246,0.1); }
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

@keyframes searchBreath {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes featureIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-glow), 0 0 30px rgba(59,130,246,0.1); }
  50% { box-shadow: 0 0 0 4px rgba(139,92,246,0.2), 0 0 40px rgba(139,92,246,0.1); }
}

@keyframes titleShimmer {
  to { background-position: 200% center; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container { padding: 28px 16px; }
  header h1 { font-size: 1.8rem; }
  header { margin-bottom: 28px; }
  .subtitle { font-size: 0.8rem; letter-spacing: 1.5px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-label { padding-bottom: 2px; border-bottom: none; }
  .info-value { padding-top: 0; }
  .subdomain-list { grid-template-columns: 1fr; }
  .search-box { flex-direction: column; }
  .search-box button#searchBtn { width: 100%; }
  .tabs { gap: 2px; padding: 4px; }
  .tab { padding: 9px 4px; font-size: 0.75rem; }
  .tab-icon { display: none; }
  .domain-age-card { padding: 0; }
  .age-card-top { flex-wrap: wrap; padding: 16px 18px 12px; gap: 12px; }
  .age-ring-wrap { width: 60px; height: 60px; }
  .age-ring { width: 60px; height: 60px; }
  .age-ring-icon { font-size: 1.4rem; }
  .age-number { font-size: 1.2rem; }
  .age-label { font-size: 0.68rem; letter-spacing: 1px; }
  .age-expiry-block { min-width: unset; width: 100%; text-align: center; padding: 8px 12px; }
  .expiry-bar { margin-top: 6px; }
  .age-milestones { padding: 10px 18px 14px; }
  .age-ms-icon { font-size: 0.9rem; }
  .age-ms-label { font-size: 0.55rem; }
  .screenshot-bar { justify-content: center; }
  .expiry-days { white-space: nowrap; }
  .quick-bar { gap: 6px; }
  .result { padding: 20px 16px; }
}

/* ===== Feature Cards ===== */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s var(--transition) 0.25s both;
}

.feature-card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.35s var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  animation: featureIn 0.5s var(--transition) forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.3s; }
.feature-card:nth-child(2) { animation-delay: 0.36s; }
.feature-card:nth-child(3) { animation-delay: 0.42s; }
.feature-card:nth-child(4) { animation-delay: 0.48s; }
.feature-card:nth-child(5) { animation-delay: 0.54s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.66s; }
.feature-card:nth-child(8) { animation-delay: 0.72s; }

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(59,130,246,0.12), 0 0 0 1px rgba(59,130,246,0.08);
}

.feature-card:hover::before { opacity: 1; }

.feature-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--transition), height 0.5s var(--transition);
  z-index: -1;
}

.feature-card:hover::after {
  width: 220px;
  height: 220px;
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.feature-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.feature-cards.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

@media (max-width: 640px) {
  .feature-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .feature-card { padding: 14px 10px; }
  .feature-icon { font-size: 1.4rem; margin-bottom: 6px; }
  .feature-name { font-size: 0.8rem; }
  .feature-desc { font-size: 0.68rem; }
}
