@import url('./variables.css');

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

/* Vibrant Background Mesh */
body::before,
body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 450px;
  height: 450px;
  background: var(--gradient-glow);
  top: -100px;
  left: -100px;
  opacity: 0.7;
  animation: float 12s infinite alternate ease-in-out;
}

body::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, rgba(6, 182, 212, 0.15) 60%, transparent 80%);
  bottom: -80px;
  right: -80px;
  opacity: 0.6;
  animation: float 15s infinite alternate-reverse ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.1); }
}

.container {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: #c084fc;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(8px);
}

.title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Glassmorphism Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Input Section */
.input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem;
  font-size: 1.1rem;
  font-family: inherit;
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}

.password-input::placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.password-input:focus {
  background: var(--bg-input-focus);
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.input-actions {
  position: absolute;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Strength Meter Bar */
.strength-container {
  margin-bottom: 1.5rem;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.strength-title {
  color: var(--text-secondary);
  font-weight: 500;
}

.strength-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}

.meter-track {
  height: 8px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 50px;
  background: var(--gradient-weak);
  transition: width 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.entropy-info {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Checklist */
.checklist-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .checklist {
    grid-template-columns: 1fr;
  }
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--badge-fail-bg);
  border: 1px solid var(--badge-fail-border);
  color: var(--badge-fail-color);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.check-item.passed {
  background: var(--badge-pass-bg);
  border-color: var(--badge-pass-border);
  color: var(--badge-pass-color);
}

.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
}

.check-item.passed .check-icon {
  background: #10b981;
  color: #fff;
}

/* Generator Panel */
.generator-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

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

.gen-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gen-title svg {
  color: #c084fc;
}

.range-container {
  margin-bottom: 1rem;
}

.range-label-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.range-value {
  font-weight: 700;
  color: #c084fc;
}

.custom-range {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.opt-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.opt-checkbox {
  accent-color: #a855f7;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 45px -5px rgba(168, 85, 247, 0.55);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  pointer-events: none;
}

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

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
