/* FindViral - Viewstats.com Inspired Design System */

/* Reset and Base Styles */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

/* Light Theme (Default - Viewstats Style) */
body {
  background: #ffffff;
  color: #1a1a1a;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-weight: 400;
  transition: all 0.3s ease;
}

/* Dark Theme - Modern & Beautiful */
body.dark-theme {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  color: #e2e8f0;
  min-height: 100vh;
}

/* Fix all dark text colors in dark theme */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme p,
body.dark-theme span,
body.dark-theme div {
  color: #e2e8f0 !important;
}

/* Specific fixes for elements with hardcoded dark colors */
body.dark-theme .mobile-nav-link {
  color: #e2e8f0 !important;
}

body.dark-theme .nav-link:hover {
  color: #dc2626 !important;
}

body.dark-theme .loading-text {
  color: #e2e8f0 !important;
}

body.dark-theme .faq-question h3 {
  color: #e2e8f0 !important;
}

/* Typography - Viewstats Style */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: inherit;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Viewstats-style Cards */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.dark-theme .card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Viewstats-style Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: #dc2626;
  color: #ffffff;
}

.btn-primary:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-secondary.active:hover {
  background: #b91c1c;
}

body.dark-theme .btn-secondary {
  background: rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.4);
  backdrop-filter: blur(8px);
}

body.dark-theme .btn-secondary:hover {
  background: rgba(71, 85, 105, 0.8);
  border-color: rgba(220, 38, 38, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

body.dark-theme .btn-secondary.active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

body.dark-theme .btn-secondary.active:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
}

/* Viewstats-style Input */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #ffffff;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input::placeholder {
  color: #9ca3af;
}

body.dark-theme .input {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

body.dark-theme .input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  background: rgba(30, 41, 59, 0.8);
}

body.dark-theme .input::placeholder {
  color: #94a3b8;
}

/* Viewstats-style Navigation */
.nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

