 /* ========================================
   🔐 PASSWORD GENERATOR - RESPONSIVE CSS
   Mobile First + Desktop Friendly
   Matches Calculator Tool Structure
======================================== */

/* ✅ Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Theme (Matching index.html) */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: hsl(258, 90%, 66%);
  --accent-color: #ec4899;
  --success-color: #10b981;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --error-color: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   ⬅️ ENHANCED BACK BUTTON
======================================== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--card-bg);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  margin: 4rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  width: fit-content;
}

.back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s ease;
}

.back-btn:hover::before {
  left: 100%;
}

.back-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.back-btn:active {
  transform: translateX(-3px) scale(0.98);
}

/* ========================================
   📦 MAIN CONTAINER
======================================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  width: 100%;
  background: transparent;
  flex: 1;
}

/* ========================================
   📄 PAGE HEADER
======================================== */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

/* ========================================
   🎨 PASSWORD WRAPPER
======================================== */
.password-wrapper {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  animation: fadeInUp 0.6s ease;
}

/* ========================================
   🔐 PASSWORD DISPLAY SECTION
======================================== */
.password-section {
  margin-bottom: 2rem;
}

.password-display-card {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

/* Password Display */
.password-display-section {
  margin-bottom: 2rem;
}

.password-display-section h3 {
  font-size: 1.1rem;
  color: #f7fafc;
  margin-bottom: 1rem;
  text-align: center;
}

.password-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  border: 2px solid #4a5568;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

#generatedPassword {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f7fafc;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  min-height: 1.5rem;
}

.btn-copy {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-copy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-copy:not(:disabled):hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-copy.copied {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Strength Meter */
.strength-meter-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
}

.strength-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.strength-text {
  font-weight: 700;
  font-size: 1rem;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f59e0b; }
.strength-text.strong { color: #10b981; }
.strength-text.very-strong { color: #06b6d4; }

.strength-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 4px;
  transition: all 0.5s ease;
  width: 0;
}

.strength-fill.weak { 
  width: 25%; 
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); 
}
.strength-fill.medium { 
  width: 50%; 
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); 
}
.strength-fill.strong { 
  width: 75%; 
  background: linear-gradient(90deg, #10b981 0%, #059669 100%); 
}
.strength-fill.very-strong { 
  width: 100%; 
  background: linear-gradient(90deg, #06b6d4 0%, #0891b2 100%); 
}

/* ========================================
   ⚙️ OPTIONS SECTION
======================================== */
.options-section {
  margin-bottom: 2rem;
}

.options-section h4 {
  font-size: 1rem;
  color: #f7fafc;
  margin-bottom: 1.25rem;
  text-align: center;
}

.option-group {
  margin-bottom: 1.25rem;
}

.option-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.length-value {
  font-size: 1.1rem;
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

/* Range Slider */
.slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 0.5rem;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.length-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Custom Checkboxes */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  position: relative;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #4a5568;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkmark {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-color: var(--primary-color);
}

.checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.checkbox-label input:checked ~ .checkmark::after {
  transform: translate(-50%, -50%) scale(1);
}

.checkbox-label span:last-child {
  color: #e2e8f0;
  font-size: 0.95rem;
}

/* ========================================
   🔘 BUTTONS
======================================== */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #9333ea 100%);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
  box-shadow: none;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

/* ========================================
   📜 HISTORY SECTION
======================================== */
.history-section {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.history-section h4 {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.history-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 2rem 1rem;
}

.history-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  word-break: break-all;
}

.history-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateX(5px);
}

.history-copy-btn {
  padding: 0.4rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.history-copy-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.btn-clear-history {
  width: 100%;
  padding: 0.75rem;
  background: var(--error-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear-history:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ========================================
   ℹ️ INFO SECTION
======================================== */
.info-section {
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease 0.6s backwards;
}

.info-section h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.info-section ul {
  list-style: none;
  padding-left: 0;
}

.info-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.5;
}

.info-section li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* ========================================
   💡 TIPS SECTION
======================================== */
.tips-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease 0.7s backwards;
}

.tips-section h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.tip-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.tip-card:hover {
  border-color: #f59e0b;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.tip-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.tip-card h4 {
  font-size: 1.05rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ========================================
   🚀 FEATURES SECTION
======================================== */
.features-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease 0.8s backwards;
}

.features-section h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.feature-card h4 {
  font-size: 1.05rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ========================================
   👣 FOOTER STYLES
======================================== */
.pro-footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  padding: 3rem 1rem 1rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-brand {
  text-align: center;
}

.footer-brand img {
  width: 200px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-top: 0;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.contact p {
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.contact small {
  display: block;
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #475569;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.copyright-warning {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* ========================================
   📱 RESPONSIVE DESIGN - TABLETS (640px+)
======================================== */
@media (min-width: 640px) {
  .password-wrapper {
    padding: 2.5rem 2rem;
  }

  .button-group {
    flex-direction: row;
    gap: 1rem;
  }

  .btn {
    flex: 1;
  }

  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   💻 RESPONSIVE DESIGN - DESKTOP (768px+)
======================================== */
@media (min-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .page-header p {
    font-size: 1.1rem;
  }

  .password-wrapper {
    padding: 3rem;
  }

  .password-display-card {
    padding: 2rem;
  }

  .tips-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature-card {
    padding: 2rem 1.5rem;
  }

  .footer-container {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }

  .footer-brand {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 2.5rem 2rem;
  }

  .page-header h1 {
    font-size: 3rem;
  }

  .password-wrapper {
    padding: 3.5rem;
  }
}

/* ========================================
   ✨ ANIMATIONS & EFFECTS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tip-card {
  animation: fadeInUp 0.6s ease backwards;
}

.tip-card:nth-child(1) { animation-delay: 0.1s; }
.tip-card:nth-child(2) { animation-delay: 0.2s; }
.tip-card:nth-child(3) { animation-delay: 0.3s; }
.tip-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card {
  animation: fadeInUp 0.6s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   ♿ ACCESSIBILITY
======================================== */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/*Google Ads*/
.ad-sidebar {
  width: 100%; /* Full on mobile */
  max-width: 300px; /* Sidebar size on desktop */
  margin: 20px auto; /* Center it */
  text-align: center;
  border-radius: 8px;
}

/* ========================================
   📝 BLOG CTA
======================================== */
.blog-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}

.blog-cta-content h3 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.blog-cta-content p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.blog-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.blog-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
