body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid #4a9eff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

#loading-indicator {
  position: fixed;
  top: 50%;
  left: 15vw; /* Center in the side panel (30vw wide, so center is at 15vw) */
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 1000; /* Make sure it's above other elements */
  display: none;
}

/* Filter toggles - now using dropdown instead */
.filter-toggle {
  display: none; /* Hide old desktop filters, using dropdown now */
  margin-right: 15px;
  margin-bottom: 15px;
  color: #e0e0e0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* Hide mobile drag handle by default (shown only on mobile) */
.panel-drag-handle {
  display: none;
}

.filter-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.filter-toggle input {
  margin-right: 8px;
}

/* Results summary */
#results-summary {
  margin: 10px 0;
  font-size: 0.9em;
  color: #888;
  background: rgba(74, 158, 255, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid rgba(74, 158, 255, 0.2);
}

#item-count {
  font-weight: bold;
  color: #4a9eff;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

#item-count.update {
  transform: scale(1.2);
  color: #c1d7be;
}

/* Card backdrop */
.card-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(30vw + 40px);
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.card-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Locations section */
.locations-heading h4 {
  margin: 20px 0 10px;
  color: #ddd;
  font-size: 1.1em;
}

.locations-list {
  margin-bottom: 15px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 10px;
}

.location-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.location-item:hover {
  background: rgba(74, 158, 255, 0.2);
}

.no-locations {
  color: #888;
  font-style: italic;
  padding: 5px 0;
}

.highlight-locations-btn {
  background: rgba(74, 158, 255, 0.7);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
  margin-bottom: 15px;
}

.highlight-locations-btn:hover {
  background: rgba(74, 158, 255, 0.9);
}

/* Additional mini-player styling to ensure visibility */
.mini-player {
  position: fixed;
  background-color: #000; 
  border: 2px solid #196875;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 9999 !important;
}

/* Remove mini-player-header as we don't need it anymore */
.mini-player-header {
  display: none;
}

/* Update mini-player-content to take full height without the header */
.mini-player-content {
  position: relative;
  width: 100%;
  height: 100%; /* Full height now that there's no header */
}

.mini-player-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* New close button style for the content area */
.mini-player .mini-player-close {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s, background-color 0.2s;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-player .mini-player-close:hover {
  opacity: 1;
  background: rgba(255, 0, 0, 0.7);
}

/* New drag handle style */
.mini-player-drag-handle {
  opacity: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
  transition: opacity 0.3s;
}

.mini-player:hover .mini-player-drag-handle {
  opacity: 0.7;
}

/* Resize handles */
.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #3fcbe0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10000;
}

.mini-player:hover .resize-handle {
  opacity: 0.7;
}

.resize-handle:hover {
  opacity: 1 !important;
  cursor: nwse-resize;
}

.top-left {
  top: 0;
  left: 0;
  cursor: nwse-resize;
  transform: translate(-50%, -50%);
}

.top-right {
  top: 0;
  right: 0;
  cursor: nesw-resize;
  transform: translate(50%, -50%);
}

.bottom-left {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
  transform: translate(-50%, 50%);
}

.bottom-right {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
  transform: translate(50%, 50%);
}

.movie.mini-player {
  border-color: #9b4d5f;
}

.movie .resize-handle {
  background-color: #9b4d5f;
}

/* Video tab styles */
.video-filters {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

.video-filter-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-filter-btn.active {
  background: rgba(74, 158, 255, 0.7);
  color: white;
}

/* Removed .videos-container styling and merged with .video-item styling for direct children */
.video-item {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgb(25, 23, 88);
  margin-bottom: 15px; /* Added margin between video items */
}

/* Video content styling */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 54%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-music-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(186, 63, 224, 0.6); /* Purple shade for music button */
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  z-index: 25;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(186, 63, 224, 0.4);
  opacity: 0.8;
}

.video-music-btn:hover {
  background: rgba(186, 63, 224, 0.9);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(186, 63, 224, 0.8);
  opacity: 1;
}

.video-info {
  padding: 5px 8px; /* Further reduced padding */
  color: #e0e0e0;
  background: rgba(0, 0, 0, 0.5); /* Darker background */
  border-top: 1px solid rgba(255, 0, 0, 0.05);
}

