/* =====================================================
   EasySecure — style.css
   Cybersecurity Dark UI · Neon Accents · Glassmorphism
   ===================================================== */

/* ── CSS Variables ── */
:root {
  --clr-bg:        #050a12;
  --clr-bg-alt:    #080f1c;
  --clr-surface:   rgba(10, 20, 40, 0.72);
  --clr-surface-b: rgba(10, 20, 40, 0.90);
  --clr-border:    rgba(0, 200, 255, 0.14);
  --clr-border-h:  rgba(0, 200, 255, 0.40);

  --clr-neon:      #00c8ff;
  --clr-neon-dim:  rgba(0, 200, 255, 0.18);
  --clr-green:     #00ffa3;
  --clr-green-dim: rgba(0, 255, 163, 0.15);
  --clr-yellow:    #ffe066;
  --clr-red:       #ff4d6d;

  --clr-text:      #e0eaf8;
  --clr-text-mid:  #8ba0bc;
  --clr-text-dim:  #4a6080;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-glow:   0 0 24px rgba(0, 200, 255, 0.22);
  --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.55);
  --shadow-btn:    0 4px 20px rgba(0, 200, 255, 0.35);

  --transition:    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  --font-body:    'Exo 2', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;

  --navbar-h:     64px;
}

/* ── Light Theme Overrides ── */
[data-theme="light"] {
  --clr-bg:        #f0f4f8;
  --clr-bg-alt:    #e4ecf5;
  --clr-surface:   rgba(255, 255, 255, 0.72);
  --clr-surface-b: rgba(255, 255, 255, 0.92);
  --clr-border:    rgba(0, 120, 200, 0.18);
  --clr-border-h:  rgba(0, 120, 200, 0.45);

  --clr-neon:      #0078c8;
  --clr-neon-dim:  rgba(0, 120, 200, 0.12);
  --clr-green:     #00875a;
  --clr-green-dim: rgba(0, 135, 90, 0.12);

  --clr-text:      #0a1a30;
  --clr-text-mid:  #3a5070;
  --clr-text-dim:  #8099b8;

  --shadow-glow:   0 0 24px rgba(0, 120, 200, 0.18);
  --shadow-card:   0 8px 40px rgba(0, 0, 0, 0.10);
  --shadow-btn:    0 4px 20px rgba(0, 120, 200, 0.25);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-neon-dim); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-neon); }

/* ── Utility ── */
.container {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}

.mono { font-family: var(--font-mono) !important; }

/* ── Canvas Particles ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Glow Orbs ── */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}
.glow-orb--1 {
  width: clamp(300px, 40vw, 600px);
  height: clamp(300px, 40vw, 600px);
  background: radial-gradient(circle, rgba(0,200,255,0.12), transparent 70%);
  top: -10%; left: -10%;
  animation-duration: 20s;
}
.glow-orb--2 {
  width: clamp(250px, 35vw, 500px);
  height: clamp(250px, 35vw, 500px);
  background: radial-gradient(circle, rgba(0,255,163,0.09), transparent 70%);
  bottom: 20%; right: -8%;
  animation-duration: 25s;
  animation-delay: -8s;
}
.glow-orb--3 {
  width: clamp(180px, 25vw, 400px);
  height: clamp(180px, 25vw, 400px);
  background: radial-gradient(circle, rgba(100,50,255,0.08), transparent 70%);
  top: 50%; left: 40%;
  animation-duration: 30s;
  animation-delay: -15s;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.06); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--clr-surface-b);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-neon);
  color: var(--clr-text);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s ease forwards;
  pointer-events: auto;
  max-width: 320px;
}

.toast--success { border-left-color: var(--clr-green); }
.toast--error   { border-left-color: var(--clr-red); }
.toast--out     { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(40px); } }

/* ── Glass Morphism ── */
.glass {
  background: var(--clr-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.glass:hover { border-color: var(--clr-border-h); }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: rgba(5, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition-slow), border-color var(--transition);
}
[data-theme="light"] .navbar { background: rgba(240, 244, 248, 0.90); }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--clr-text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.navbar__logo-icon { font-size: 1.3rem; }
.navbar__logo-text em {
  color: var(--clr-neon);
  font-style: normal;
}
.navbar__logo:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 4px; border-radius: var(--radius-sm); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}

.nav-link {
  text-decoration: none;
  color: var(--clr-text-mid);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--clr-neon);
  border-radius: 99px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--clr-neon); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 4px; border-radius: var(--radius-sm); }

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: var(--clr-neon-dim);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.theme-toggle:hover { background: var(--clr-neon); transform: rotate(20deg) scale(1.1); }
.theme-toggle:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 3px; }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.hamburger__bar {
  width: 24px; height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.hamburger.open .hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger__bar:nth-child(2) { opacity: 0; }
.hamburger.open .hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 3px; }

