/* Search Popup Styles */
.search-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-popup-overlay.active {
  display: block;
  opacity: 1;
}

.search-popup-container {
  position: relative;
  max-width: 800px;
  margin: 100px auto 0;
  padding: 30px;
  background: #101011;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #e50914;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
}

.search-popup-close:hover {
  background: #ff2c42;
  transform: rotate(90deg);
}

.search-input-wrapper {
  margin-bottom: 30px;
}

.search-input-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 15px 25px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.search-input-container:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border-color: #e50914;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.search-icon {
  color: #e50914;
  font-size: 20px;
  margin-right: 15px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  padding: 5px 0;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.clear-search {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 5px;
  margin-left: 10px;
  font-size: 16px;
  transition: color 0.2s;
}

.clear-search:hover {
  color: white;
}

/* Search Results Styles */
.search-results-wrapper {
  max-height: 500px;
  overflow-y: auto;
}

.search-results-header {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.search-results-header span {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.search-stats {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.search-results-list {
  padding: 10px 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(229, 9, 20, 0.3);
  transform: translateX(5px);
}

.result-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 16px;
  color: white;
}

.result-icon.movie {
  background: linear-gradient(135deg, #e50914, #ff2c42);
}

.result-icon.series {
  background: linear-gradient(135deg, #007bff, #00bfff);
}

.result-icon.live {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.result-content {
  flex: 1;
}

.result-title {
  color: white;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 5px;
}

.result-meta {
  display: flex;
  gap: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.result-type {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.result-type.movie {
  background: rgba(229, 9, 20, 0.2);
  color: #ff6b6b;
}

.result-type.series {
  background: rgba(0, 123, 255, 0.2);
  color: #66b3ff;
}

.result-type.live {
  background: rgba(40, 167, 69, 0.2);
  color: #6bff9e;
}

/* No Results Styling */
.search-no-results {
  padding: 40px 20px;
  text-align: center;
  color: white;
}

.no-results-content i {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.no-results-content h3 {
  font-size: 24px;
  margin-bottom: 10px;
  color: white;
}

.no-results-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 30px;
  font-size: 16px;
}

.contact-options {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.contact-option:hover {
  background: #e50914;
  transform: translateY(-2px);
}

/* Loading State */
.search-loading {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: white;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #e50914;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Simple Suggestions (Fallback) */
.suggestion-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 6px;
}

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.suggestion-item i {
  color: #e50914;
  margin-right: 12px;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-popup-container {
    margin: 50px 5px 0;
    padding: 5px;
  }
  
  .search-input-container {
    padding: 12px 20px;
  }
  
  .contact-options {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-option {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  .search-results-wrapper {
    max-height: 400px;
  }
}