/* ========================================
   🔐 PASSWORD CHECKER - RESPONSIVE CSS
   Mobile First + Desktop Friendly
   Matches Image Compressor Design System
======================================== */

/* ✅ 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;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --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: 800px;
  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;
}

/* ========================================
   🎨 CHECKER WRAPPER
======================================== */
.checker-wrapper {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  animation: fadeInUp 0.6s ease;
}

/* ========================================
   📝 INPUT SECTION
======================================== */
.input-section {
  margin-bottom: 2rem;
}

.input-section h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Password Input Group */
.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  background: var(--bg-color);
  font-family: 'Courier New', monospace;
}

.password-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.toggle-visibility {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.toggle-visibility:hover {
  transform: scale(1.1);
}

.privacy-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--success-color);
  font-weight: 500;
}

/* ========================================
   📊 RESULTS SECTION
======================================== */
.results-section {
  animation: fadeIn 0.6s ease 0.2s backwards;
}

/* Strength Meter */
.strength-meter-container {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.strength-meter-container h4 {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.strength-bar {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.5s ease;
  border-radius: 6px;
}

.strength-fill.weak {
  width: 25%;
  background: var(--danger-color);
}

.strength-fill.medium {
  width: 50%;
  background: var(--warning-color);
}

.strength-fill.strong {
  width: 75%;
  background: #3b82f6;
}

.strength-fill.very-strong {
  width: 100%;
  background: var(--success-color);
}

.strength-label {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.strength-label.weak {
  color: var(--danger-color);
}

.strength-label.medium {
  color: var(--warning-color);
}

.strength-label.strong {
  color: #3b82f6;
}

.strength-label.very-strong {
  color: var(--success-color);
}

/* Crack Time Card */
.crack-time-container {
  margin-bottom: 1.5rem;
}

.crack-time-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.crack-time-card .icon {
  font-size: 2.5rem;
}

.crack-info h5 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.crack-time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

/* Password Analysis */
.analysis-container {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.analysis-container h4 {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.analysis-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.check-icon {
  font-size: 1.25rem;
  font-weight: bold;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.check-icon.pass {
  color: var(--success-color);
}

.check-icon.fail {
  color: var(--danger-color);
}

.analysis-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-color);
}

.analysis-item strong {
  color: var(--primary-color);
}

/* Recommendations */
.recommendations-container {
  background: #fef3c7;
  border-left: 4px solid var(--warning-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.recommendations-container h4 {
  font-size: 1.1rem;
  color: #92400e;
  margin-bottom: 1rem;
}

.recommendations-container ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.recommendations-container li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: #78350f;
  line-height: 1.5;
}

.recommendations-container li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
}

/* ========================================
   ℹ️ 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;
}

/* ========================================
   🚀 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;
}

/* ========================================
   🛡️ SECURITY TIPS SECTION
======================================== */
.tips-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease 1s 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: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 1.5rem;
}

.tip-card.danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.tip-card h5 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.tip-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tip-card li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.5;
}

.tip-card li::before {
  position: absolute;
  left: 0;
  font-weight: bold;
}

.tip-card:not(.danger) li::before {
  content: '✓';
  color: var(--success-color);
}

.tip-card.danger li::before {
  content: '✗';
  color: var(--danger-color);
}

/* ========================================
   👣 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) {
  .checker-wrapper {
    padding: 2.5rem 2rem;
  }

  .analysis-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tips-grid {
    grid-template-columns: 1fr 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;
  }

  .checker-wrapper {
    padding: 3rem;
  }

  .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;
  }

  .checker-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;
  }
}

.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);
}
