/* DNS Intelligence Pro - Main Stylesheet */
/* Design: Dark-first, glassmorphism, enterprise SaaS */

/* ── Google Fonts ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ──────────────────────────────────── */
:root {
  /* Brand palette */
  --brand-blue:    #3B82F6;
  --brand-violet:  #7C3AED;
  --brand-cyan:    #06B6D4;
  --brand-emerald: #10B981;
  --brand-amber:   #F59E0B;
  --brand-rose:    #F43F5E;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, #3B82F6 0%, #7C3AED 100%);
  --grad-hero:     linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #0F172A 100%);
  --grad-card:     linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  --grad-glow:     radial-gradient(600px at 50% 200px, rgba(59,130,246,0.15), transparent 80%);

  /* Dark mode (default) */
  --bg-base:       #050B14;
  --bg-surface:    #0F172A;
  --bg-elevated:   #1E293B;
  --bg-card:       rgba(15, 23, 42, 0.8);
  --bg-glass:      rgba(255, 255, 255, 0.04);
  --bg-glass-hover:rgba(255, 255, 255, 0.08);

  --border:        rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.16);

  --text-primary:  #F1F5F9;
  --text-secondary:#94A3B8;
  --text-muted:    #475569;
  --text-inverse:  #0F172A;

  /* Glows */
  --glow-blue:   0 0 40px rgba(59, 130, 246, 0.3);
  --glow-violet: 0 0 40px rgba(124, 58, 237, 0.3);

  /* Sizing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-pill:9999px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ── Light Mode ──────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:        #F8FAFC;
  --bg-surface:     #FFFFFF;
  --bg-elevated:    #F1F5F9;
  --bg-card:        rgba(255, 255, 255, 0.9);
  --bg-glass:       rgba(0, 0, 0, 0.03);
  --bg-glass-hover: rgba(0, 0, 0, 0.06);
  --border:         rgba(0, 0, 0, 0.08);
  --border-hover:   rgba(0, 0, 0, 0.16);
  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --grad-hero:      linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 50%, #EFF6FF 100%);
  --grad-glow:      radial-gradient(600px at 50% 200px, rgba(59,130,246,0.1), transparent 80%);
  --glow-blue:      0 4px 40px rgba(59, 130, 246, 0.15);
  --glow-violet:    0 4px 40px rgba(124, 58, 237, 0.15);
}

/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Animated Background ─────────────────────────────── */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-animated::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation: drift1 20s ease-in-out infinite;
}

.bg-animated::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.07) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation: drift2 25s ease-in-out infinite;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, -40px) scale(1.1); }
  66%       { transform: translate(-40px, 60px) scale(0.9); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-50px, 30px) scale(1.05); }
  66%       { transform: translate(30px, -50px) scale(0.95); }
}

/* ── Navigation ──────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 11, 20, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.85);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-name span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn:active::after { opacity: 0.1; }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.1);
  color: var(--brand-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

.btn-sm   { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg   { padding: 0.875rem 2rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--brand-blue);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s 0.1s var(--ease-out) both;
}

.gradient-text {
  background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s var(--ease-out) both;
}

/* ── Search Box ──────────────────────────────────────── */
.search-container {
  max-width: 680px;
  margin: 0 auto 3rem;
  animation: fadeInUp 0.6s 0.3s var(--ease-out) both;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  backdrop-filter: blur(20px);
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}
[data-theme="light"] .search-box {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}

.search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2), 0 0 0 3px rgba(59,130,246,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-family: var(--font-sans);
  min-width: 0;
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
  flex-shrink: 0;
  padding: 0.75rem 1.75rem;
  border-radius: calc(var(--radius-xl) - 4px);
  background: var(--grad-primary);
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-btn:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(59,130,246,0.4); }

