/* ===== Variables ===== */
:root {
  --bg-body: #06060b;
  --bg-card: rgba(12, 12, 20, 0.85);
  --bg-input: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #e8edf5;
  --text-secondary: #8b95a8;
  --text-muted: #555e6e;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-cyan: #06b6d4;
  --accent-orange: #f97316;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

/* ===== Light Theme ===== */
[data-theme="light"] {
  --bg-body: #f5f7fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-input: rgba(0, 0, 0, 0.03);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text-primary: #1a1d23;
  --text-secondary: #5a6375;
  --text-muted: #9aa3b4;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(59,130,246,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.04) 0%, transparent 60%);
}
[data-theme="light"] .header { background: rgba(245,247,250,0.85); }
[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .nav-link.active { background: transparent; }
[data-theme="light"] .export-trigger:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .export-panel { background: rgba(255,255,255,0.95); }
[data-theme="light"] .toast { background: rgba(255,255,255,0.95); }
[data-theme="light"] .export-btn:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .info-item,
[data-theme="light"] .geo-item,
[data-theme="light"] .speed-metric,
[data-theme="light"] .dns-record,
[data-theme="light"] .security-check,
[data-theme="light"] .pwgen-output,
[data-theme="light"] .pwgen-toggle,
[data-theme="light"] .about-feature,
[data-theme="light"] .breach-item { background: rgba(0,0,0,0.02); }
[data-theme="light"] .breach-tabs { background: rgba(0,0,0,0.02); }
[data-theme="light"] .breach-tab.active { background: rgba(0,0,0,0.06); }
[data-theme="light"] .pwgen-slider { background: rgba(0,0,0,0.08); }
[data-theme="light"] .toggle-track { background: rgba(0,0,0,0.1); }
[data-theme="light"] .pwgen-strength { background: rgba(0,0,0,0.06); }
[data-theme="light"] .gauge-bg { stroke: rgba(0,0,0,0.06); }
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
[data-theme="light"] .leaflet-container { background: #e8e8e8; }
[data-theme="light"] .leaflet-tile-pane { filter: brightness(1) contrast(1) saturate(1); }
[data-theme="light"] .leaflet-control-zoom a { background: rgba(255,255,255,0.9) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .footer-github:hover,
[data-theme="light"] .footer-link:hover { background: rgba(0,0,0,0.06); }
[data-theme="light"] .btn--run-all:hover { background: #7c3aed; }
[data-theme="light"] .hamburger-line { background: var(--text-primary); }
[data-theme="light"] .mobile-drawer { background: rgba(245,247,250,0.98); }
[data-theme="light"] .drawer-backdrop { background: rgba(0,0,0,0.3); }
[data-theme="light"] .drawer-close:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .mobile-nav-link:hover,
[data-theme="light"] .mobile-nav-link.active { background: rgba(0,0,0,0.04); }
[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .btn-login:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .user-dropdown { background: rgba(255,255,255,0.95); }
[data-theme="light"] .user-dropdown-item:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .results-panel-inner { background: var(--bg-body); }
[data-theme="light"] .result-history-card { background: rgba(0,0,0,0.02); }

/* ===== Loading Screen ===== */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-body);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-screen-inner { text-align: center; }
.loading-logo { color: var(--accent-blue); animation: loading-pulse 1.5s ease-in-out infinite; }
@keyframes loading-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.loading-text {
  display: block; font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; margin-top: 16px; color: var(--text-primary);
}
.loading-bar {
  width: 120px; height: 3px; margin: 20px auto 0;
  background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
}
[data-theme="light"] .loading-bar { background: rgba(0,0,0,0.06); }
.loading-bar-fill {
  height: 100%; width: 30%; border-radius: 2px;
  background: var(--accent-blue); animation: loading-slide 1.2s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  padding: 8px; border-radius: 8px;
  color: var(--text-secondary); transition: all var(--transition);
}
.theme-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.theme-icon--light { display: none; }
[data-theme="light"] .theme-icon--dark { display: none; }
[data-theme="light"] .theme-icon--light { display: block; }

/* ===== Logo Image Variants ===== */
.logo-img { height: 32px; width: auto; display: block; }
.logo-img--light { display: none; }
[data-theme="light"] .logo-img--dark { display: none; }
[data-theme="light"] .logo-img--light { display: block; }
.hero-logo { height: 48px; width: auto; display: block; }
.hero-logo--light { display: none; }
[data-theme="light"] .hero-logo--dark { display: none; }
[data-theme="light"] .hero-logo--light { display: block; }

/* ===== Hamburger (mobile only) ===== */
.hamburger { display: none; }

/* ===== Mobile Drawer ===== */
.drawer-backdrop { display: none; }
.mobile-drawer { display: none; }

/* ===== Auth UI ===== */
.btn-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-login:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(255,255,255,0.05); }
.user-menu { display: flex; align-items: center; position: relative; }
.user-avatar-btn { padding: 2px; border-radius: 50%; transition: all var(--transition); }
.user-avatar-btn:hover { box-shadow: 0 0 0 2px var(--accent-blue); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.user-avatar-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; padding: 8px;
  background: rgba(12,12,20,0.95); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.25s ease; z-index: 99;
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-header { padding: 8px 12px; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: var(--radius-xs); font-size: 13px;
  color: var(--text-secondary); transition: all var(--transition);
}
.user-dropdown-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* ===== Results Panel ===== */
.results-panel {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: flex-end;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.results-panel.open { opacity: 1; visibility: visible; }
.results-panel-inner {
  width: 100%; max-width: 480px; height: 100%;
  background: var(--bg-body); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.results-panel.open .results-panel-inner { transform: translateX(0); }
.results-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.results-panel-header h3 { font-size: 16px; font-weight: 600; }
.results-panel-close {
  font-size: 24px; color: var(--text-muted); padding: 4px 8px;
  border-radius: 6px; transition: all var(--transition); line-height: 1;
}
.results-panel-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.results-list { padding: 16px 24px; flex: 1; }
.results-empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 40px 0; }
.result-history-card {
  padding: 16px; margin-bottom: 12px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.result-history-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.result-history-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.result-history-delete {
  font-size: 18px; color: var(--text-muted); padding: 2px 6px; border-radius: 4px;
  transition: all var(--transition); line-height: 1;
}
.result-history-delete:hover { color: var(--accent-red); background: rgba(239,68,68,0.1); }
.result-history-item {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border);
}
.result-history-item:last-child { border-bottom: none; }
.result-history-label { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.result-history-item span:last-child { font-family: var(--font-mono); font-size: 12px; text-align: right; }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(59,130,246,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select { font-family: inherit; color: inherit; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6,6,11,0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.logo-icon { width: 26px; height: 26px; color: var(--accent-blue); }
.nav { display: flex; gap: 4px; }
.nav-link {
  position: relative; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); transition: color 0.2s ease, background 0.2s ease;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px;
  background: var(--accent-blue); border-radius: 1px; transform: translateX(-50%);
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text-primary); background: transparent; }
.nav-link.active::after { width: 60%; }
.export-trigger { padding: 8px; border-radius: 8px; color: var(--text-secondary); transition: all var(--transition); }
.export-trigger:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* ===== Export Panel ===== */
.export-panel {
  position: fixed; top: 64px; right: 24px; z-index: 99;
  background: rgba(12,12,20,0.95); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.25s ease;
}
.export-panel.open { opacity: 1; visibility: visible; transform: translateY(8px); }
.export-panel-inner { padding: 20px; }
.export-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.export-actions { display: flex; flex-direction: column; gap: 6px; }
.export-btn {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition); white-space: nowrap;
}
.export-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* ===== Hero ===== */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px; overflow: hidden;
}
.hero-bg-pattern {
  position: absolute; inset: 0;
  background-image: url('../images/bg-pattern.svg'); background-repeat: repeat;
  opacity: 0.5; pointer-events: none;
}
[data-theme="light"] .hero-bg-pattern { filter: invert(1); opacity: 0.3; }
.hero-content {
  max-width: 720px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.hero-badge {
  display: inline-flex; align-items: center;
  padding: 6px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.15);
}
.hero-title { display: flex; justify-content: center; }
.hero-tagline {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3;
  color: var(--text-primary); max-width: 600px;
}
.hero-subtitle {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7; max-width: 540px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; font-size: 15px; margin-top: 8px;
  background: var(--accent-blue); color: #fff; border-radius: var(--radius-sm);
  font-weight: 600; transition: background 0.2s ease;
}
.hero-cta:hover { background: #2563eb; }
.hero-features {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px;
}
.hero-feature {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: border-color 0.3s ease;
}
.hero-feature:hover { border-color: var(--border-hover); }
.hero-feature-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-feature-icon--blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.hero-feature-icon--purple { background: rgba(139,92,246,0.12); color: var(--accent-purple); }
.hero-feature-icon--red { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.hero-feature-icon--green { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.hero-feature-icon--cyan { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }

/* ===== Main ===== */
.main {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 84px 24px 40px;
  display: flex; flex-direction: column; gap: 20px;
}
.main--has-hero { padding-top: 20px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); transform: translateY(-2px); }
.card--wide { width: 100%; }
.card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.card-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-icon--blue { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.card-icon--green { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.card-icon--purple { background: rgba(139,92,246,0.12); color: var(--accent-purple); }
.card-icon--red { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.card-icon--cyan { background: rgba(6,182,212,0.12); color: var(--accent-cyan); }
.card-icon--orange { background: rgba(249,115,22,0.12); color: var(--accent-orange); }
.card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== IP & Location (combined) ===== */
.ip-location-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.ip-hero { margin-bottom: 20px; }
.ip-label {
  display: block; font-size: 11px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.ip-address {
  display: block; font-family: var(--font-mono); font-size: 32px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--accent-blue);
}
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.info-item {
  padding: 12px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
}
.info-label {
  display: block; font-size: 10px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.info-value { display: block; font-size: 13px; font-weight: 500; font-family: var(--font-mono); word-break: break-all; }
.geo-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.geo-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-xs); border: 1px solid var(--border);
}
.geo-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.geo-value { font-size: 12px; font-weight: 500; font-family: var(--font-mono); }
.map-col { display: flex; flex-direction: column; }
.map-container {
  flex: 1; min-height: 340px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); background: rgba(255,255,255,0.02);
}

/* ===== Speed Test ===== */
.speed-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px; align-items: center; margin-bottom: 28px;
}
.speed-gauge-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-ring {
  position: relative; width: 220px; height: 220px;
  transition: filter 0.4s ease;
}
.gauge-ring svg { width: 100%; height: 100%; }
#gauge-circle { transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.gauge-ring.active { filter: drop-shadow(0 0 20px rgba(139,92,246,0.3)); }
.gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-number {
  font-family: var(--font-mono); font-size: 44px; font-weight: 700;
  line-height: 1; letter-spacing: -0.03em;
}
.gauge-unit { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.speed-phase {
  margin-top: 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); min-height: 20px;
  transition: color 0.3s ease;
}
.speed-phase.active { color: var(--accent-purple); }
.speed-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.speed-metric {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 16px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  text-align: center; transition: border-color 0.3s ease, transform 0.2s ease;
}
.speed-metric:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.metric-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.metric-icon--ping { background: rgba(249,115,22,0.12); color: var(--accent-orange); }
.metric-icon--download { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.metric-icon--upload { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.metric-icon--jitter { background: rgba(139,92,246,0.12); color: var(--accent-purple); }
.metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.metric-row { display: flex; align-items: baseline; gap: 4px; }
.metric-value { font-family: var(--font-mono); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.metric-unit { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ===== Speed Test Progress Bar ===== */
.speed-progress-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; width: 100%; max-width: 220px;
}
.speed-progress-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden;
}
[data-theme="light"] .speed-progress-bar { background: rgba(0,0,0,0.06); }
.speed-progress-fill {
  height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan), var(--accent-green));
  transition: width 0.4s ease;
}
.speed-progress-text {
  font-size: 11px; font-weight: 600; font-family: var(--font-mono);
  color: var(--text-muted); min-width: 28px; text-align: right;
}

/* Pulse animation for active gauge */
@keyframes gauge-pulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(139,92,246,0.25)); }
  50% { filter: drop-shadow(0 0 28px rgba(139,92,246,0.45)); }
}
.gauge-ring.active { animation: gauge-pulse 2s ease-in-out infinite; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; transition: all var(--transition);
  border: 1px solid transparent; white-space: nowrap; flex-shrink: 0;
}
.btn--primary { background: var(--accent-blue); color: #fff; }
.btn--primary:hover { background: #2563eb; }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--danger { background: var(--accent-red); color: #fff; }
.btn--danger:hover { background: #dc2626; }
.btn--danger:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--full { width: 100%; justify-content: center; padding: 14px; }

/* ===== Inputs ===== */
.input-row { display: flex; gap: 10px; margin-bottom: 12px; }
.input-wrapper { flex: 1; position: relative; }
.input-field {
  width: 100%; padding: 12px 16px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  color: var(--text-primary); transition: all var(--transition); outline: none;
}
.input-wrapper .input-field { padding-right: 44px; }
.input-field:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.input-field::placeholder { color: var(--text-muted); }
.input-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 6px; color: var(--text-muted); transition: color var(--transition);
}
.input-toggle:hover { color: var(--text-primary); }
.input-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.input-hint strong { color: var(--text-secondary); }

/* ===== Breach Check ===== */
.breach-tabs {
  display: flex; gap: 4px; margin-bottom: 24px; padding: 4px;
  background: rgba(255,255,255,0.03); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.breach-tab {
  flex: 1; padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition);
}
.breach-tab:hover { color: var(--text-primary); }
.breach-tab.active { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.security-notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius-xs);
  font-size: 12px; line-height: 1.5; margin-bottom: 20px;
}
.security-notice svg { flex-shrink: 0; margin-top: 1px; }
.security-notice--green { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15); color: var(--accent-green); }
.security-notice--blue { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15); color: var(--accent-blue); }
.breach-result { min-height: 20px; }

/* Breach result cards */
.result-card {
  padding: 24px; text-align: center; border-radius: var(--radius-sm);
}
.result-card--safe { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15); }
.result-card--danger { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15); }
.result-card--info { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15); }
.result-icon { font-size: 36px; margin-bottom: 10px; }
.result-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.result-sub { font-size: 13px; color: var(--text-muted); }
.result-card--safe .result-title { color: var(--accent-green); }
.result-card--danger .result-title { color: var(--accent-red); }
.result-card--info .result-title { color: var(--accent-blue); }

