@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0c0d0e 0%, #1a1b1e 50%, #2d2e31 100%);
  color: #f9fafb;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.dark {
  background: linear-gradient(135deg, #0c0d0e 0%, #1a1b1e 50%, #2d2e31 100%);
  color: #f9fafb;
}

.highlight {
  background: linear-gradient(90deg, #6d4aff 0%, #b4a3ff 50%, #6d4aff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer { to { background-position: 200% center; } }

.card {
  background: rgba(45,46,49,0.6);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(109,74,255,0.1);
  transition: all 0.3s;
  border: 1px solid rgba(109,74,255,0.2);
}

.card:hover {
  box-shadow: 0 12px 48px rgba(109,74,255,0.2), 0 0 0 1px rgba(109,74,255,0.3);
  transform: translateY(-2px);
}

.card-footer {
  text-align: center;
  color: #9ca3af;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.card-footer a {
  color: #b4a3ff;
  text-decoration: none;
  transition: color 0.2s;
}

.card-footer a:hover { color: #6d4aff; }

button {
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(109,74,255,0.4);
}

#generateBtn {
  background: linear-gradient(90deg, #6d4aff 0%, #8b6eff 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(109,74,255,0.3);
}

#generateBtn:hover {
  background: linear-gradient(90deg, #5a3ad6 0%, #7555e6 100%);
}

#themeToggle {
  background: rgba(109,74,255,0.1);
  color: #b4a3ff;
  border: 1px solid rgba(109,74,255,0.3);
}

#themeToggle:hover {
  background: rgba(109,74,255,0.2);
}

.password-box {
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  cursor: pointer;
  user-select: none;
  background: rgba(109,74,255,0.05);
  color: #f9fafb;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(109,74,255,0.2);
  transition: all 0.2s;
}

.password-box:hover {
  background: rgba(109,74,255,0.15);
  border-color: rgba(109,74,255,0.4);
  transform: translateX(4px);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(109,74,255,0.2);
  border-radius: 0.5rem;
  height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6d4aff 0%, #8b6eff 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(109,74,255,0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6d4aff 0%, #8b6eff 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(109,74,255,0.4);
}

input[type="number"] {
  background: rgba(109,74,255,0.1);
  border: 1px solid rgba(109,74,255,0.3);
  color: #f9fafb;
}

input[type="checkbox"] { accent-color: #6d4aff; }
label { color: #e5e7eb; }

#strengthBar {
  height: 8px;
  border-radius: 9999px;
  transition: all 0.3s;
  box-shadow: 0 0 12px currentColor;
}

.protonpass-cta {
  background: linear-gradient(135deg, rgba(109,74,255,0.15) 0%, rgba(139,110,255,0.1) 100%);
  padding: 1.25rem;
  border-radius: 0.75rem;
  text-align: center;
  border: 1px solid rgba(109,74,255,0.3);
  margin-top: 1.5rem;
}

.protonpass-cta a {
  color: #b4a3ff;
  text-decoration: none;
  transition: color 0.2s;
}

.protonpass-cta a:hover { color: #6d4aff; }

.faq-item {
  background: rgba(109,74,255,0.05);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #6d4aff;
}

.faq-item a {
  color: #b4a3ff;
  text-decoration: none;
}

.faq-item a:hover { color: #6d4aff; }

ul { color: #e5e7eb; }
ul li { margin-bottom: 0.5rem; }

/* Ad styling */
.ad-banner-wrapper {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  padding-bottom: 10px;
}

.ad-banner {
  position: relative;
  width: 100%;
  max-width: 728px;
  overflow: hidden;
  min-height: 50px;
  background: rgba(26,27,30,0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid rgba(109,74,255,0.2);
}

/* Floating dismiss above ad */
.ad-dismiss {
  position: absolute;
  bottom: 100%;
  margin-bottom: 8px;
  padding: 0.5rem 1rem;
  background: rgba(109,74,255,0.9);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(109,74,255,0.4);
  backdrop-filter: blur(10px);
  z-index: 101;
}

.ad-dismiss:hover { background: rgba(90,58,214,1); transform: scale(1.05); }

.ad-reopen {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #6d4aff 0%, #8b6eff 100%);
  color: white;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(109,74,255,0.4);
}

.ad-reopen:hover { background: linear-gradient(90deg, #5a3ad6 0%, #7555e6 100%); transform: translateX(-50%) scale(1.05); }

.hidden { display: none !important; }

/* Copy feedback */
.copy-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: rgba(109,74,255,0.9);
  color: white;
  padding: 1rem 2rem;
  border-radius: 1rem;
  font-weight: 600;
  z-index: 999;
  transition: opacity 0.3s;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  color: #9ca3af;
}

/* Light mode overrides */
body:not(.dark) {
  background: #f3f4f6;
  color: #1f2937;
}

body:not(.dark) .card,
body:not(.dark) .faq-item,
body:not(.dark) .protonpass-cta,
body:not(.dark) .password-box {
  background: rgba(255,255,255,0.9);
  color: #1f2937;
  border-color: rgba(109,74,255,0.2);
}

body:not(.dark) .card-footer,
body:not(.dark) label,
body:not(.dark) ul { color: #374151; }

body:not(.dark) input[type="number"] {
  color: #1f2937;
  background: rgba(109,74,255,0.05);
  border-color: rgba(109,74,255,0.2);
}