/* ── Stats Counter ───────────────────────────────────── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  animation: fadeInUp 0.6s 0.4s var(--ease-out) both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Section ─────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.875rem;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.container { max-width: 1200px; margin: 0 auto; }

/* ── Feature Cards ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.875rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59,130,246,0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.icon-blue   { background: rgba(59,130,246,0.15); color: #60A5FA; }
.icon-violet { background: rgba(124,58,237,0.15);  color: #A78BFA; }
.icon-cyan   { background: rgba(6,182,212,0.15);   color: #22D3EE; }
.icon-emerald{ background: rgba(16,185,129,0.15);  color: #34D399; }
.icon-amber  { background: rgba(245,158,11,0.15);  color: #FCD34D; }
.icon-rose   { background: rgba(244,63,94,0.15);   color: #FB7185; }

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Results Panel ───────────────────────────────────── */
#results-section {
  display: none;
  position: relative;
  z-index: 1;
  padding: 0 1.5rem 4rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.results-domain {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.domain-badge {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Tabs ────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -0.01em;
}

.card-title i { color: var(--brand-blue); }

.card-body { padding: 1.5rem; }

/* ── Grid Layouts ────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }

/* ── Stat Cards ──────────────────────────────────────── */
.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.stat-card:hover { border-color: var(--border-hover); }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-card-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── DNS Record Tables ───────────────────────────────── */
.dns-records-grid {
  display: grid;
  gap: 1.25rem;
}

.record-group { }

.record-type-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.record-type-header:hover { background: var(--bg-glass-hover); }

.record-type-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.badge-A     { background: rgba(59,130,246,0.15);  color: #60A5FA; }
.badge-AAAA  { background: rgba(6,182,212,0.15);   color: #22D3EE; }
.badge-MX    { background: rgba(124,58,237,0.15);  color: #A78BFA; }
.badge-NS    { background: rgba(16,185,129,0.15);  color: #34D399; }
.badge-TXT   { background: rgba(245,158,11,0.15);  color: #FCD34D; }
.badge-CNAME { background: rgba(244,63,94,0.15);   color: #FB7185; }
.badge-SOA   { background: rgba(249,115,22,0.15);  color: #FB923C; }
.badge-SRV   { background: rgba(20,184,166,0.15);  color: #2DD4BF; }
.badge-PTR   { background: rgba(139,92,246,0.15);  color: #C4B5FD; }
.badge-CAA   { background: rgba(236,72,153,0.15);  color: #F472B6; }

.record-count {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.record-count .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.record-table-wrap {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}

.record-table {
  width: 100%;
  border-collapse: collapse;
}

.record-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.625rem 1rem;
  text-align: left;
}

.record-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  vertical-align: top;
  word-break: break-all;
}

.record-table tr:hover td { background: var(--bg-glass); }

.mono { font-family: var(--font-mono); font-size: 0.825rem; }

/* ── Security Panel ──────────────────────────────────── */
.security-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.security-score-ring svg { transform: rotate(-90deg); }

.security-score-ring .ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.security-score-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease-out);
}

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

.score-number {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.security-checks {
  display: grid;
  gap: 0.875rem;
}

.security-check-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  transition: all 0.2s ease;
}

.check-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.check-pass { background: rgba(16,185,129,0.15); color: #34D399; }
.check-fail { background: rgba(244,63,94,0.15);  color: #FB7185; }
.check-warn { background: rgba(245,158,11,0.15); color: #FCD34D; }

.check-info h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.check-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  word-break: break-all;
  line-height: 1.5;
}

/* ── Progress Bar ────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s var(--ease-out);
  background: var(--grad-primary);
}

/* ── Propagation ─────────────────────────────────────── */
.propagation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem;
}

.prop-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  transition: border-color 0.2s ease;
}

.prop-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prop-ok  { background: var(--brand-emerald); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.prop-err { background: var(--brand-rose);    box-shadow: 0 0 8px rgba(244,63,94,0.5); }

.prop-info { flex: 1; min-width: 0; }
.prop-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.prop-ip   { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.prop-time { font-size: 0.75rem; color: var(--text-muted); text-align: right; flex-shrink: 0; }

/* ── Status Badges ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.25); }
.badge-error   { background: rgba(244,63,94,0.15);  color: #FB7185; border: 1px solid rgba(244,63,94,0.25); }
.badge-warning { background: rgba(245,158,11,0.15); color: #FCD34D; border: 1px solid rgba(245,158,11,0.25); }
.badge-info    { background: rgba(59,130,246,0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.25); }
.badge-neutral { background: var(--bg-elevated);    color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Overview Cards ──────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.overview-item {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
}

.overview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.overview-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}

/* ── Skeleton Loaders ────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-glass-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text  { height: 1rem; margin-bottom: 0.75rem; }
.skeleton-title { height: 1.5rem; width: 60%; margin-bottom: 1rem; }
.skeleton-card  { height: 120px; border-radius: var(--radius-md); }

/* ── Toast Notifications ─────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: slideInRight 0.3s var(--ease-out) both;
}

.toast.removing { animation: slideOutRight 0.3s var(--ease-in-out) both; }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--brand-emerald); }
.toast-error   .toast-icon { color: var(--brand-rose); }
.toast-info    .toast-icon { color: var(--brand-blue); }
.toast-warning .toast-icon { color: var(--brand-amber); }

.toast-msg { flex: 1; font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.25rem;
  flex-shrink: 0;
}

/* ── Loading State ───────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand-blue);
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.loading-step.done { color: var(--brand-emerald); }
.loading-step.active { color: var(--text-primary); }

/* ── Raw Data ────────────────────────────────────────── */
.raw-pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow: auto;
  max-height: 600px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── FAQ ─────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.open { border-color: rgba(59,130,246,0.3); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-glass);
  user-select: none;
  gap: 1rem;
  transition: background 0.2s ease;
}

.faq-question:hover { background: var(--bg-glass-hover); }

.faq-chevron {
  transition: transform 0.3s var(--ease-out);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}

.faq-item.open .faq-answer { max-height: 400px; }

.faq-answer-inner {
  padding: 1.125rem 1.375rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border);
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3.5rem 1.5rem 2rem;
  background: var(--bg-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── History Panel ───────────────────────────────────── */
.history-panel {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-out);
  overflow-y: auto;
  padding: 1.5rem;
}

.history-panel.open { transform: translateX(0); }

.history-list { display: flex; flex-direction: column; gap: 0.625rem; }

.history-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-glass);
}

.history-item:hover { border-color: var(--border-hover); background: var(--bg-glass-hover); }

.history-icon { color: var(--text-muted); font-size: 0.875rem; flex-shrink: 0; }
.history-domain { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.history-time   { font-size: 0.75rem; color: var(--text-muted); }

/* ── Theme Toggle ────────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.theme-toggle:hover { color: var(--text-primary); background: var(--bg-glass-hover); }

/* ── Divider ─────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ── Utility ─────────────────────────────────────────── */
.text-success { color: var(--brand-emerald) !important; }
.text-error   { color: var(--brand-rose) !important; }
.text-warning { color: var(--brand-amber) !important; }
.text-info    { color: var(--brand-blue) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-mono    { font-family: var(--font-mono); }

.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden   { display: none !important; }

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-secondary { display: none; }
  .nav-mobile-toggle { display: flex; }

  .hero { padding: 4.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero p  { font-size: 1rem; }
  .hero-stats { gap: 1.75rem; }

  .search-box  { padding: 0.375rem 0.375rem 0.375rem 1rem; }
  .search-input{ font-size: 0.9375rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand p { max-width: 100%; }

  .results-header { flex-direction: column; align-items: flex-start; }
  .history-panel { width: 100%; }

  .tabs { gap: 0; }
  .tab-btn { padding: 0.625rem 0.875rem; font-size: 0.8125rem; }
}

@media (max-width: 480px) {
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; }
  .propagation-grid { grid-template-columns: 1fr; }
  .search-btn span { display: none; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  .navbar, .bg-animated, .toast-container, .loading-overlay, .history-panel { display: none !important; }
  body { background: white; color: black; }
}
