/* Modern Minimalistic Search Interface - Cool & Minimalistic Design */

/* Modern Search Form Container */
.modern-search-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Search Input Container - Centered and Prominent */
.search-input-container {
  position: relative;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 1.5rem 2rem 1.5rem 3.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  outline: 1px solid #d1d5db;
}

/* Dark Theme Fixes for Search Enhancements */
body.dark-theme .search-input-wrapper {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

.search-input-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.search-input-wrapper:focus-within {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.1),
    0 10px 10px -5px rgba(220, 38, 38, 0.04);
  border-color: rgba(220, 38, 38, 0.3);
  outline: 1px solid #dc2626;
}

.search-input-wrapper:focus-within::before {
  opacity: 0.1;
}

.modern-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
  outline: none;
  transition: all 0.3s ease;
}

.modern-search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
  background: transparent;
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  color: #6b7280;
  transition: all 0.3s ease;
  z-index: 10;
}

.search-input-wrapper:focus-within .search-icon {
  color: #dc2626;
  transform: scale(1.1);
}

/* Controls Row - Compact and Modern */
.controls-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 1rem;
}

/* Slider Container - Compact Design */
.slider-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.slider-value {
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.875rem;
  min-width: 2.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
  transition: all 0.3s ease;
}

.slider-container:hover .slider-value {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
}

.modern-slider-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

.modern-slider {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 3px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modern-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 
    0 4px 8px rgba(220, 38, 38, 0.3),
    0 0 0 4px rgba(220, 38, 38, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid #ffffff;
}

.modern-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 
    0 6px 12px rgba(220, 38, 38, 0.4),
    0 0 0 6px rgba(220, 38, 38, 0.15);
}

.modern-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

.modern-slider::-webkit-slider-track {
  appearance: none;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
  height: 6px;
  border-radius: 3px;
}

/* Analyze Button - Prominent and Modern */
.analyze-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 15px -3px rgba(220, 38, 38, 0.3),
    0 4px 6px -2px rgba(220, 38, 38, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 140px;
  justify-content: center;
}

.analyze-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.analyze-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.4),
    0 10px 10px -5px rgba(220, 38, 38, 0.1);
}

.analyze-button:hover::before {
  left: 100%;
}

.analyze-button:active {
  transform: translateY(0);
}

.analyze-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: all 0.3s ease;
}

.analyze-button:hover .analyze-icon {
  transform: rotate(15deg) scale(1.1);
}

/* Responsive Design for Modern Layout */
@media (max-width: 768px) {
  .modern-search-form {
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .search-input-wrapper {
    padding: 1.25rem 1.5rem 1.25rem 3rem;
  }
  
  .modern-search-input {
    font-size: 1rem;
  }
  
  .search-icon {
    left: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .controls-row {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .slider-container {
    order: 1;
  }
  
  .analyze-button {
    order: 2;
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .search-input-wrapper {
    padding: 1rem 1.25rem 1rem 2.75rem;
    border-radius: 16px;
  }
  
  .modern-search-input {
    font-size: 0.875rem;
  }
  
  .search-icon {
    left: 1rem;
    width: 1rem;
    height: 1rem;
  }
  
  .slider-label {
    font-size: 0.8rem;
  }
  
  .slider-value {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    min-width: 2rem;
  }
  
  .analyze-button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
  }
  
  .analyze-icon {
    width: 1rem;
    height: 1rem;
  }
}

/* Cool Visual Effects and Animations */

/* Floating Animation for Search Container */
.search-container .card {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Pulse Animation for Search Icon */
.search-icon {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 0.7;
    filter: drop-shadow(0 0 0px rgba(220, 38, 38, 0));
  }
  50% { 
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.3));
  }
}

/* Shimmer Effect for Search Input */
.search-input-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.search-input-wrapper:focus-within::after {
  left: 100%;
}

/* Glow Effect for Slider Value */
.slider-value {
  animation: value-glow 3s ease-in-out infinite;
}

@keyframes value-glow {
  0%, 100% { 
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
  }
  50% { 
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5), 0 0 20px rgba(220, 38, 38, 0.2);
  }
}

/* Magnetic Effect for Analyze Button */
.analyze-button {
  position: relative;
  overflow: hidden;
}

.analyze-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.analyze-button:active::after {
  width: 300px;
  height: 300px;
}

