:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --text-soft: #666;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 24px;
  --container: 1100px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Strength Colors */
  --strength-weak: #ef4444;
  --strength-fair: #f59e0b;
  --strength-good: #10b981;
  --strength-strong: #059669;
}

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

body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  background-color: var(--bg); 
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 2rem; }

/* Navigation (Universal) */
nav {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-item { position: relative; }
.nav-link { text-decoration: none; color: var(--text-soft); font-size: 0.9375rem; font-weight: 600; transition: color 0.2s; display: flex; align-items: center; gap: 0.35rem; }
.nav-link:hover, .nav-link.active { color: var(--text); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s var(--ease);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; text-decoration: none; color: var(--text); border-radius: 8px; transition: background 0.2s; }
.dropdown-item:hover { background: var(--bg); }
.dropdown-item .icon { font-size: 1.125rem; color: var(--accent); display: flex; align-items: center; }
.dropdown-item .title { font-weight: 700; font-size: 0.875rem; display: block; }
.dropdown-item .desc { font-size: 0.75rem; color: var(--text-soft); display: block; }

.nav-cta {
  padding: 0.7rem 1.5rem;
  background: var(--text);
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* Main Layout */
.main-layout { padding: 4rem 0 8rem; max-width: 800px; }
.tool-header { text-align: center; margin-bottom: 4rem; }
.tool-header h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1rem; }
.tool-header h1 span { color: var(--accent); }
.tool-header p { color: var(--text-soft); font-size: 1.125rem; }

/* Generator Card */
.generator-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
}

.output-wrapper {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}
.output-wrapper:focus-within { border-color: var(--accent); }

#passwordOutput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 1rem 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.output-actions { display: flex; gap: 0.5rem; padding-right: 0.5rem; }
.action-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: white;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.action-btn:hover { background: var(--border); }
.action-btn.primary {
  width: auto;
  padding: 0 1.25rem;
  background: var(--accent);
  color: white;
  gap: 0.5rem;
  font-weight: 700;
}
.action-btn.primary:hover { opacity: 0.9; }

/* Strength Meter */
.strength-meter { margin-bottom: 3rem; }
.strength-bar {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.strength-bar .level {
  height: 100%;
  width: 0;
  transition: width 0.4s var(--ease), background-color 0.4s var(--ease);
}
#strengthText { font-size: 0.875rem; font-weight: 600; color: var(--text-soft); }
#strengthText span { color: var(--text); font-weight: 700; }

/* Options */
.option-row { margin-bottom: 2rem; }
.option-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.option-label label { font-weight: 700; font-size: 1rem; }
.option-label span { 
  background: var(--accent-soft); 
  color: var(--accent); 
  padding: 0.25rem 0.75rem; 
  border-radius: 8px; 
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  outline: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 4px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.toggles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-item:hover { border-color: var(--accent); background: var(--accent-soft); }

.toggle-item input { display: none; }
.toggle-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.toggle-item input:checked + .toggle-box {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-item input:checked + .toggle-box::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}
.toggle-label { font-weight: 600; font-size: 0.9375rem; color: var(--text-soft); }
.toggle-item input:checked ~ .toggle-label { color: var(--text); }

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}
.info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}
.info-card i { color: var(--accent); margin-bottom: 1rem; }
.info-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.875rem; color: var(--text-soft); }

/* Footer */
footer { padding: 6rem 0; background: #111; color: white; border-top: 1px solid #333; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand .logo { color: white; margin-bottom: 1.5rem; }
.footer-brand p { color: #999; font-size: 0.9375rem; line-height: 1.6; max-width: 300px; }
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul li a { color: #999; text-decoration: none; font-size: 0.9375rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom { padding-top: 3rem; border-top: 1px solid #333; display: flex; justify-content: space-between; align-items: center; color: #666; font-size: 0.875rem; }
.footer-socials { display: flex; gap: 1.5rem; }
.footer-socials a { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer-socials a:hover { color: white; }

/* Mobile */
.mobile-only { display: none; }
.desktop-only { display: flex; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 991px) {
  .desktop-only { display: none; }
  .mobile-only { display: flex; }
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    transition: 0.4s var(--ease);
    z-index: 1000;
  }
  .nav-links.active { right: 0; }
  .nav-link { font-size: 1.25rem; }
  .dropdown {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none;
    border: none;
    padding: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s var(--ease);
    min-width: unset;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .nav-item.active .dropdown { height: auto; padding-top: 1rem; }
  .chevron { transition: 0.3s; }
  .nav-item.active .chevron { transform: rotate(180deg); }

  .tool-header h1 { font-size: 2.5rem; }
  .generator-card { padding: 1.5rem; }
  #passwordOutput { font-size: 1.125rem; }
  .toggles-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 1.5rem; }
}