/* Breach list from email check */
.breach-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin-top: 16px; max-height: 260px; overflow-y: auto; padding-right: 4px;
}
.breach-item {
  padding: 10px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 13px;
}
.breach-item-name { font-weight: 500; margin-bottom: 2px; }
.breach-item-domain { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ===== DNS & Security Scan ===== */
.scan-section {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.scan-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.dns-record {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  margin-bottom: 6px; font-family: var(--font-mono); font-size: 12px;
}
.dns-record-type { color: var(--accent-cyan); font-weight: 600; min-width: 50px; }
.dns-record-value { color: var(--text-secondary); word-break: break-all; flex: 1; }
.dns-record-ttl { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.security-check {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-xs); margin-bottom: 8px;
}
.check-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; font-weight: 700;
}
.check-icon--pass { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.check-icon--warn { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.check-icon--fail { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.check-icon--info { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.check-name { font-size: 13px; font-weight: 500; }
.check-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.check-value { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); margin-top: 2px; word-break: break-all; }

/* ===== Loading ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 4px; min-width: 60px; display: inline-block;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.loading-dots::after {
  content: ''; animation: dots 1.5s infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ===== Hidden / Toast / Footer ===== */
.hidden { display: none !important; }
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px; background: rgba(16,16,28,0.95);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s ease;
  backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.footer {
  position: relative; z-index: 1; text-align: center;
  padding: 32px 24px; font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.footer-copy { color: var(--text-secondary); }
.footer-copy a { color: var(--accent-blue); }
.footer-copy a:hover { text-decoration: underline; }
.footer-note { color: var(--text-muted); }
.footer-github {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 6px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 12px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition);
}
.footer-github:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: var(--border-hover); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ip-location-layout { grid-template-columns: 1fr; }
  .map-container { min-height: 240px; }
  .login-text { display: none; }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .nav { display: none; }
  .btn-login { display: none; }
  .user-menu { display: none !important; }
  .hamburger {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px; border-radius: 8px; transition: all var(--transition);
  }
  .hamburger:hover { background: rgba(255,255,255,0.05); }
  .hamburger-line {
    display: block; width: 20px; height: 2px;
    background: var(--text-primary); border-radius: 1px; transition: all 0.3s ease;
  }
  .hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
  .hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .drawer-backdrop {
    display: block; position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .drawer-backdrop.open { opacity: 1; visibility: visible; }
  .mobile-drawer {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 85vw;
    z-index: 200;
    background: rgba(6,6,11,0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .mobile-drawer.open { transform: translateX(0); }
  .drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border); min-height: 64px;
  }
  .drawer-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
  .drawer-close {
    padding: 8px; border-radius: 8px; color: var(--text-secondary); transition: all var(--transition);
  }
  .drawer-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
  .mobile-nav { padding: 12px 16px; flex: 1; }
  .mobile-nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 500; width: 100%; text-align: left;
    color: var(--text-secondary); transition: all var(--transition);
  }
  .mobile-nav-link:hover, .mobile-nav-link.active { color: var(--text-primary); background: rgba(255,255,255,0.06); }
  .mobile-nav-link--static { pointer-events: none; }
  .mobile-menu-divider { height: 1px; background: var(--border); margin: 8px 0; }
  .hero { min-height: auto; padding: 100px 16px 48px; }
  .hero-tagline { font-size: 22px; }
  .hero-subtitle { font-size: 14px; }
  .hero-features { gap: 8px; }
  .hero-feature { padding: 8px 12px; font-size: 12px; }
  .hero-feature-icon { width: 28px; height: 28px; }
  .hero-logo { height: 36px; }
  .main { padding: 76px 16px 24px; gap: 16px; }
  .main--has-hero { padding-top: 16px; }
  .card { padding: 20px; overflow-wrap: break-word; word-break: break-word; }
  .ip-address { font-size: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .geo-details { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .input-field { padding: 14px 16px; font-size: 16px; }
  .btn { min-height: 44px; padding: 12px 20px; font-size: 14px; }
  .breach-tab { min-height: 44px; padding: 10px 12px; }
  .breach-list { grid-template-columns: 1fr; }
  .dns-record { flex-wrap: wrap; }
  .export-panel { right: 16px; left: 16px; }
  .pwgen-options { grid-template-columns: 1fr; }
  .pwgen-password { font-size: 14px; }
  .about-features { grid-template-columns: 1fr; }
  .about-title { font-size: 24px; }
  .btn--run-all { font-size: 0; gap: 0; padding: 8px; }
  .btn--run-all svg { width: 18px; height: 18px; }
  .map-container { min-height: 200px; }
  .results-panel-inner { max-width: 100%; }
}

/* ===== Leaflet overrides ===== */
.leaflet-container { background: #0a0a14; }
.leaflet-tile-pane { filter: brightness(0.7) contrast(1.1) saturate(0.3); }
.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom a {
  background: rgba(12,12,20,0.9) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}

/* ===== HIBP link ===== */
.hibp-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 8px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 12px;
  color: var(--accent-blue); transition: all var(--transition);
}
.hibp-link:hover { background: rgba(255,255,255,0.08); border-color: var(--accent-blue); }

/* ===== Header Actions ===== */
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn--run-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: #fff; background: var(--accent-purple);
  transition: all var(--transition); white-space: nowrap;
}
.btn--run-all:hover { background: #7c3aed; }
.btn--run-all:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Password Generator ===== */
.pwgen-output {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.pwgen-password {
  flex: 1; font-family: var(--font-mono); font-size: 18px;
  font-weight: 500; letter-spacing: 0.03em; word-break: break-all;
  color: var(--accent-green); user-select: all;
}
.pwgen-copy {
  padding: 8px; border-radius: 8px; color: var(--text-secondary);
  transition: all var(--transition); flex-shrink: 0;
}
.pwgen-copy:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.pwgen-strength {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px;
  overflow: hidden; margin-bottom: 6px;
}
.pwgen-strength-bar {
  height: 100%; width: 0; border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
}
.pwgen-strength-label {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  margin-bottom: 20px;
}
.pwgen-controls { margin-bottom: 20px; }
.pwgen-slider-group { margin-bottom: 18px; }
.pwgen-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; display: block; }
.pwgen-label strong { color: var(--accent-blue); font-family: var(--font-mono); }
.pwgen-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.08); outline: none;
  margin-top: 8px;
}
.pwgen-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-blue); cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  transition: transform 0.15s ease;
}
.pwgen-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.pwgen-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-blue); cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
}
.pwgen-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.pwgen-toggle {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 10px 14px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.pwgen-toggle:hover { border-color: var(--border-hover); }
.pwgen-toggle input { display: none; }
.toggle-track {
  position: relative; width: 36px; height: 20px; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border-radius: 10px;
  transition: background 0.2s ease;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-muted); transition: all 0.2s ease;
}
.pwgen-toggle input:checked ~ .toggle-track { background: rgba(16,185,129,0.3); }
.pwgen-toggle input:checked ~ .toggle-track .toggle-thumb {
  left: 18px; background: var(--accent-green);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== Footer Links ===== */
.footer-links {
  display: flex; align-items: center; gap: 16px;
}
.footer-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 12px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition);
}
.footer-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: var(--border-hover); }