.video-type {
  font-size: 0.9em;
  font-weight: 600;
  color: #4a9eff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide these elements as we've simplified the info area */
.video-location, .video-country {
  display: none;
}

/* Load more button - improved positioning and visibility */
.load-more-btn {
  display: block;
  margin: 30px auto; /* Increased top/bottom margin for more visibility */
  padding: 10px;
  width: 50px;
  height: 50px;
  background: rgba(74, 158, 255, 0.8); /* Slightly more opaque */
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px; /* Larger font for emoji */
  text-align: center;
  position: relative; /* Ensure it's in the normal flow */
  z-index: 10; /* Make sure it's above other elements */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Add shadow for better visibility */
  display: flex;
  justify-content: center;
  align-items: center;
}

.load-more-btn:hover {
  background: rgba(74, 158, 255, 0.9);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.load-more-btn:disabled {
  background: rgba(100, 100, 100, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Remove the fixed height and overflow settings from #video-content */
#video-content {
  position: relative;
  padding-bottom: 20px;
  /* Removed height and overflow settings to let scrolling happen at the side panel level */
}

.no-videos {
  padding: 20px;
  text-align: center;
  color: #888;
  font-style: italic;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-top: 20px;
}

.error-message {
  padding: 20px;
  text-align: center;
  color: #ff6b6b;
  background: rgba(255, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: 20px;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

#video-loading {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

/* Location message in video tab */
.location-message {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.location-message p {
  margin: 0;
  color: #e0e0e0;
}

.location-message strong {
  color: #4a9eff;
}

/* Video count display styling */
.video-count-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 15px;
  border-radius: 20px;
  margin-bottom: 15px;
  text-align: center;
  color: #e0e0e0;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: 150px;
  margin-left: auto;
  margin-right: auto;
}

#video-count {
  font-weight: bold;
  color: #4a9eff;
  margin-right: 5px;
  font-size: 16px;
}

/* Support Popup Styles */
#support-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-content {
  background: #fff;
  padding: 2rem;
  border-radius: 32px 32px 40px 40px / 36px 36px 48px 48px; /* More curved corners */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-logo {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(74, 158, 255, 0.2);
}

.popup-content h2 {
  color: #4a9eff;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.popup-content p {
  color: #555;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.popup-content a {
  display: inline-block;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.popup-content a:hover {
  transform: scale(1.05);
}

#close-popup {
  background: #f0f0f0;
  color: #666;
  border: none;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  display: block;
  width: 60%;
  max-width: 120px;
  box-sizing: border-box;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: auto;
}

#close-popup:hover {
  background: #e0e0e0;
  color: #333;
}

/* Mobile responsiveness for popup */
@media (max-width: 600px) {
  .popup-content {
    padding: 1.5rem;
    max-width: 320px;
  }
  
  .popup-logo {
    width: 60px;
    height: 60px;
  }
  
  .popup-content h2 {
    font-size: 1.2rem;
  }
  
  .popup-content p {
    font-size: 0.85rem;
  }
}

/* Help Popup Styles */
#help-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.help-content {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  padding: 2rem;
  border-radius: 32px 32px 40px 40px / 36px 36px 48px 48px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.help-content h2 {
  color: #4a9eff;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.help-content .popup-logo {
  display: block;
  margin: 0 auto 1rem auto;
}

.help-text {
  color: #555;
  line-height: 1.6;
  font-size: 0.9rem;
}

.help-text p {
  margin-bottom: 1rem;
}

.help-text h3 {
  color: #4a9eff;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.help-text ul {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
}

.help-text li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

#close-help-popup {
  background: #f0f0f0;
  color: #666;
  border: none;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: block;
  width: 60%;
  max-width: 120px;
  box-sizing: border-box;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#close-help-popup:hover {
  background: #e0e0e0;
  color: #333;
}

/* Mobile responsiveness for help popup */
@media (max-width: 600px) {
  .help-content {
    padding: 1.5rem;
    max-width: 320px;
    max-height: 85vh;
  }
  
  .help-content h2 {
    font-size: 1.2rem;
  }
  
  .help-text {
    font-size: 0.8rem;
  }
  
  .help-text h3 {
    font-size: 1rem;
  }
}

/* About Popup Styles */
#about-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.about-content {
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  padding: 2rem;
  border-radius: 32px 32px 40px 40px / 36px 36px 48px 48px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.about-content h2 {
  color: #4a9eff;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.about-content .popup-logo {
  display: block;
  margin: 0 auto 1rem auto;
}

.about-text {
  color: #555;
  line-height: 1.6;
  font-size: 0.9rem;
}

.about-text p {
  margin-bottom: 1rem;
  text-align: justify;
}

.about-text a {
  color: #72a4f2;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.about-text a:hover,
.about-text a:focus {
  text-decoration: underline;
  color: #4a9eff;
}

.about-content .contact-icons a:hover,
.about-content .contact-icons a:focus {
  background: #e3f0ff;
  color: #4a9eff;
}

.about-content .contact-icons a[aria-label*="YouTube"]:hover,
.about-content .contact-icons a[aria-label*="YouTube"]:focus {
  background: #ffebee;
  color: #ff0000;
}

.about-content .contact-icons a[aria-label*="Email"]:hover,
.about-content .contact-icons a[aria-label*="Email"]:focus {
  background: #e3f0ff;
  color: #654aff;
}

.about-content .contact-icons a[aria-label*="Twitter"]:hover,
.about-content .contact-icons a[aria-label*="Twitter"]:focus,
.about-content .contact-icons a[aria-label*="X ("]:hover,
.about-content .contact-icons a[aria-label*="X ("]:focus {
  background: #e3f0ff;
  color: #1da1f2;
}

.about-content .contact-icons a[aria-label*="Medium"]:hover,
.about-content .contact-icons a[aria-label*="Medium"]:focus {
  background: #f0f0f0;
  color: #000;
}

#close-about-popup {
  background: #f0f0f0;
  color: #666;
  border: none;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: block;
  width: 60%;
  max-width: 120px;
  box-sizing: border-box;
  font-size: 0.95rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#close-about-popup:hover {
  background: #e0e0e0;
  color: #333;
}

/* Mobile responsiveness for about popup */
@media (max-width: 600px) {
  .about-content {
    padding: 1.5rem;
    max-width: 320px;
    max-height: 85vh;
  }
  
  .about-content h2 {
    font-size: 1.2rem;
  }
  
  .about-text {
    font-size: 0.8rem;
  }
  
  .about-content .contact-info {
    font-size: 0.65rem;
    padding: 0.2rem 0.2rem 0.3rem 0.2rem;
  }
}