/* Particle Effect Background */
.search-container .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.search-container .card:hover::after {
  opacity: 0;
}

/* Smooth Transitions for All Interactive Elements */
.modern-search-input,
.slider-container,
.analyze-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Focus States */
.modern-search-input:focus {
  transform: scale(1.02);
}

.slider-container:hover {
  transform: translateY(-2px);
}

/* Loading State Animation */
.analyze-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.analyze-button.loading .analyze-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Success State Animation */
.analyze-button.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: success-pulse 0.6s ease-out;
}

@keyframes success-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Error State Animation */
.analyze-button.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: error-shake 0.5s ease-out;
}

@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Cool Visual Effects and Animations */

/* Enhanced Search Form Container */
.search-container {
  position: relative;
  margin-top: 3rem;
}

.search-container .card {
  background: white;
  border: 2px solid transparent;
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(220, 38, 38, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Dark Theme Fixes for Search Enhancements */
body.dark-theme .search-container .card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

.search-container .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  border-radius: 24px 24px 0 0;
}

.search-container .card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25), 
    0 0 0 1px rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Enhanced Search Input */
#searchWrapper {
  position: relative;
  margin-bottom: 2rem;
}

#searchWrapper::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  border-radius: 28px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#searchWrapper:focus-within::before {
  opacity: 1;
}

.search-input {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  font-size: 1.125rem;
  font-weight: 500;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  outline: 1px solid #d1d5db;
}

.search-input:focus {
  outline: 1px solid #dc2626;
  border-color: #dc2626;
  box-shadow: 
    0 0 0 3px rgba(220, 38, 38, 0.1),
    0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  color: #6b7280;
  transition: all 0.3s ease;
  z-index: 10;
}

#searchWrapper:focus-within .search-icon {
  color: #dc2626;
  transform: translateY(-50%) scale(1.1);
}

/* Enhanced Post Count Slider */
.ultra-minimal-slider {
  background: white;
}

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

.ultra-minimal-slider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ultra-minimal-slider:hover {
  border-color: #dc2626;
  box-shadow: 0 8px 25px -5px rgba(220, 38, 38, 0.1);
  transform: translateY(-1px);
}

.ultra-minimal-slider:hover::before {
  opacity: 1;
}

/* Enhanced Range Slider */
#postCountSlider {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

#postCountSlider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 
    0 4px 8px rgba(220, 38, 38, 0.3),
    0 0 0 4px rgba(220, 38, 38, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid #ffffff;
}

#postCountSlider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 
    0 6px 12px rgba(220, 38, 38, 0.4),
    0 0 0 6px rgba(220, 38, 38, 0.15);
}

#postCountSlider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

#postCountSlider::-webkit-slider-track {
  appearance: none;
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
  height: 8px;
  border-radius: 4px;
}

/* Enhanced Slider Value Display */
#sliderValue {
  font-size: 1.25rem;
  color: #dc2626;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(246, 59, 59, 0.1) 100%);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  min-width: 4rem;
  text-align: center;
  border: 2px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#sliderValue::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
  transition: left 0.5s ease;
}

.ultra-minimal-slider:hover #sliderValue::before {
  left: 100%;
}

/* Enhanced Analyze Button */
.btn-primary {
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  padding: 1rem 3rem;
  height: 3.75rem;
  border-radius: 16px;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 10px 15px -3px rgba(220, 38, 38, 0.3),
    0 4px 6px -2px rgba(220, 38, 38, 0.1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.4),
    0 10px 10px -5px rgba(220, 38, 38, 0.1);
}

.btn-primary:hover::before {
  left: 100%;
}

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

/* Enhanced Analytics Toggle */
.enhanced-analytics-section {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

body.dark-theme .enhanced-analytics-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
  border-color: #374151;
}

.enhanced-analytics-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.enhanced-analytics-section:hover {
  border-color: #dc2626;
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.1),
    0 10px 10px -5px rgba(220, 38, 38, 0.04);
  transform: translateY(-2px);
}

.enhanced-analytics-section:hover::before {
  opacity: 1;
}

.enhanced-analytics-section.active {
  border-color: #dc2626;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(246, 59, 59, 0.05) 100%);
  box-shadow: 
    0 0 0 1px #dc2626,
    0 20px 25px -5px rgba(220, 38, 38, 0.3),
    0 10px 10px -5px rgba(220, 38, 38, 0.1);
}

