:root {
  --bg: #000033;
  --surface: #001166;
  --ink: #00ccff;
  --muted: #6699cc;
  --primary: #ffcc00;
  --accent: #ff6600;
  --success: #00ccff;
  --warning: #ffcc00;
  --error: #ff3366;
  --radius: 4px;
  --shadow: 0 4px 12px rgba(0, 204, 255, 0.08);
  --space: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 136, 0.03) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 255, 136, 0.03) 3px
    );
  pointer-events: none;
  z-index: 1;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@keyframes glow {
  0%, 100% { text-shadow: 0 0 10px var(--ink), 0 0 20px var(--ink); }
  50% { text-shadow: 0 0 20px var(--ink), 0 0 30px var(--ink), 0 0 40px var(--ink); }
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 5px var(--primary), inset 0 0 5px rgba(255, 176, 0, 0.1); }
  50% { box-shadow: 0 0 20px var(--primary), inset 0 0 10px rgba(255, 176, 0, 0.2); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Navigation */
.site-nav {
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 4px var(--ink);
  letter-spacing: 2px;
  transition: all 150ms ease;
}

.nav-logo:hover {
  text-shadow: 0 0 8px var(--ink);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 150ms ease;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--primary);
  text-shadow: 0 0 4px var(--primary);
  outline: none;
}

@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--surface);
  animation: fade-in 600ms ease;
}

.logo {
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--ink);
  text-shadow: 0 0 4px var(--ink);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Password Display */
.password-display {
  background: rgba(0, 255, 136, 0.05);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 150ms ease;
  position: relative;
  overflow: hidden;
  animation: fade-in 600ms ease 100ms both;
}

.password-display:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 176, 0, 0.3);
}

.password-display:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.password-display.copied {
  animation: pulse-border 0.5s ease;
  background: rgba(0, 255, 136, 0.15);
}

.password-text {
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  color: var(--ink);
  text-align: center;
  word-break: break-all;
  letter-spacing: 3px;
  text-shadow: 0 0 3px var(--ink);
  user-select: all;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 10;
}

.copy-feedback.show {
  opacity: 1;
}

/* Generator Panel */
.generator-panel {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  animation: fade-in 600ms ease 200ms both;
}

.controls {
  display: grid;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.control-label {
  font-size: 0.875rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.length-value {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--primary);
}

/* Slider */
.slider {
  width: 100%;
  height: 8px;
  background: rgba(0, 255, 136, 0.2);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary);
  transition: all 150ms ease;
}

.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px var(--primary);
  transform: scale(1.1);
}

.slider::-webkit-slider-thumb:focus-visible {
  box-shadow: 0 0 30px var(--primary);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary);
  transition: all 150ms ease;
}

.slider::-moz-range-thumb:hover {
  box-shadow: 0 0 20px var(--primary);
  transform: scale(1.1);
}

.slider:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Toggles */
.toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 150ms ease;
  user-select: none;
}

.toggle-item:hover {
  border-color: var(--ink);
  background: rgba(0, 255, 136, 0.1);
}

.toggle-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.toggle-item.active {
  border-color: var(--primary);
  background: rgba(255, 176, 0, 0.1);
}

.checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.toggle-item.active .checkbox {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.checkbox::after {
  content: '✓';
  font-size: 1rem;
  color: var(--bg);
  opacity: 0;
  transition: opacity 150ms ease;
}

.toggle-item.active .checkbox::after {
  opacity: 1;
}

.toggle-label {
  font-size: 0.875rem;
  color: var(--ink);
}

/* Seed Button */
.seed-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--bg);
  font-family: 'VT323', monospace;
  font-size: 1.125rem;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 150ms ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  top: 0;
}

.seed-button:hover {
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.seed-button:active {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  transform: translateY(2px);
}

.seed-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.seed-label {
  display: block;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Strength Meter */
.strength-meter {
  margin-top: 1.5rem;
}

.strength-label {
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.strength-bar {
  height: 12px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.strength-fill {
  height: 100%;
  transition: all 300ms ease;
  box-shadow: 0 0 10px currentColor;
}

.strength-text {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  text-align: center;
  margin-top: 0.5rem;
  text-shadow: 0 0 2px currentColor;
}

/* Info Section */
.info-section {
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fade-in 600ms ease 300ms both;
}

.info-section h2 {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 1rem;
  text-shadow: 0 0 2px var(--ink);
}

.info-section p {
  color: var(--muted);
  line-height: 1.8;
}

/* Ad Banner */
.ad-banner {
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 3rem;
  opacity: 0.7;
  animation: fade-in 600ms ease 400ms both;
}

.ad-label {
  font-size: 0.625rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.ad-content {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--ink);
  font-size: 0.875rem;
  text-align: center;
  z-index: 1000;
  opacity: 0;
  transition: all 300ms ease;
  box-shadow: var(--shadow);
  max-width: 90%;
  word-wrap: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: toast-slide-in 300ms ease;
}

/* Content Pages */
.content-page {
  animation: fade-in 600ms ease;
}

.content-page h1 {
  font-family: 'VT323', monospace;
  font-size: 2.5rem;
  color: var(--ink);
  margin-bottom: 1rem;
  text-shadow: 0 0 4px var(--ink);
}

.content-page h2 {
  font-family: 'VT323', monospace;
  font-size: 1.75rem;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 2px var(--ink);
}

.content-page h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.125rem;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-page p {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-page ul,
.content-page ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.content-page li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.content-page a {
  color: var(--primary);
  text-decoration: none;
  transition: all 150ms ease;
}

.content-page a:hover,
.content-page a:focus-visible {
  text-shadow: 0 0 4px var(--primary);
  outline: none;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 150ms ease;
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.1);
}

.faq-item h3 {
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.faq-item p {
  margin-bottom: 0;
}

.faq-item ul {
  margin-bottom: 0;
}

.tip-card {
  background: rgba(0, 255, 136, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tip-card h3 {
  color: var(--primary);
  margin-top: 0;
}

.tip-card p {
  margin-bottom: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--surface);
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}

footer a {
  color: var(--primary);
  text-decoration: none;
  transition: all 150ms ease;
}

footer a:hover,
footer a:focus-visible {
  text-shadow: 0 0 4px var(--primary);
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .header {
    margin-bottom: 2rem;
  }

  .logo {
    font-size: 2rem;
  }

  .password-text {
    font-size: 1.75rem;
    letter-spacing: 2px;
  }

  .generator-panel {
    padding: 1.5rem;
  }

  .toggles {
    grid-template-columns: 1fr 1fr;
  }

  .content-page h1 {
    font-size: 2rem;
  }

  .content-page h2 {
    font-size: 1.5rem;
  }

  .toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: translateY(20px);
  }

  .toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .logo {
    font-size: 1.75rem;
  }

  .tagline {
    font-size: 0.75rem;
  }

  .password-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .copy-feedback {
    font-size: 2rem;
  }

  .generator-panel {
    padding: 1rem;
  }

  .toggles {
    grid-template-columns: 1fr;
  }

  .control-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .content-page h1 {
    font-size: 1.75rem;
  }

  .content-page h2 {
    font-size: 1.25rem;
  }

  .info-section {
    padding: 1rem;
  }

  .info-section h2 {
    font-size: 1.25rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  .password-display {
    border-width: 4px;
  }

  .generator-panel {
    border-width: 3px;
  }

  .toggle-item {
    border-width: 2px;
  }
}