/* ── Hero Section ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - var(--navbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: clamp(64px, 10vh, 120px);
  text-align: center;
  gap: 56px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--clr-neon-dim);
  border: 1px solid var(--clr-neon);
  color: var(--clr-neon);
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-neon);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,200,255,0.7); }
  50%       { box-shadow: 0 0 0 6px rgba(0,200,255,0); }
}

.hero__title {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 12ch;
  margin-inline: auto;
}

.hero__title-accent {
  display: block;
  background: linear-gradient(120deg, var(--clr-neon), var(--clr-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite alternate;
}

@keyframes gradientShift {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(30deg); }
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: var(--clr-text-mid);
  line-height: 1.7;
  max-width: 56ch;
  margin-inline: auto;
}

.hero__subtitle code {
  font-family: var(--font-mono);
  background: var(--clr-neon-dim);
  color: var(--clr-neon);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  border: 1px solid var(--clr-border);
}

.hero__stats {
  display: flex;
  gap: clamp(16px, 4vw, 40px);
  justify-content: center;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 3vw, 24px) clamp(20px, 4vw, 40px);
  backdrop-filter: blur(16px);
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--clr-border-h); transform: translateY(-3px); }

.stat-card__value {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--clr-neon);
  line-height: 1;
}

.stat-card__label {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 3px; }
.btn:active { transform: scale(0.97) !important; }

.btn--primary {
  background: var(--clr-neon);
  color: #030810;
  border-color: var(--clr-neon);
}
.btn--primary:hover {
  background: transparent;
  color: var(--clr-neon);
  box-shadow: var(--shadow-btn);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-neon);
  border-color: var(--clr-neon);
}
.btn--ghost:hover {
  background: var(--clr-neon-dim);
  transform: translateY(-2px);
}

.btn--glow:hover { box-shadow: 0 0 32px rgba(0,200,255,0.4); }
.btn--full { width: 100%; }
.btn--hero { font-size: 1.05rem; padding: 16px 38px; border-radius: var(--radius-lg); }

.btn--sm {
  font-size: 0.78rem;
  padding: 7px 16px;
}

/* Ripple */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.6s;
}
.btn:active::after { opacity: 1; transition: opacity 0s; }

/* ── Icon Buttons ── */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--clr-neon-dim);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--clr-neon);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--clr-neon); color: #030810; border-color: var(--clr-neon); transform: scale(1.1); box-shadow: var(--shadow-glow); }
.icon-btn:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 3px; }
.icon-btn:active { transform: scale(0.95); }

/* ── Sections ── */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(60px, 10vh, 110px);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.title-icon { font-size: 1em; }

.section-sub {
  color: var(--clr-text-mid);
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.6;
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Generator Card ── */
.generator-card {
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Password Display ── */
.password-display {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 68px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.password-display:hover { border-color: var(--clr-border-h); box-shadow: var(--shadow-glow); }
[data-theme="light"] .password-display { background: rgba(255,255,255,0.55); }

.password-display--sm {
  min-height: 54px;
  margin-block: 8px;
  padding: 10px 14px;
}

.password-display__box {
  flex: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border-h) transparent;
  cursor: text;
}
.password-display__box:focus-visible { outline: none; }

.password-text {
  font-size: clamp(0.85rem, 2.2vw, 1.1rem);
  color: var(--clr-neon);
  word-break: break-all;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.password-display__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Copy success animation */
.copy-success {
  animation: copyFlash 0.5s ease;
}
@keyframes copyFlash {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 32px var(--clr-green); }
}

/* ── Strength Meter ── */
.strength-meter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strength-meter__bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.strength-meter__bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--clr-red);
  transition: width 0.45s cubic-bezier(0.4,0,0.2,1), background 0.35s ease;
  box-shadow: 0 0 8px currentColor;
}

.strength-meter__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.strength-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-text-mid);
  transition: color var(--transition);
}

.entropy-label {
  font-family: var(--font-mono);
  color: var(--clr-text-dim);
  font-size: 0.75rem;
}

/* ── Option Group ── */
.option-group { display: flex; flex-direction: column; gap: 10px; }

.option-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.length-badge {
  background: var(--clr-neon);
  color: #030810;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  min-width: 36px;
  text-align: center;
}

/* ── Range Slider ── */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-min, .slider-max {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--clr-text-dim);
  width: 20px;
  text-align: center;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--clr-neon) 0%, var(--clr-neon) var(--slider-pct, 30%), rgba(255,255,255,0.1) var(--slider-pct, 30%));
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--clr-neon);
  box-shadow: 0 0 10px var(--clr-neon);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.25); box-shadow: 0 0 18px var(--clr-neon); }
.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--clr-neon);
  box-shadow: 0 0 10px var(--clr-neon);
  cursor: pointer;
  border: none;
}
.slider:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 4px; border-radius: 99px; }

/* ── Toggles Grid ── */
.toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  user-select: none;
}
.toggle-card:hover { border-color: var(--clr-border-h); background: rgba(0,200,255,0.05); transform: translateY(-1px); }
[data-theme="light"] .toggle-card { background: rgba(255,255,255,0.4); }