.enhanced-analytics-section.active::before {
  opacity: 1;
}

/* Enhanced Toggle Switch */
.toggle-switch {
  position: relative;
  width: 4rem;
  height: 2rem;
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.5rem;
  height: 1.5rem;
  background: white;
}

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

.analytics-toggle input[type="checkbox"]:checked + .toggle-switch {
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 4px rgba(220, 38, 38, 0.2);
}

.analytics-toggle input[type="checkbox"]:checked + .toggle-switch .toggle-slider {
  transform: translateX(2rem);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* Enhanced Premium Badge */
.premium-badge {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  border: 2px solid #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.premium-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
  transition: left 0.5s ease;
}

.premium-badge:hover::before {
  left: 100%;
}

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

/* Enhanced Status Messages */
.status-message {
  padding: 1.5rem 2rem;
  border-radius: 16px;
  margin: 1.5rem 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.status-message.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
  color: #059669;
}

.status-message.error {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%);
  border: 2px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

.status-message.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 2px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
}

.status-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: inherit;
  opacity: 0.5;
}

/* Enhanced Loading States */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
}

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

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

.loading-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
}

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

.pulse-loading {
  display: flex;
  gap: 0.5rem;
}

.pulse-dot {
  width: 0.75rem;
  height: 0.75rem;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.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; }

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

.loading-progress {
  width: 100%;
  max-width: 300px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

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

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

/* Enhanced Post Cards */
.post-card {
  background: white;
}

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

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: #dc2626;
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.1),
    0 10px 10px -5px rgba(220, 38, 38, 0.04);
}

.post-card:hover::before {
  opacity: 1;
}

/* Enhanced Post Type Badge */
.post-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  transition: all 0.3s ease;
}

.post-type-badge.video {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.post-type-badge.photo {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.post-type-badge.link {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.post-type-badge.status {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.1) 100%);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Enhanced Metrics */
.post-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.metric-item {
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.5) 100%);
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: all 0.3s ease;
}

.metric-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.metric-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Enhanced Reaction Badges */
.reaction-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.reaction-badge.love {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.reaction-badge.care {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.reaction-badge.haha {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.reaction-badge.wow {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.reaction-badge.sad {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.reaction-badge.angry {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Thumbnail Container with Overlay Favorite Button */
.thumbnail-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
}

.post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.favorite-btn-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: white;
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.favorite-btn-overlay:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.favorite-btn-overlay .favorite-icon {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.favorite-btn-overlay:hover .favorite-icon {
  color: #dc2626;
  transform: scale(1.1);
}

.favorite-btn-overlay.favorited {
  background: rgba(220, 38, 38, 0.95);
}

.favorite-btn-overlay.favorited .favorite-icon {
  color: white;
  fill: currentColor;
}

.favorite-btn-overlay.favorited:hover {
  background: rgba(220, 38, 38, 1);
}

/* Enhanced Action Buttons */
.view-facebook-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.view-facebook-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(220, 38, 38, 0.4);
}

.favorite-btn {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px solid #d1d5db;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.favorite-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn.active {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #dc2626;
}

.favorite-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.favorite-btn.active .favorite-icon {
  color: #dc2626;
  fill: #dc2626;
}

/* Enhanced Filter and Sort Controls */
.filter-sort-container {
  background: white;
}

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

.filter-sort-container h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1a1a1a;
  text-align: center;
}

.filter-section, .sort-section {
  margin-bottom: 2rem;
}

.filter-section h4, .sort-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #374151;
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-btn {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: white;
}

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

.filter-btn:hover {
  border-color: #dc2626;
  transform: translateX(4px);
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.sort-dropdown {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
}

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

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

/* Enhanced Sort Options Styling */
.enhanced-sort-option {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(246, 59, 59, 0.05) 100%);
  color: #dc2626;
  font-weight: 600;
  border-left: 3px solid #dc2626;
  padding-left: 0.75rem;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
}

.enhanced-sort-option:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(246, 59, 59, 0.1) 100%);
  transform: translateX(2px);
}

.enhanced-sort-option:checked {
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  border-left-color: #ffffff;
}

/* Enhanced Keyword Filter */
.keyword-filter-container {
  margin-bottom: 2rem;
}

.keyword-filter-container h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #374151;
}

.keyword-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
}

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

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

