/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080A0F;
  --bg2: #0D1018;
  --bg3: #111520;
  --surface: #141820;
  --surface2: #1A1F2E;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.12);
  --text: #E8EAF0;
  --text2: #8890A8;
  --text3: #545C70;
  --accent: #00FF88;
  --accent2: #00C870;
  --accent-dim: rgba(0,255,136,0.08);
  --accent-dim2: rgba(0,255,136,0.15);
  --red: #FF4D6A;
  --amber: #FFB020;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-head);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== BG CANVAS ===== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== GRID OVERLAY ===== */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,255,136,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(8,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.6s ease both;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.header-nav a {
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--text); }

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 99px;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem 3rem;
  animation: fadeUp 0.8s 0.2s ease both;
}

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

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.eyebrow-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-family: var(--font-mono);
}

.eyebrow-line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.eyebrow-text {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--accent);
  position: relative;
}

.hero-title .accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.3;
  border-radius: 2px;
}

.hero-desc {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  max-width: 480px;
  font-weight: 400;
}

/* ===== GENERATOR SECTION ===== */
.generator-section {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  animation: fadeUp 0.8s 0.4s ease both;
}

.generator-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.generator-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* ===== PASSWORD OUTPUT ===== */
.pw-output-wrap { margin-bottom: 1.5rem; }

.pw-output {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  position: relative;
  overflow: hidden;
}

.pw-output::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,255,136,0.03));
  pointer-events: none;
}

.pw-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
  flex: 1;
  line-height: 1.5;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.pw-text.placeholder { color: var(--text3); font-size: 13px; font-weight: 400; }

.pw-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  border-color: rgba(0,255,136,0.3);
  color: var(--accent);
  background: var(--accent-dim);
}

.icon-btn:active { transform: scale(0.92); }

/* ===== STRENGTH ===== */
.strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.strength-bars {
  display: flex;
  gap: 4px;
}

.sbar {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--surface2);
  transition: background 0.3s, transform 0.3s;
}

.strength-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text3);
  font-family: var(--font-mono);
  flex: 1;
}

.strength-entropy {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--font-mono);
}

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

/* ===== OPTIONS ===== */
.options-grid { display: flex; flex-direction: column; gap: 0; }

.option-group { margin-bottom: 1.5rem; }
.full-width { width: 100%; }

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.option-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.option-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  min-width: 32px;
  text-align: right;
}

/* ===== SLIDER ===== */
.slider-wrap { position: relative; padding: 6px 0; }

.custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface2);
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent2), 0 0 12px rgba(0,255,136,0.4);
  transition: box-shadow 0.2s;
}

.custom-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 1px var(--accent2), 0 0 20px rgba(0,255,136,0.6);
}

.custom-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(0,255,136,0.4);
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ===== TOGGLE GROUP ===== */
.toggle-group {
  display: flex;
  flex-direction: column;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
}

.toggle-row:last-child { border-bottom: none; }
.toggle-row:hover { background: rgba(255,255,255,0.01); }

.toggle-info { flex: 1; }

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: block;
}

.toggle-sub {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-top: 2px;
  display: block;
}

.toggle-switch { position: relative; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-track {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.switch-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text3);
  transition: transform 0.25s, background 0.25s;
}

.toggle-switch input:checked + .switch-track {
  background: var(--accent-dim2);
  border-color: rgba(0,255,136,0.4);
}

.toggle-switch input:checked + .switch-track::after {
  transform: translateX(18px);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0,255,136,0.5);
}

/* ===== GENERATE BUTTON ===== */
.generate-btn {
  width: 100%;
  margin-top: 1.75rem;
  padding: 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(0,255,136,0.25), 0 4px 16px rgba(0,255,136,0.15);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,255,136,0.4), 0 8px 24px rgba(0,255,136,0.2);
}

.generate-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 0 10px rgba(0,255,136,0.2);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.generate-btn:hover .btn-shine { left: 150%; }

/* ===== TOAST ===== */
.toast {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface2);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 99px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== FEATURES ===== */
.features-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  animation: fadeUp 0.8s 0.5s ease both;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 1.75rem;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card:hover { background: var(--surface2); }

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* ===== SECURITY ===== */
.security-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  animation: fadeUp 0.8s 0.6s ease both;
}

.security-card {
  background: var(--surface);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.security-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 60% 40% at 0% 0%, rgba(0,255,136,0.04), transparent);
  pointer-events: none;
}

.security-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.security-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(0,255,136,0.05);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.security-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.security-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.sec-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 4px;
  padding: 3px 7px;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.05em;
}

.security-point strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.security-point p {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 400;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text3);
  margin-top: 0.75rem;
  font-weight: 400;
}

.footer-dev {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.dev-label {
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.dev-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s, text-shadow 0.2s;
}

.dev-name:hover {
  color: #fff;
  text-shadow: 0 0 20px rgba(0,255,136,0.5);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ===== SCRAMBLE ANIMATION ===== */
@keyframes scramble-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pw-text.scrambling { animation: scramble-flash 0.08s ease infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header-nav { display: none; }
  .hero { padding: 4rem 1.25rem 2rem; }
  .generator-section, .features-section, .security-section { padding: 0 1.25rem; }
  .footer { padding: 2rem 1.25rem 1.25rem; }
  .footer-inner { flex-direction: column; }
  .footer-dev { align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
  .security-body { grid-template-columns: 1fr; }
  .generator-card { padding: 1.25rem; }
}