/* ===== About Page ===== */
.about-main { padding-top: 84px; }
.about-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.about-lead {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7;
}
.about-heading {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.about-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 12px;
}
.about-features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.about-feature {
  padding: 20px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.about-feature .card-icon { margin-bottom: 14px; }
.about-feature h3 {
  font-size: 14px; font-weight: 600; margin-bottom: 6px;
}
.about-feature p {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
}
.about-list {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.about-list li {
  position: relative; padding-left: 20px; font-size: 14px;
  color: var(--text-secondary); line-height: 1.7;
}
.about-list li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-blue);
}
.about-list code {
  font-family: var(--font-mono); font-size: 12px;
  padding: 2px 6px; background: rgba(255,255,255,0.06);
  border-radius: 4px; color: var(--accent-cyan);
}
.about-list strong { color: var(--text-primary); }

/* ===== Auth Gate ===== */
.auth-gate {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 84px 24px 40px;
}
.auth-gate-inner { width: 100%; max-width: 480px; }
.auth-gate-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 36px; box-shadow: var(--shadow-lg);
}
.auth-gate-header {
  text-align: center; margin-bottom: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.auth-gate-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.auth-gate-subtitle { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.auth-gate-divider { height: 1px; background: var(--border); margin: 24px 0; }
.auth-gate-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; line-height: 1.5; }
.btn--ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary); font-weight: 500;
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--text-primary); background: rgba(255,255,255,0.03); }
[data-theme="light"] .btn--ghost:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .auth-gate-card { background: rgba(255,255,255,0.95); }