.clear-keyword-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-keyword-btn:hover {
  border-color: #dc2626;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

/* Enhanced Clear All Filters Button */
.clear-filters-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
}

.clear-filters-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(220, 38, 38, 0.4);
}

/* Modern Limit Message */
.modern-limit-message {
  background: white;
}

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

.modern-limit-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #f63b3b 50%, #ea580c 100%);
  border-radius: 20px 20px 0 0;
}

@keyframes limitMessageSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.limit-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 3px solid #fecaca;
  animation: limitIconPulse 2s ease-in-out infinite;
}

.limit-icon svg {
  width: 2rem;
  height: 2rem;
  color: #dc2626;
}

@keyframes limitIconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
}

.limit-content {
  text-align: center;
}

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

.limit-description {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.limit-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.limit-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(246, 59, 59, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
}

.limit-feature:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(246, 59, 59, 0.1) 100%);
  border-color: rgba(220, 38, 38, 0.2);
}

.limit-feature svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #dc2626;
  flex-shrink: 0;
}

.limit-feature span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.upgrade-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 15px -3px rgba(220, 38, 38, 0.3),
    0 4px 6px -2px rgba(220, 38, 38, 0.1);
  position: relative;
  overflow: hidden;
}

.upgrade-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.upgrade-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 25px -5px rgba(220, 38, 38, 0.4),
    0 10px 10px -5px rgba(220, 38, 38, 0.1);
}

.upgrade-button:hover::before {
  left: 100%;
}

.upgrade-button svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: all 0.3s ease;
}

.upgrade-button:hover svg {
  transform: translateX(2px);
}

/* Responsive Design for Limit Message */
@media (max-width: 768px) {
  .modern-limit-message {
    padding: 2rem;
    margin: 0 1rem;
  }
  
  .limit-title {
    font-size: 1.25rem;
  }
  
  .limit-description {
    font-size: 0.875rem;
  }
  
  .limit-features {
    gap: 0.5rem;
  }
  
  .limit-feature {
    padding: 0.5rem 0.75rem;
  }
  
  .upgrade-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .modern-limit-message {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .limit-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
  }
  
  .limit-icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .limit-title {
    font-size: 1.125rem;
  }
  
  .limit-feature {
    padding: 0.5rem;
  }
  
  .limit-feature svg {
    width: 1rem;
    height: 1rem;
  }
  
  .limit-feature span {
    font-size: 0.8rem;
  }
}

/* Enhanced Pagination */
.pagination-container {
  background: white;
}

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

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: white;
}

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

.pagination-btn:hover:not(:disabled) {
  border-color: #dc2626;
  background: linear-gradient(135deg, #dc2626 0%, #f63b3b 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-info {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
}

.current-page {
  margin-top: 0.75rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-container .card {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .search-input {
    font-size: 1rem;
    padding: 1rem 1.25rem 1rem 3rem;
  }
  
  .ultra-minimal-slider {
    padding: 1rem;
  }
  
  .btn-primary {
    padding: 0.875rem 2rem;
    height: 3.5rem;
    font-size: 1rem;
  }
  
  .enhanced-analytics-section {
    padding: 1.5rem;
  }
  
  .post-metrics {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .metric-item {
    padding: 0.75rem;
  }
  
  .metric-value {
    font-size: 1.25rem;
  }
  
  .filter-sort-container {
    padding: 1.5rem;
    position: static;
  }
  
  .pagination-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pagination-btn {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .search-container .card {
    padding: 1rem;
    margin: 0 0.5rem;
  }
  
  .search-input {
    font-size: 0.875rem;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
  }
  
  .search-icon {
    left: 1rem;
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .ultra-minimal-slider {
    padding: 0.75rem;
  }
  
  #sliderValue {
    font-size: 1rem;
    padding: 0.375rem 0.75rem;
    min-width: 3rem;
  }
  
  .btn-primary {
    padding: 0.75rem 1.5rem;
    height: 3rem;
    font-size: 0.875rem;
  }
  
  .enhanced-analytics-section {
    padding: 1rem;
  }
  
  .post-card {
    padding: 1rem;
  }
  
  .filter-sort-container {
    padding: 1rem;
  }
  
  .filter-btn {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
  
  .sort-dropdown {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
  
  .keyword-input {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
}
