:root {
  --navy-deep: #05080F;
  --navy: #0B1626;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --teal: #4FD1E0;
  --amber: #F2A65A;
  --green: #4FD19B;
  --text: #F3F6FA;
  --text-muted: #9BB0C7;
  --radius: 20px;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% 18%, rgba(79, 209, 224, 0.14), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(242, 166, 90, 0.10), transparent 46%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 55%, #000000 100%);
  background-attachment: fixed;
}

a {
  color: var(--teal);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
}

.wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover,
nav a:focus {
  color: var(--teal);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 420px;
  max-width: 560px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.3;
  margin: 0 0 1rem;
}

.lede {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 58ch;
}

/* Glass console card wrapping the scan form */
.console-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--glass-highlight);
}

.input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

#password-input {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

#password-input::placeholder {
  color: var(--text-muted);
}

#password-input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

#toggle-visibility {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-muted);
  width: 3rem;
  cursor: pointer;
}

#toggle-visibility:focus-visible {
  outline: 2px solid var(--teal);
}

.scan-button {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), #2C8FA3);
  color: #04141A;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(79, 209, 224, 0.32);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.scan-button:hover,
.scan-button:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 8px 28px rgba(79, 209, 224, 0.45);
}

.scan-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Radar visual */
.radar {
  position: relative;
  width: 220px;
  height: 220px;
  flex: 0 0 220px;
  margin: 0 auto;
}

.radar-ring {
  position: absolute;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
}

.ring-1 {
  inset: 0;
}

.ring-2 {
  inset: 15%;
}

.ring-3 {
  inset: 32%;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(79, 209, 224, 0.4), transparent 40%);
  animation: sweep 4s linear infinite;
}

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

.radar-blip {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  top: 38%;
  left: 60%;
  box-shadow: 0 0 14px 2px rgba(79, 209, 224, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 209, 224, 0.5);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(79, 209, 224, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(79, 209, 224, 0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .radar-sweep,
  .radar-blip {
    animation: none;
  }
}

/* Results */
.results-panel {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.result-card {
  flex: 1 1 240px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--glass-highlight);
}

.result-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.result-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin: 0.4rem 0 0;
}

.result-value.safe {
  color: var(--green);
}

.result-value.breached {
  color: var(--amber);
}

.meter {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 0.6rem;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: var(--teal);
  transition: width 0.4s ease, background 0.4s ease;
}

/* Generator + how-it-works panels */
.generator-panel,
.how-it-works {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 var(--glass-highlight);
}

.generator-panel h2,
.how-it-works h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 0;
}

.section-lede {
  color: var(--text-muted);
  max-width: 58ch;
}

.generator-output {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
}

#generated-password {
  font-family: var(--font-mono);
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--text);
}

#copy-button,
#generate-button {
  background: linear-gradient(135deg, var(--teal), #2C8FA3);
  border: none;
  color: #04141A;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 209, 224, 0.3);
}

#copy-button:hover,
#generate-button:hover {
  filter: brightness(1.08);
}

.generator-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.generator-controls label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

input[type="range"] {
  accent-color: var(--teal);
}

.how-it-works ol {
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.how-it-works li {
  margin-bottom: 0.75rem;
}

.how-it-works strong {
  color: var(--text);
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
}

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

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .radar {
    margin-top: 1rem;
  }
}