body.dark-theme .nav {
  background: rgba(15, 15, 35, 0.9);
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Navigation */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

/* Logo Section */
.nav-logo {
  display: flex;
  align-items: center;
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Pro Tools Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  position: relative;
}

.nav-dropdown-trigger:hover .nav-link {
  color: #dc2626;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.nav-dropdown-link:last-child {
  border-bottom: none;
}

.nav-dropdown-link:hover {
  color: #dc2626;
  background: #fef2f2;
}

body.dark-theme .nav-dropdown-menu {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-theme .nav-dropdown-link {
  color: #cbd5e1;
  border-bottom: 1px solid rgba(71, 85, 105, 0.2);
}

body.dark-theme .nav-dropdown-link:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

/* Navbar dropdown arrow - specific positioning */
.nav-dropdown-trigger .dropdown-arrow {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.nav-dropdown:hover .nav-dropdown-trigger .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dark theme for navbar dropdown arrow */
body.dark-theme .nav-dropdown-trigger .dropdown-arrow {
  color: #94a3b8;
}

body.dark-theme .nav-dropdown:hover .nav-dropdown-trigger .dropdown-arrow {
  color: #dc2626;
}

/* New Badge */
.new-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

body.dark-theme .hamburger-line {
  background: #ffffff;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

body.dark-theme .mobile-menu {
  background: rgba(15, 15, 35, 0.95);
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(20px);
}

.mobile-menu-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: #dc2626;
}

body.dark-theme .mobile-nav-link {
  color: #e2e8f0;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

body.dark-theme .mobile-nav-link:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.mobile-theme-section {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

body.dark-theme .mobile-theme-section {
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.mobile-user-section {
  padding: 1rem 0;
  border-top: 1px solid #f3f4f6;
  margin-top: 0.5rem;
}

body.dark-theme .mobile-user-section {
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-logout-btn,
.mobile-login-btn {
  width: 100%;
  justify-content: center;
}

/* Mobile Pro Tools Section */
.mobile-pro-tools-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

body.dark-theme .mobile-pro-tools-section {
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.mobile-pro-tools-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mobile-sub-link {
  padding-left: 1rem !important;
  font-size: 0.875rem;
  color: #6b7280 !important;
}

body.dark-theme .mobile-sub-link {
  color: #94a3b8 !important;
}

/* Hamburger Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #1a1a1a;
  background: #f3f4f6;
}

body.dark-theme .nav-link {
  color: #cbd5e1;
}

body.dark-theme .nav-link:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

/* Viewstats-style Search Bar */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1.5rem 4rem 1.5rem 1.5rem; /* Increased padding, moved icon space to right */
  border: none; /* Remove border for gradient effect */
  border-radius: 20px; /* More rounded corners */
  font-size: 1.125rem; /* Bigger font */
  background: #ffffff;
  color: #1a1a1a;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.15), 0 8px 25px -5px rgba(220, 38, 38, 0.2);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  right: 1.25rem; /* Moved to right side */
  top: 50%;
  transform: translateY(-50%);
  color: #dc2626; /* Red color to match theme */
  width: 1.5rem; /* Bigger icon */
  height: 1.5rem;
  transition: all 0.3s ease;
  z-index: 2;
}

/* Enhanced search icon hover effect */
.search-icon:hover {
  color: #b91c1c;
  transform: translateY(-50%) scale(1.1);
}

body.dark-theme .search-input {
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  border: 1px solid rgba(71, 85, 105, 0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-theme .search-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.8);
}

body.dark-theme .search-icon {
  color: #dc2626;
}

body.dark-theme .search-icon:hover {
  color: #b91c1c;
  transform: translateY(-50%) scale(1.1);
}

/* Viewstats-style Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0rem 0rem 0rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

body.dark-theme .hero {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-theme .hero-title {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body.dark-theme .hero-subtitle {
  color: #94a3b8;
}

/* Viewstats-style Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 1rem;
}

.feature-card {
  padding: 2rem;
  text-align: center;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: #6b7280;
  line-height: 1.6;
}

body.dark-theme .feature-description {
  color: #94a3b8;
}

/* Viewstats-style Theme Toggle */
.theme-toggle {
  position: relative;
  width: 3rem;
  height: 1.5rem;
  background: #e5e7eb;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: #d1d5db;
}

.theme-toggle-slider {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-theme .theme-toggle {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.4);
}

body.dark-theme .theme-toggle:hover {
  background: rgba(71, 85, 105, 0.8);
  border-color: rgba(220, 38, 38, 0.5);
}

body.dark-theme .theme-toggle-slider {
  transform: translateX(1.5rem);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.theme-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: #6b7280;
}

body.dark-theme .theme-icon {
  color: #94a3b8;
}

/* Minimal Theme Toggle */
.minimal-theme-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimal-theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-theme .minimal-theme-toggle:hover {
  background: rgba(220, 38, 38, 0.1);
}

.minimal-theme-toggle .theme-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #6b7280;
  transition: all 0.2s ease;
}

body.dark-theme .minimal-theme-toggle .theme-icon {
  color: #94a3b8;
}

/* Viewstats-style Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Viewstats-style Footer */
.footer {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin-top: 4rem;
}

body.dark-theme .footer {
  background: rgba(15, 15, 35, 0.9);
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }
  
  .search-input {
    padding: 1.25rem 3.5rem 1.25rem 1.25rem; /* Adjusted for mobile with right icon */
    font-size: 1rem; /* Slightly smaller on mobile */
  }
  
  .search-icon {
    right: 1rem; /* Moved to right for mobile too */
    width: 1.25rem; /* Slightly smaller on mobile */
    height: 1.25rem;
  }
  
  /* Results sidebar responsive */
  .results-container {
    grid-template-columns: 1fr !important;
  }
  
  .results-sidebar {
    position: static !important;
    margin-bottom: 2rem;
  }

  /* Mobile Navigation */
  .nav-desktop {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  /* Mobile Hero Section */
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  /* Mobile Search Card */
  .search-card {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  /* Mobile Features Grid */
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    padding: 2rem 1rem;
  }
  
  /* Override inline styles for features section on mobile */
  #featuresSection > div > div {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Additional mobile feature card styling */
  .feature-card-hover {
    margin-bottom: 1rem;
  }
  
  /* Mobile Premium Section */
  #premiumUpgrade {
    margin: 1rem;
    padding: 1rem;
  }
}

/* Results Layout */
.results-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

.results-sidebar {
  position: sticky;
  top: 2rem;
}

/* Results Page Styles */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

/* Post Card Styles */
.post-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.post-message {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

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

.metric-item {
  text-align: center;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.reaction-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.reaction-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.reaction-badge.love { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.reaction-badge.care { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.reaction-badge.haha { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.reaction-badge.wow { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.reaction-badge.sad { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.reaction-badge.angry { background: rgba(249, 115, 22, 0.1); color: #ea580c; }

.post-type-badge {
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.post-type-badge.video { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.post-type-badge.photo { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.post-type-badge.link { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.post-type-badge.album { background: rgba(147, 51, 234, 0.1); color: #9333ea; }
.post-type-badge.status { background: rgba(107, 114, 128, 0.1); color: #6b7280; }

.view-facebook-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  text-decoration: none;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.view-facebook-btn:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-1px);
}

/* Dark theme adjustments for results */
body.dark-theme .glass-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-theme .post-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(10px);
}

body.dark-theme .post-message {
  color: #cbd5e1;
}

body.dark-theme .metric-item {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

body.dark-theme .metric-label {
  color: #94a3b8;
}

/* Utility classes */
.space-y-4 > * + * {
  margin-top: 1rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-gray-500 {
  color: #6b7280;
}

.text-blue-600 {
  color: #2563eb;
}

.text-green-600 {
  color: #16a34a;
}

.text-purple-600 {
  color: #9333ea;
}

.text-pink-600 {
  color: #db2777;
}

.w-4 {
  width: 1rem;
}

.h-4 {
  height: 1rem;
}

.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-gray-100 {
  --tw-gradient-from: #f3f4f6;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(243, 244, 246, 0));
}

.to-gray-200 {
  --tw-gradient-to: #e5e7eb;
}

.text-gray-400 {
  color: #9ca3af;
}

.results-main {
  min-height: 400px;
}

/* FAQ Section Styles */
.faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.faq-item:hover {
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
  border-color: #dc2626;
}

.faq-item.active {
  border-color: #dc2626;
  box-shadow: 0 4px 12px 0 rgba(220, 38, 38, 0.2);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: #f9fafb;
}

.faq-question h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
}

.faq-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
}

.faq-toggle-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-toggle-icon svg {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #f9fafb;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem 1.5rem;
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Dark theme adjustments for FAQ */
body.dark-theme .faq-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.3);
  backdrop-filter: blur(10px);
}

body.dark-theme .faq-item:hover {
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

body.dark-theme .faq-question:hover {
  background: rgba(220, 38, 38, 0.1);
}

body.dark-theme .faq-question h3 {
  color: #e2e8f0;
}

body.dark-theme .faq-toggle-icon svg {
  color: #94a3b8;
}

body.dark-theme .faq-answer {
  background: rgba(51, 65, 85, 0.6);
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

body.dark-theme .faq-answer p {
  color: #cbd5e1;
}

/* Mobile responsiveness for FAQ */
@media (max-width: 768px) {
  .faq-question {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .faq-question h3 {
    font-size: 1rem;
  }
  
  .faq-icon {
    width: 2rem;
    height: 2rem;
  }
  
  .faq-icon svg {
    width: 1rem;
    height: 1rem;
  }
  
  .faq-answer p {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.9rem;
  }
}

/* Feature Cards Hover Effects */
.feature-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Animation Styles */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #dc2626;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.loading-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #dc2626;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

.loading-text {
  color: #6b7280;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.loading-subtext {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Advanced Loading Animation */
.advanced-loading {
  position: relative;
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
}

.advanced-loading::before,
.advanced-loading::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.advanced-loading::before {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  animation-delay: 0s;
}

.advanced-loading::after {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  background: linear-gradient(135deg, #f63b3b 0%, #dc2626 100%);
  animation-delay: 0.5s;
}

.loading-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid #dc2626;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

/* Enhanced Loading Animation */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(220, 38, 38, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.loading-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loading-spin 2s linear infinite;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.loading-icon::before {
  content: '📊';
  font-size: 1.5rem;
  animation: icon-bounce 1s ease-in-out infinite;
}

.loading-text {
  color: #1a1a1a;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-glow 2s ease-in-out infinite;
}

.loading-subtext {
  color: #6b7280;
  font-size: 1rem;
  text-align: center;
  max-width: 400px;
  line-height: 1.5;
  font-weight: 500;
}

.pulse-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(220, 38, 38, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.pulse-dot {
  width: 1rem;
  height: 1rem;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  border-radius: 50%;
  animation: enhanced-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.pulse-dot:nth-child(1) { animation-delay: 0s; }
.pulse-dot:nth-child(2) { animation-delay: 0.2s; }
.pulse-dot:nth-child(3) { animation-delay: 0.4s; }
.pulse-dot:nth-child(4) { animation-delay: 0.6s; }

.loading-progress {
  width: 200px;
  height: 4px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 100%);
  border-radius: 2px;
  animation: progress-fill 3s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
}

/* Enhanced Loading Animations */
@keyframes loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes icon-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes text-glow {
  0%, 100% { 
    filter: brightness(1);
    transform: scale(1);
  }
  50% { 
    filter: brightness(1.2);
    transform: scale(1.02);
  }
}

@keyframes enhanced-pulse {
  0%, 100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  }
  50% {
    transform: scale(1.3) translateY(-4px);
    opacity: 0.8;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
  }
}

@keyframes progress-fill {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* Dark theme adjustments for loading */
body.dark-theme .loading-spinner {
  border-color: rgba(71, 85, 105, 0.3);
  border-top-color: #dc2626;
}

body.dark-theme .loading-text {
  color: #e2e8f0;
}

body.dark-theme .loading-subtext {
  color: #94a3b8;
}

body.dark-theme .loading-dot {
  background: #dc2626;
}

body.dark-theme .pulse-dot {
  background: #dc2626;
}

/* Sort Dropdown Styles */
.sort-dropdown {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 0.875rem;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  color: #374151;
}

.sort-dropdown:hover {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.1);
}

.sort-dropdown:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.sort-dropdown option {
  padding: 0.5rem;
  background: white;
  color: #374151;
}

/* Sort dropdown arrow - specific for sort dropdowns */
.sort-dropdown + .dropdown-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  transition: color 0.3s ease;
}

.sort-dropdown:hover + .dropdown-arrow {
  color: #dc2626;
}

.sort-dropdown:focus + .dropdown-arrow {
  color: #dc2626;
}

/* Dark theme adjustments for dropdown */
body.dark-theme .sort-dropdown {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

body.dark-theme .sort-dropdown:hover {
  border-color: #dc2626;
  background: rgba(30, 41, 59, 0.8);
}

body.dark-theme .sort-dropdown:focus {
  border-color: #dc2626;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

body.dark-theme .sort-dropdown option {
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
}

body.dark-theme .sort-dropdown + .dropdown-arrow {
  color: #94a3b8;
}

body.dark-theme .sort-dropdown:hover + .dropdown-arrow,
body.dark-theme .sort-dropdown:focus + .dropdown-arrow {
  color: #dc2626;
}

.feature-card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

/* Dark theme fixes for specific sections */

/* Hero section dark theme */
body.dark-theme .hero-modern {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%) !important;
}

body.dark-theme .hero-content h1 {
  color: #e2e8f0 !important;
}

body.dark-theme .hero-content p {
  color: #cbd5e1 !important;
}

/* Pricing cards dark theme */
body.dark-theme .card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body.dark-theme .card h3 {
  color: #e2e8f0 !important;
}

body.dark-theme .card span {
  color: #e2e8f0 !important;
}

body.dark-theme .card p {
  color: #cbd5e1 !important;
}

/* Specific pricing page text color fixes */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
  color: #e2e8f0 !important;
}

body.dark-theme span {
  color: #e2e8f0 !important;
}

body.dark-theme p {
  color: #cbd5e1 !important;
}

/* Video section dark theme */
body.dark-theme #videoSection {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 30%, #16213e 70%, #1a1a2e 100%) !important;
}

body.dark-theme #videoSection h2 {
  color: #e2e8f0 !important;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 30%, #e2e8f0 70%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.dark-theme #videoSection p {
  color: #cbd5e1 !important;
}

/* Features section dark theme */
body.dark-theme .features-section {
  background: rgba(15, 15, 35, 0.9) !important;
}

body.dark-theme .feature-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
}

/* Testimonials section dark theme */
body.dark-theme .testimonials-section {
  background: rgba(15, 15, 35, 0.9) !important;
}

body.dark-theme .testimonial-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
}

/* CTA section dark theme */
body.dark-theme .cta-section {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%) !important;
}

/* Stats section dark theme */
body.dark-theme .stats-section {
  background: rgba(15, 15, 35, 0.9) !important;
}

body.dark-theme .stat-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
}

/* Override specific white backgrounds only */
body.dark-theme .card,
body.dark-theme .hero-modern,
body.dark-theme .video-section,
body.dark-theme .features-section,
body.dark-theme .testimonials-section,
body.dark-theme .cta-section,
body.dark-theme .stats-section {
  background: rgba(30, 41, 59, 0.8) !important;
}

/* Advanced Analytics Page Dark Theme Fixes */
body.dark-theme .analytics-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .analytics-card h1,
body.dark-theme .analytics-card h2,
body.dark-theme .analytics-card h3,
body.dark-theme .analytics-card h4,
body.dark-theme .analytics-card h5,
body.dark-theme .analytics-card h6 {
  color: #e2e8f0 !important;
}

body.dark-theme .analytics-card p,
body.dark-theme .analytics-card span,
body.dark-theme .analytics-card div {
  color: #cbd5e1 !important;
}

body.dark-theme .analytics-card .metric-value {
  color: #e2e8f0 !important;
}

body.dark-theme .analytics-card .metric-label {
  color: #94a3b8 !important;
}

/* Favorites Page Dark Theme Fixes */
body.dark-theme main {
  background: #0f172a !important;
}

body.dark-theme #filterControls {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme #searchInput,
body.dark-theme select {
  border: none !important;
  color: #e2e8f0 !important;
}

body.dark-theme #searchInput::placeholder {
  color: #94a3b8 !important;
}

body.dark-theme .list-item {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .list-item h3 {
  color: #e2e8f0 !important;
}

body.dark-theme .list-item p,
body.dark-theme .list-item span {
  color: #cbd5e1 !important;
}

body.dark-theme #paginationControls {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme #paginationControls button {
  background: rgba(51, 65, 85, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
  color: #e2e8f0 !important;
}

body.dark-theme #paginationControls button:hover {
  background: rgba(71, 85, 105, 0.8) !important;
}

body.dark-theme #paginationControls button:disabled {
  background: rgba(30, 41, 59, 0.5) !important;
  color: #64748b !important;
}

/* Pricing Page Dark Theme Fixes */
body.dark-theme .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

body.dark-theme .hero h1,
body.dark-theme .hero p {
  color: #e2e8f0 !important;
}

body.dark-theme .faq-item {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .faq-question {
  color: #e2e8f0 !important;
}

body.dark-theme .faq-answer {
  color: #cbd5e1 !important;
}

/* Rewrite Content Page Dark Theme Fixes */
body.dark-theme .search-container {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .search-input {
  border: none !important;
  color: #e2e8f0 !important;
}

body.dark-theme .search-input::placeholder {
  color: #94a3b8 !important;
}

body.dark-theme .btn {
  background: rgba(51, 65, 85, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .btn:hover {
  background: rgba(71, 85, 105, 0.8) !important;
}

body.dark-theme .btn-primary {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  border: 1px solid #b91c1c !important;
  color: white !important;
}

body.dark-theme .btn-primary:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b) !important;
}

/* Modal Dark Theme Fixes */
body.dark-theme .modal-overlay {
  background: rgba(0, 0, 0, 0.7) !important;
}

body.dark-theme .modal-content {
  background: rgba(30, 41, 59, 0.95) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .modal-content h1,
body.dark-theme .modal-content h2,
body.dark-theme .modal-content h3,
body.dark-theme .modal-content h4,
body.dark-theme .modal-content h5,
body.dark-theme .modal-content h6 {
  color: #e2e8f0 !important;
}

body.dark-theme .modal-content p,
body.dark-theme .modal-content span,
body.dark-theme .modal-content div {
  color: #cbd5e1 !important;
}

/* Form Elements Dark Theme Fixes */
body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme input[type="password"],
body.dark-theme input[type="number"],
body.dark-theme textarea,
body.dark-theme select {
  border: none !important;
  color: #e2e8f0 !important;
}

body.dark-theme input[type="text"]::placeholder,
body.dark-theme input[type="email"]::placeholder,
body.dark-theme input[type="password"]::placeholder,
body.dark-theme textarea::placeholder {
  color: #94a3b8 !important;
}

/* Stats Cards Dark Theme Fixes */
body.dark-theme .stats-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .stats-card .stat-value {
  color: #e2e8f0 !important;
}

body.dark-theme .stats-card .stat-label {
  color: #94a3b8 !important;
}

/* Loading States Dark Theme Fixes */
body.dark-theme .loading-spinner {
  border-color: rgba(71, 85, 105, 0.4) !important;
  border-top-color: #dc2626 !important;
}

body.dark-theme .loading-text {
  color: #94a3b8 !important;
}

/* Error States Dark Theme Fixes */
body.dark-theme .error-message {
  background: rgba(220, 38, 38, 0.1) !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  color: #fca5a5 !important;
}

/* Success States Dark Theme Fixes */
body.dark-theme .success-message {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
}

/* Chart Containers Dark Theme Fixes */
body.dark-theme .chart-container {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Table Dark Theme Fixes */
body.dark-theme table {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme th {
  background: rgba(51, 65, 85, 0.8) !important;
  color: #e2e8f0 !important;
  border-bottom: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme td {
  color: #cbd5e1 !important;
  border-bottom: 1px solid rgba(71, 85, 105, 0.2) !important;
}

body.dark-theme tr:hover {
  background: rgba(51, 65, 85, 0.3) !important;
}

/* Fix all #f8fafc backgrounds for dark theme */
body.dark-theme [style*="background: #f8fafc"],
body.dark-theme [style*="background:#f8fafc"] {
  background: rgba(30, 41, 59, 0.8) !important;
}

/* Fix all white backgrounds for dark theme */
body.dark-theme [style*="background: white"],
body.dark-theme [style*="background:white"] {
  background: rgba(30, 41, 59, 0.8) !important;
}

/* Fix light gradient backgrounds for dark theme */
body.dark-theme [style*="background: linear-gradient(135deg, #f8fafc"],
body.dark-theme [style*="background: linear-gradient(135deg, #ffffff"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix specific RGB gradient backgrounds for dark theme */
body.dark-theme [style*="background: linear-gradient(135deg, rgb(248, 250, 252)"],
body.dark-theme [style*="background: linear-gradient(135deg, rgb(241, 245, 249)"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix light backgrounds for dark theme */
body.dark-theme [style*="background: white"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
}

/* Fix all f8fafc to white gradient backgrounds for dark theme */
body.dark-theme [style*="background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%)"],
body.dark-theme [style*="background:linear-gradient(135deg, #f8fafc 0%, #ffffff 100%)"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix all f8fafc to e2e8f0 gradient backgrounds for dark theme */
body.dark-theme [style*="background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"],
body.dark-theme [style*="background:linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix specific light backgrounds in various components */
body.dark-theme .analytics-info,
body.dark-theme [class*="analytics-info"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix main backgrounds for dark theme */
body.dark-theme main[style*="background: #f8fafc"],
body.dark-theme main[style*="background:#f8fafc"] {
  background: #0f172a !important;
}

/* Fix main backgrounds with gradient for dark theme */
body.dark-theme main[style*="background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"],
body.dark-theme main[style*="background:linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix section backgrounds for dark theme */
body.dark-theme section[style*="background: #f8fafc"],
body.dark-theme section[style*="background:#f8fafc"] {
  background: rgba(15, 23, 42, 0.8) !important;
}

/* Fix section backgrounds with gradient for dark theme */
body.dark-theme section[style*="background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)"],
body.dark-theme section[style*="background:linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Fix modal and container backgrounds */
body.dark-theme [style*="background: #f8fafc"][style*="border-radius"],
body.dark-theme [style*="background:#f8fafc"][style*="border-radius"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix pagination controls */
body.dark-theme #paginationControls[style*="background: white"],
body.dark-theme #paginationControls[style*="background:white"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix article title containers */
body.dark-theme #articleTitleContainer[style*="background: #f8fafc"],
body.dark-theme #articleTitleContainer[style*="background:#f8fafc"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix stats cards and metric containers */
body.dark-theme [style*="background: #f8fafc"][style*="text-align: center"],
body.dark-theme [style*="background:#f8fafc"][style*="text-align: center"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix thumbnail placeholders */
body.dark-theme [style*="background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"],
body.dark-theme [style*="background:linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)"] {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.8) 100%) !important;
}

/* Fix search container backgrounds */
body.dark-theme [style*="background: white"][style*="border-radius: 1.2rem"],
body.dark-theme [style*="background:white"][style*="border-radius: 1.2rem"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix modal content backgrounds */
body.dark-theme [style*="background: white"][style*="border-radius: 1rem"],
body.dark-theme [style*="background:white"][style*="border-radius: 1rem"] {
  background: rgba(30, 41, 59, 0.95) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix dashboard specific elements */
body.dark-theme .bg-glass {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme .card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix dashboard search input - ensure it works in both light and dark themes */
body.dark-theme .search-input,
body.dark-theme input[type="text"],
body.dark-theme input[type="search"] {
  border: none !important;
  color: #e2e8f0 !important;
}

body.dark-theme .search-input::placeholder,
body.dark-theme input[type="text"]::placeholder,
body.dark-theme input[type="search"]::placeholder {
  color: #94a3b8 !important;
}

/* Ensure light theme search inputs work properly */
.search-input,
input[type="text"],
input[type="search"] {
  border: none !important;
  color: #1f2937 !important;
}

.search-input::placeholder,
input[type="text"]::placeholder,
input[type="search"]::placeholder {
  color: #9ca3af !important;
}

/* Fix text colors in dark theme for better contrast */
body.dark-theme [style*="background: #f8fafc"] h1,
body.dark-theme [style*="background: #f8fafc"] h2,
body.dark-theme [style*="background: #f8fafc"] h3,
body.dark-theme [style*="background: #f8fafc"] h4,
body.dark-theme [style*="background: #f8fafc"] h5,
body.dark-theme [style*="background: #f8fafc"] h6,
body.dark-theme [style*="background:#f8fafc"] h1,
body.dark-theme [style*="background:#f8fafc"] h2,
body.dark-theme [style*="background:#f8fafc"] h3,
body.dark-theme [style*="background:#f8fafc"] h4,
body.dark-theme [style*="background:#f8fafc"] h5,
body.dark-theme [style*="background:#f8fafc"] h6 {
  color: #e2e8f0 !important;
}

body.dark-theme [style*="background: #f8fafc"] p,
body.dark-theme [style*="background: #f8fafc"] span,
body.dark-theme [style*="background: #f8fafc"] div,
body.dark-theme [style*="background:#f8fafc"] p,
body.dark-theme [style*="background:#f8fafc"] span,
body.dark-theme [style*="background:#f8fafc"] div {
  color: #cbd5e1 !important;
}

/* Fix white background text colors */
body.dark-theme [style*="background: white"] h1,
body.dark-theme [style*="background: white"] h2,
body.dark-theme [style*="background: white"] h3,
body.dark-theme [style*="background: white"] h4,
body.dark-theme [style*="background: white"] h5,
body.dark-theme [style*="background: white"] h6,
body.dark-theme [style*="background:white"] h1,
body.dark-theme [style*="background:white"] h2,
body.dark-theme [style*="background:white"] h3,
body.dark-theme [style*="background:white"] h4,
body.dark-theme [style*="background:white"] h5,
body.dark-theme [style*="background:white"] h6 {
  color: #e2e8f0 !important;
}

body.dark-theme [style*="background: white"] p,
body.dark-theme [style*="background: white"] span,
body.dark-theme [style*="background: white"] div,
body.dark-theme [style*="background:white"] p,
body.dark-theme [style*="background:white"] span,
body.dark-theme [style*="background:white"] div {
  color: #cbd5e1 !important;
}

/* Fix Recent Articles section in rewrite-content page */
body.dark-theme #urlHistorySection [style*="background: white"][style*="border-radius: 2rem"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme #urlHistorySection h3 {
  color: #e2e8f0 !important;
}

body.dark-theme #urlHistorySection p {
  color: #cbd5e1 !important;
}

/* Fix pagination controls in recent articles */
body.dark-theme #urlHistorySection #paginationControls[style*="background: white"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

body.dark-theme #urlHistorySection #paginationControls button {
  background: rgba(51, 65, 85, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
  color: #e2e8f0 !important;
}

body.dark-theme #urlHistorySection #paginationControls button:hover {
  background: rgba(71, 85, 105, 0.8) !important;
}

body.dark-theme #urlHistorySection #paginationControls button:disabled {
  background: rgba(30, 41, 59, 0.5) !important;
  color: #64748b !important;
}

body.dark-theme #urlHistorySection #paginationControls span {
  color: #cbd5e1 !important;
}

/* Fix dynamically created history items with light backgrounds */
body.dark-theme [style*="background: white"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix text colors in dynamically created history items */
body.dark-theme [style*="background: white"] h1,
body.dark-theme [style*="background: white"] h2,
body.dark-theme [style*="background: white"] h3,
body.dark-theme [style*="background: white"] h4,
body.dark-theme [style*="background: white"] h5,
body.dark-theme [style*="background: white"] h6 {
  color: #e2e8f0 !important;
}

body.dark-theme [style*="background: white"] p,
body.dark-theme [style*="background: white"] span,
body.dark-theme [style*="background: white"] div {
  color: #cbd5e1 !important;
}

/* More specific targeting for history items in rewrite-content page */
body.dark-theme #urlHistoryList [style*="background: white"] {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.4) !important;
}

/* Fix hover effects for history items */
body.dark-theme #urlHistoryList [style*="background: white"]:hover {
  background: rgba(71, 85, 105, 0.6) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3) !important;
}

/* Features Section Dark Theme */
body.dark-theme #featuresSection {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 30%, #16213e 70%, #1a1a2e 100%) !important;
}

/* Premium Badge Dark Theme */
body.dark-theme .premium-badge {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #e2e8f0 !important;
  border: 2px solid #475569 !important;
}

body.dark-theme .premium-badge::before {
  background: linear-gradient(90deg, transparent, rgba(71, 85, 105, 0.3), transparent) !important;
}

body.dark-theme .analytics-toggle input[type="checkbox"]:checked ~ .toggle-content .premium-badge {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

/* Homepage Video Info Card Dark Theme */
body.dark-theme [style*="background: rgba(255, 255, 255, 0.98)"] {
  background: rgba(15, 23, 42, 0.98) !important;
  border-color: rgba(71, 85, 105, 0.2) !important;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(71, 85, 105, 0.1) !important;
}

body.dark-theme [style*="background: rgba(255, 255, 255, 0.98)"] h3 {
  color: #f1f5f9 !important;
}

body.dark-theme [style*="background: rgba(255, 255, 255, 0.98)"] p {
  color: #cbd5e1 !important;
}

body.dark-theme #featuresSection h2 {
  color: #e2e8f0 !important;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 30%, #e2e8f0 70%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.dark-theme #featuresSection p {
  color: #cbd5e1 !important;
}

body.dark-theme #featuresSection .feature-card {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(71, 85, 105, 0.3) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme #featuresSection .feature-card:hover {
  border-color: #dc2626 !important;
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2) !important;
}

body.dark-theme #featuresSection .feature-card h3 {
  color: #e2e8f0 !important;
}

body.dark-theme #featuresSection .feature-card p {
  color: #cbd5e1 !important;
}

body.dark-theme #featuresSection .feature-card li {
  color: #cbd5e1 !important;
}

body.dark-theme #featuresSection .feature-card li span {
  color: #cbd5e1 !important;
}

.feature-card-hover:hover .feature-icon-gradient {
  transform: scale(1.1);
  box-shadow: 0 8px 25px -5px rgba(220, 38, 38, 0.4);
}

/* Feature Icon Animation */
.feature-icon-gradient {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse Animation for Feature Icons */
@keyframes feature-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.feature-icon-pulse {
  animation: feature-pulse 3s ease-in-out infinite;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text-animated {
  background: linear-gradient(135deg, #1a1a1a 0%, #374151 50%, #1a1a1a 100%);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer Animation for Premium Section */
@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