.toggle-card__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-card__icon {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-neon);
  width: 26px;
  text-align: center;
}

.toggle-card__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text-mid);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}

.toggle-switch__track {
  display: block;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  transition: background var(--transition);
  cursor: pointer;
  position: relative;
}

.toggle-switch__track::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.toggle-switch input:checked + .toggle-switch__track {
  background: var(--clr-neon);
}
.toggle-switch input:checked + .toggle-switch__track::before {
  transform: translateX(18px) translateY(-50%);
  background: #030810;
  box-shadow: none;
}
.toggle-switch input:focus-visible + .toggle-switch__track {
  outline: 2px solid var(--clr-neon);
  outline-offset: 3px;
}

/* ── Text Input ── */
.text-input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.text-input::placeholder { color: var(--clr-text-dim); }
.text-input:hover { border-color: var(--clr-border-h); }
.text-input:focus { border-color: var(--clr-neon); box-shadow: 0 0 0 3px var(--clr-neon-dim); }
[data-theme="light"] .text-input { background: rgba(255,255,255,0.6); }

/* ── Select Input ── */
.select-input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px 16px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300c8ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
.select-input:hover { border-color: var(--clr-border-h); }
.select-input:focus { border-color: var(--clr-neon); box-shadow: 0 0 0 3px var(--clr-neon-dim); }
.select-input option { background: #0a1428; color: var(--clr-text); }
[data-theme="light"] .select-input { background-color: rgba(255,255,255,0.6); }
[data-theme="light"] .select-input option { background: #e8f0f8; }

/* ── History Panel ── */
.history-panel {
  max-width: 680px;
  margin-inline: auto;
  margin-top: 24px;
  padding: 24px;
}

.history-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.history-panel__header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-text-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border-h) transparent;
  padding-right: 4px;
}

.history-empty {
  text-align: center;
  color: var(--clr-text-dim);
  font-size: 0.85rem;
  padding: 16px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color var(--transition), background var(--transition);
  animation: historySlide 0.3s ease;
  cursor: pointer;
}
.history-item:hover { border-color: var(--clr-border-h); background: rgba(0,200,255,0.05); }

@keyframes historySlide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

.history-item__pw {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--clr-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item__meta {
  font-size: 0.7rem;
  color: var(--clr-text-dim);
  white-space: nowrap;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Two Column Grid ── */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 4vw, 36px);
}

/* ── Sub Cards (Passphrase / PIN) ── */
.sub-card {
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--clr-text-mid);
  line-height: 1.6;
}

/* ── PIN Display ── */
.pin-display {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: default;
}
.pin-display:hover { border-color: var(--clr-border-h); box-shadow: var(--shadow-glow); }
.pin-display span {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  letter-spacing: 0.25em;
  color: var(--clr-green);
  font-weight: 700;
}
[data-theme="light"] .pin-display { background: rgba(255,255,255,0.55); }

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--clr-border);
  padding-block: clamp(36px, 6vw, 64px);
}
[data-theme="light"] .footer { background: rgba(0,0,0,0.04); }

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
}
.footer__logo-icon { font-size: 1.4rem; }
.footer__name em { color: var(--clr-neon); font-style: normal; }

.footer__tagline {
  color: var(--clr-text-mid);
  font-size: 0.88rem;
}

.footer__credit {
  font-size: 0.85rem;
  color: var(--clr-text-mid);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer__credit strong { color: var(--clr-neon); }

.footer__link--name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__link--name strong { color: var(--clr-neon); }

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--clr-neon);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition);
}
.footer__link:hover { opacity: 0.75; text-decoration: underline; }
.footer__link:focus-visible { outline: 2px solid var(--clr-neon); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ── Strength Colors ── */
.strength--weak   .strength-meter__bar { background: var(--clr-red);    }
.strength--medium .strength-meter__bar { background: var(--clr-yellow);  }
.strength--strong .strength-meter__bar { background: var(--clr-neon);    }
.strength--vstrong .strength-meter__bar { background: var(--clr-green);  }

/* ── Responsive Breakpoints ── */

/* 768px */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--clr-bg-alt);
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0;
    z-index: 999;
  }
  .navbar__links.open { display: flex; }

  .nav-link {
    width: 100%;
    padding: 14px 28px;
    font-size: 1rem;
  }
  .nav-link::after { display: none; }

  .hamburger { display: flex; }

  .hero { gap: 40px; }

  .two-col-grid { grid-template-columns: 1fr; }

  .generator-card { padding: 20px; gap: 20px; }
  .sub-card { padding: 20px; }
  .history-panel { padding: 20px; }
}

/* 480px */
@media (max-width: 480px) {
  .toggles-grid { grid-template-columns: 1fr 1fr; }
  .hero__stats { gap: 12px; }
  .stat-card { padding: 14px 18px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

/* 320px */
@media (max-width: 380px) {
  .toggles-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 2rem; }
}

/* Large desktop */
@media (min-width: 1440px) {
  .generator-card,
  .history-panel { max-width: 760px; }
}