/* ===== Tab Bar ===== */
.tab-bar {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: rgba(6,6,11,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .tab-bar { background: rgba(245,247,250,0.9); }
.tab-bar-inner {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.tab-bar-inner::-webkit-scrollbar { display: none; }
.tab-bar-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
  transition: color 0.2s ease; border: none; background: none;
  cursor: pointer; position: relative;
}
.tab-bar-item:hover { color: var(--text-secondary); }
.tab-bar-item.active { color: var(--accent-blue); }
.tab-bar-item svg { flex-shrink: 0; opacity: 0.6; transition: opacity 0.2s ease; }
.tab-bar-item.active svg { opacity: 1; }
.tab-bar-indicator {
  position: absolute; bottom: 0; left: 0; height: 2px;
  background: var(--accent-blue); border-radius: 1px 1px 0 0;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Tab Panels ===== */
.tab-panels {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 148px 24px 40px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* ===== Landing Page Sections ===== */
.landing-section {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 60px 24px;
}
.landing-section-title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  text-align: center; margin-bottom: 12px;
}
.landing-section-subtitle {
  font-size: 15px; color: var(--text-secondary);
  text-align: center; max-width: 560px;
  margin: 0 auto 40px; line-height: 1.6;
}
.landing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.landing-card {
  padding: 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.landing-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.landing-card-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.landing-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.landing-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step;
}
.step-card {
  text-align: center; padding: 32px 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(12px);
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(59,130,246,0.12); color: var(--accent-blue);
  font-size: 16px; font-weight: 700; margin-bottom: 16px;
}
.step-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.landing-cta {
  text-align: center; padding: 80px 24px; position: relative; z-index: 1;
}
.landing-cta h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.landing-cta p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }
.btn--sm { padding: 7px 16px; font-size: 12px; }
/* ===== Settings ===== */
.settings-section {
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.settings-section:last-child { border-bottom: none; }
.settings-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.settings-label { display: block; font-size: 14px; font-weight: 500; }
.settings-description { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.settings-value { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.settings-user-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  margin-bottom: 8px;
}
.settings-user-row:last-child { margin-bottom: 0; }
.settings-guest-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px;
}
[data-theme="light"] .settings-user-row { background: rgba(0,0,0,0.02); }

.auth-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 20px; padding: 4px;
  background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); transition: all var(--transition); text-align: center;
}
.auth-tab:hover { color: var(--text-primary); }
.auth-tab.active { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-primary); transition: all var(--transition);
}
.auth-google-btn:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
.auth-github-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; margin-top: 10px;
  background: #24292e; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: #fff; transition: all var(--transition);
}
.auth-github-btn:hover { background: #2f363d; border-color: rgba(255,255,255,0.2); }
.auth-divider {
  display: flex; align-items: center; gap: 16px; margin: 20px 0;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.auth-forgot-link {
  align-self: flex-end; font-size: 12px; color: var(--accent-blue);
  margin-top: -8px; transition: color var(--transition);
}
.auth-forgot-link:hover { color: #60a5fa; }
.auth-error {
  font-size: 13px; color: var(--accent-red); padding: 0; min-height: 0; transition: all 0.2s ease;
}
.auth-error:not(:empty) {
  padding: 10px 14px; background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.15); border-radius: var(--radius-xs);
}
.auth-success {
  font-size: 13px; color: var(--accent-green); padding: 10px 14px;
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-xs);
}
.auth-submit-btn { position: relative; }
.auth-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.auth-spinner-svg { animation: auth-spin 0.8s linear infinite; }
@keyframes auth-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.auth-back-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 20px; transition: color var(--transition);
}
.auth-back-btn:hover { color: var(--text-primary); }
.user-avatar-default {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; text-transform: uppercase;
}
.user-avatar-default--sm { width: 22px; height: 22px; font-size: 10px; }
.auth-verify-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: rgba(249,115,22,0.06); border: 1px solid rgba(249,115,22,0.15);
  border-radius: var(--radius-xs); font-size: 12px; color: var(--accent-orange); margin-bottom: 4px;
}
.auth-verify-banner a { color: var(--accent-orange); text-decoration: underline; font-weight: 600; cursor: pointer; }
.auth-verify-banner a:hover { color: #fb923c; }

/* Auth - Light Theme */
[data-theme="light"] .auth-tabs { background: rgba(0,0,0,0.02); }
[data-theme="light"] .auth-tab.active { background: rgba(0,0,0,0.06); }
[data-theme="light"] .auth-google-btn:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .auth-github-btn { background: #24292e; color: #fff; border-color: #24292e; }
[data-theme="light"] .auth-github-btn:hover { background: #2f363d; }

/* Auth Gate & Tab Bar - Mobile */
@media (max-width: 640px) {
  .auth-gate { padding: 76px 16px 24px; }
  .auth-gate-card { padding: 28px 20px; }
  .auth-gate-title { font-size: 20px; }
  .auth-gate-card .input-field { padding: 14px 16px; font-size: 16px; }
  .auth-gate-card .btn { min-height: 44px; font-size: 14px; }
  .auth-google-btn, .auth-github-btn { min-height: 44px; font-size: 15px; }
  .tab-bar-inner { padding: 0 12px; }
  .tab-bar-item { padding: 12px 14px; font-size: 12px; gap: 5px; }
  .tab-bar-item span { display: none; }
  .tab-bar-item svg { width: 18px; height: 18px; }
  .tab-panels { padding: 136px 16px 24px; }
  .steps-grid { grid-template-columns: 1fr; }
  .landing-cta h2 { font-size: 22px; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .tab-bar-item span { font-size: 12px; }
  .tab-bar-item { padding: 12px 14px; }
}

/* ===== User Dropdown Divider ===== */
.user-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== Settings Panel (slide-out) ===== */
.settings-panel {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: flex-end;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.settings-panel.open { opacity: 1; visibility: visible; }
.settings-panel-inner {
  width: 100%; max-width: 440px; height: 100%;
  background: var(--bg-body); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-panel.open .settings-panel-inner { transform: translateX(0); }
.settings-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.settings-panel-header h3 { font-size: 16px; font-weight: 600; }
.settings-panel-close {
  font-size: 24px; color: var(--text-muted); padding: 4px 8px;
  border-radius: 6px; transition: all var(--transition); line-height: 1;
}
.settings-panel-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.settings-panel-body { padding: 8px 24px 24px; flex: 1; }
[data-theme="light"] .settings-panel-close:hover { background: rgba(0,0,0,0.04); }

/* ===== Full Scan Overlay ===== */
.fullscan-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg-body);
  display: flex; align-items: center; justify-content: center;
  animation: fullscanFadeIn 0.4s ease;
}
@keyframes fullscanFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fullscan-inner {
  width: 100%; max-width: 520px; padding: 48px 32px;
  text-align: center;
}
.fullscan-header { margin-bottom: 40px; }
.fullscan-shield {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(59,130,246,0.1);
  color: var(--accent-blue); margin-bottom: 20px;
  animation: shieldPulse 2s ease-in-out infinite;
}
@keyframes shieldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 0 16px rgba(59,130,246,0); }
}
.fullscan-title {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px;
}
.fullscan-subtitle {
  font-size: 14px; color: var(--text-muted); transition: color 0.3s ease;
}
.fullscan-steps {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 32px; text-align: left;
}
.fullscan-step {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
}
.fullscan-step.running {
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.04);
}
.fullscan-step.done {
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.04);
}
.fullscan-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  transition: all 0.3s ease;
}
.fullscan-step.running .fullscan-step-num {
  background: rgba(59,130,246,0.15); color: var(--accent-blue);
}
.fullscan-step.done .fullscan-step-num {
  background: rgba(16,185,129,0.15); color: var(--accent-green);
}
.fullscan-step-info { flex: 1; }
.fullscan-step-name {
  display: block; font-size: 14px; font-weight: 500;
}
.fullscan-step-status {
  display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px;
  transition: color 0.3s ease;
}
.fullscan-step.running .fullscan-step-status { color: var(--accent-blue); }
.fullscan-step.done .fullscan-step-status { color: var(--accent-green); }
.fullscan-step-check {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fullscan-step.running .fullscan-step-check::after {
  content: ''; width: 18px; height: 18px;
  border: 2px solid var(--accent-blue); border-top-color: transparent;
  border-radius: 50%; animation: auth-spin 0.8s linear infinite;
}
.fullscan-step.done .fullscan-step-check::after {
  content: '\2713'; font-size: 14px; font-weight: 700; color: var(--accent-green);
}
.fullscan-bar-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.fullscan-bar {
  flex: 1; height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.fullscan-bar-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  transition: width 0.5s ease;
}
.fullscan-bar-text {
  font-size: 13px; font-weight: 600; font-family: var(--font-mono);
  color: var(--text-secondary); min-width: 36px;
}
.fullscan-actions, .fullscan-done {
  display: flex; justify-content: center; gap: 12px;
}
.fullscan-done { flex-direction: column; align-items: center; gap: 8px; }
[data-theme="light"] .fullscan-step { background: rgba(0,0,0,0.02); }
[data-theme="light"] .fullscan-bar { background: rgba(0,0,0,0.06); }
[data-theme="light"] .settings-panel-inner { background: var(--bg-body); }

/* ===== Password Generator Presets ===== */
.pwgen-presets {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.pwgen-preset {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s ease; cursor: pointer;
}
.pwgen-preset:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}
.pwgen-preset.active {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.4);
  color: var(--accent-blue);
}
.pwgen-preset svg { flex-shrink: 0; }
[data-theme="light"] .pwgen-preset { background: rgba(0,0,0,0.03); }
[data-theme="light"] .pwgen-preset:hover { background: rgba(0,0,0,0.06); }
[data-theme="light"] .pwgen-preset.active {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.35);
}
.pwgen-controls.hidden { display: none; }

/* ===== Enhanced Card Animations ===== */
@keyframes tabSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Button Press Animation ===== */
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn--run-all:active:not(:disabled) { transform: scale(0.95); }

/* ===== Speed Test Responsive ===== */
@media (max-width: 900px) {
  .speed-layout { grid-template-columns: 1fr; }
  .speed-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .speed-layout { grid-template-columns: 1fr; gap: 24px; }
  .speed-metrics { grid-template-columns: 1fr; }
  .speed-metric { padding: 16px; }
  .gauge-ring { width: 180px; height: 180px; }
  .gauge-number { font-size: 36px; }
  .fullscan-inner { padding: 32px 20px; }
  .fullscan-title { font-size: 20px; }
  .fullscan-step { padding: 12px 14px; gap: 12px; }
  .settings-panel-inner { max-width: 100%; }
  .pwgen-presets { gap: 6px; }
  .pwgen-preset { padding: 7px 12px; font-size: 12px; }
}
