/* JFlix Common CSS v8.1 - Latest Version */
:root {
  --primary-color: #e50914;
  --primary-color-rgb: 229, 9, 20;
  --secondary-color: #0071eb;
  --background-color: #141414;
  --card-background: #181818;
  --text-color: #ffffff;
  --text-secondary: #b3b3b3;
  --hover-color: #e50914;
  --navbar-height: 70px;
  --transition-speed: 0.3s;
  --border-radius: 4px;
  --anime-color: #7b68ee;
  --korean-color: #ff69b4;
  --movies-color: #8A2BE2; /* Changed from red to purple */
  --tvshows-color: #0071eb;
  --cartoon-color: #ff9900;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-weight: bold;
  transition: background-color var(--transition-speed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.watch-btn {
  background-color: var(--primary-color);
  color: white;
}

.watch-btn:hover {
  background-color: #f40612;
}

.details-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.details-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.trailer-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
}

.trailer-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.share-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.share-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Navbar */
/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between; /* Positions children to the ends */
  padding: 0 40px;
  z-index: 1000;
  transition: background-color var(--transition-speed);
  background-color: transparent;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between logo and hamburger */
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
  justify-content: flex-end;
}

.navbar.scrolled {
  background-color: var(--background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px; /* Increased height to accommodate the tagline in the SVG */
  margin-right: 10px;
}

/* Hamburger Menu Button - Centered */
.hamburger-menu {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem; /* Adjust size as needed */
  cursor: pointer;
  padding: 5px;
  align-items: center;
  gap: 5px;
  position: absolute; /* Position absolutely for centering */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
}

.hamburger-menu i {
  font-size: 1.5rem; /* Icon size */
}

.hamburger-menu span {
  font-size: 1rem; /* "Menu" text size */
  font-weight: 500;
}

/* Tagline is now part of the SVG logo */
.logo-tagline {
  display: none; /* Hide the separate tagline element */
}

/* Default (Desktop) .nav-links styles */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none; /* In case it was ever set elsewhere */
  padding: 0;
  margin: 0;
  position: static; /* Default flow */
  flex-direction: row; /* Horizontal links */
  background-color: transparent; /* No background by default */
  box-shadow: none; /* No shadow by default */
  width: auto; /* Auto width by default */
}

/* Default (Desktop) .nav-links a styles */
.nav-links a {
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: color var(--transition-speed), background-color var(--transition-speed);
  color: var(--text-color); /* Ensure default text color */
  text-decoration: none;
  border-bottom: none; /* Ensure no mobile border by default */
  text-align: left; /* Default text alignment */
  width: auto; /* Default width */
}

.nav-links a:hover {
  color: var(--hover-color);
  background-color: transparent; /* Or a subtle hover background if desired for desktop */
}

.nav-links a.active {
  font-weight: bold;
  color: var(--primary-color);
}

/* Buy me a Coffee button */
.coffee-btn {
  background-color: #ff0000;
  color: #000;
  padding: 8px 15px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

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

.coffee-btn i {
  font-size: 1rem;
}

.nav-links a {
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: color var(--transition-speed);
}

.nav-links a:hover {
  color: var(--hover-color);
}

.nav-links a.active {
  font-weight: bold;
  color: var(--primary-color);
}

.nav-links a.anime {
  color: var(--anime-color);
}

.nav-links a.anime.active,
.nav-links a.anime:hover {
  color: var(--anime-color);
  border-bottom-color: var(--anime-color);
}

.nav-links a.korean {
  color: var(--korean-color);
}

.nav-links a.korean.active,
.nav-links a.korean:hover {
  color: var(--korean-color);
  border-bottom-color: var(--korean-color);
}

.nav-links a.cartoon {
  color: var(--cartoon-color);
}

.nav-links a.cartoon.active,
.nav-links a.cartoon:hover {
  color: var(--cartoon-color);
  border-bottom-color: var(--cartoon-color);
}

.nav-links a.movies {
  color: var(--movies-color);
}

.nav-links a.tvshows {
  color: var(--tvshows-color);
}

.search-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  margin: 0 10px;
}

.search-bar {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px 8px 35px;
  color: white;
  width: 200px;
  transition: all var(--transition-speed);
  position: relative;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 16px;
  cursor: pointer;
}

.search-bar:focus {
  outline: none;
  width: 250px;
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.search-bar::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background-color: var(--background-dark);
  color: var(--text-color);
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-logo {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 120px;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  flex: 2;
  justify-content: space-around;
}

.footer-section {
  margin: 0 10px 20px;
  min-width: 150px;
}

.footer-section h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.footer-section a {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
}

.faq-link {
  margin-top: 10px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid #333;
  color: var(--text-secondary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
}

/* Donation Modal Overlay */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if content is too long */
  background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
  z-index: 1000; /* Sit on top */
  justify-content: center; /* Center content horizontally (for flex) */
  align-items: center; /* Center content vertically (for flex) */
}

.modal-content {
  position: relative;
  background-color: var(--card-background);
  margin: 5% auto;
  width: 90%;
  max-width: 900px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: white;
  cursor: pointer;
  z-index: 10;
}

.close:hover {
  color: var(--primary-color);
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  overflow-y: auto;
  padding: 100px 20px 20px;
}

.search-modal.show {
  display: block;
}

.search-container {
  max-width: 800px;
}

/* Share Modal - New Design (Copy Link First) */
.share-modal-content {
  display: flex;
  flex-direction: column;
  max-width: 420px;
  padding: 25px;
  margin: 10vh auto;
  background-color: var(--card-background);
  border-radius: 8px;
  text-align: center; /* Default text alignment */
}

/* .close button is absolutely positioned, its order in flex doesn't strictly matter for placement */
/* but good for logical order if CSS for positioning failed */
.share-modal-content .close {
  order: -2; 
}

.share-modal-content h3#share-modal-title-text {
  order: -1; /* Title appears first in flow */
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.copy-link-container {
  order: 1; /* Copy link section after title */
  display: flex;
  gap: 10px;
  margin-bottom: 25px; /* Space before social icons */
  align-items: center;
}

.copy-link-container input#share-link-input {
  flex-grow: 1;
  padding: 0 12px;
  border: 1px solid #555555;
  background-color: #333333;
  color: var(--text-color);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  height: 40px;
}

.copy-link-container .btn.copy-link-btn {
  padding: 0 15px;
  height: 40px;
  font-size: 0.9rem;
  font-weight: bold;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-link-container .btn.copy-link-btn:hover {
  background-color: #f40612;
}

.copy-link-container .btn.copy-link-btn i {
  margin-right: 6px;
  font-size: 1rem;
}

.share-options {
  order: 2; /* Social icons after copy link */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.share-options .social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out;
}

.share-options .social-icon:hover {
  opacity: 0.85;
}

.share-options .social-icon i {
  font-size: 1.5rem;
  color: white;
}

/* Specific social icon background colors (maintained) */
.share-options .social-icon.facebook  { background-color: #1877F2; }
.share-options .social-icon.twitter   { background-color: #1DA1F2; }
.share-options .social-icon.whatsapp  { background-color: #25D366; }
.share-options .social-icon.telegram  { background-color: #0088CC; }
.share-options .social-icon.reddit    { background-color: #FF4500; }
.share-options .social-icon.email     { background-color: #7f8c8d; }

p#copy-link-feedback.copy-feedback {
  order: 3; /* Feedback message last */
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: #aaa;
  margin-top: 15px;
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 10px;
}

#search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="24px" height="24px"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px;
  transition: all 0.3s ease;
}

#search-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.search-exit-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.search-filters {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Compact state (default) */
.search-filters:not(.expanded) {
  gap: 0;
}

.search-filters:not(.expanded) .filter-buttons-container,
.search-filters:not(.expanded) .advanced-selects-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 15px;
  transition: all 0.3s ease;
}

/* Expanded state */
.search-filters.expanded {
  gap: 15px;
}

.search-filters.expanded .filter-buttons-container,
.search-filters.expanded .advanced-selects-container {
  max-height: 200px;
  opacity: 1;
  padding: 15px;
  transition: all 0.3s ease;
}

/* Filter Toggles Container - Always Visible */
.filter-toggles-container {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.filter-toggle, .advanced-toggle {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 12px;
  backdrop-filter: blur(5px);
  flex-shrink: 0;
}

.filter-toggle:hover, .advanced-toggle:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-toggle.active, .advanced-toggle.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(229, 9, 20, 0.8) 100%);
  border-color: var(--primary-color);
  color: white;
}

.filter-toggle-icon, .advanced-toggle-icon {
  transition: transform 0.3s ease;
  font-size: 10px;
}

.filter-toggle.active .filter-toggle-icon,
.advanced-toggle.active .advanced-toggle-icon {
  transform: rotate(180deg);
}

/* Filter Buttons Container */
.filter-buttons-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 11px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(3px);
  flex-shrink: 0;
}

.filter-btn::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;
}

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

.filter-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, rgba(229, 9, 20, 0.8) 100%);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
  transform: translateY(-1px);
}

.filter-btn.anime.active {
  background: linear-gradient(135deg, var(--anime-color) 0%, rgba(255, 140, 0, 0.8) 100%);
  border-color: var(--anime-color);
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.filter-btn.korean.active {
  background: linear-gradient(135deg, var(--korean-color) 0%, rgba(70, 130, 180, 0.8) 100%);
  border-color: var(--korean-color);
  box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
}

.filter-btn.cartoon.active {
  background: linear-gradient(135deg, var(--cartoon-color) 0%, rgba(255, 105, 180, 0.8) 100%);
  border-color: var(--cartoon-color);
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.filter-btn.movies.active {
  background: linear-gradient(135deg, var(--movies-color) 0%, rgba(255, 215, 0, 0.8) 100%);
  border-color: var(--movies-color);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.filter-btn.tvshows.active {
  background: linear-gradient(135deg, var(--tvshows-color) 0%, rgba(0, 191, 255, 0.8) 100%);
  border-color: var(--tvshows-color);
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

/* Advanced Selects Container */
.advanced-selects-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.advanced-selects-container select {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(3px);
  min-width: 120px;
  flex-shrink: 0;
}

.advanced-selects-container select:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.advanced-selects-container select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.1);
}

.advanced-selects-container select option {
  background: #2c2c2c;
  color: white;
  padding: 6px;
}

/* Category badges */
.category-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 10px;
  vertical-align: middle;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.movies-badge {
  background-color: var(--movies-color);
}

.tvshows-badge {
  background-color: var(--tvshows-color);
}

.anime-badge {
  background-color: var(--anime-color);
}

.korean-badge {
  background-color: var(--korean-color);
}

.cartoon-badge {
  background-color: var(--cartoon-color);
}

/* Movie badge for anime movies */
.movie-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 5px;
  background-color: var(--movies-color);
  color: white;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

/* Share Modal Styles */
#share-modal .modal-content {
  max-width: 450px;
  padding: 25px;
  background-color: #2c2c2c; /* Darker background for modal */
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

#share-modal .close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.3s ease;
}

#share-modal .close:hover,
#share-modal .close:focus {
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

#share-modal-title-text {
  text-align: center;
  font-size: 1.4em;
  margin-bottom: 20px;
  color: var(--text-color);
}

.share-options {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

/* Responsive Search Filters */
@media (max-width: 992px) {
  .filter-toggles-container {
    padding: 10px 15px;
    gap: 8px;
  }
  
  .filter-toggle, .advanced-toggle {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .search-filters.expanded .filter-buttons-container {
    padding: 12px;
    gap: 6px;
  }
  
  .filter-btn {
    padding: 5px 12px;
    font-size: 10px;
  }
  
  .search-filters.expanded .advanced-selects-container {
    gap: 8px;
    padding: 12px;
  }
  
  .advanced-selects-container select {
    padding: 5px 10px;
    font-size: 10px;
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  .search-filters {
    margin-bottom: 15px;
  }
  
  .filter-toggles-container {
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
  }
  
  .filter-toggle, .advanced-toggle {
    padding: 6px 12px;
    font-size: 10px;
    width: 100%;
    justify-content: space-between;
  }
  
  .search-filters.expanded .filter-buttons-container {
    padding: 8px;
    gap: 4px;
  }
  
  .filter-btn {
    padding: 4px 10px;
    font-size: 9px;
  }
  
  .search-filters.expanded .advanced-selects-container {
    flex-direction: column;
    gap: 6px;
    padding: 8px;
  }
  
  .advanced-selects-container select {
    width: 100%;
    min-width: auto;
    padding: 4px 8px;
    font-size: 9px;
  }
}

@media (max-width: 576px) {
  .search-filters {
    margin-bottom: 12px;
  }
  
  .filter-toggles-container {
    padding: 6px 10px;
    gap: 4px;
  }
  
  .filter-toggle, .advanced-toggle {
    padding: 5px 10px;
    font-size: 9px;
  }
  
  .search-filters.expanded .filter-buttons-container {
    padding: 6px;
    gap: 3px;
  }
  
  .filter-btn {
    padding: 3px 8px;
    font-size: 8px;
  }
  
  .search-filters.expanded .advanced-selects-container {
    padding: 6px;
    gap: 4px;
  }
  
  .advanced-selects-container select {
    padding: 3px 6px;
    font-size: 8px;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .navbar {
    padding: 0 30px;
  }
}

/* PWA-specific responsive styles */
@media (display-mode: standalone) and (max-width: 1200px) {
  .navbar {
    padding: 0 30px !important;
  }
}

@media (max-width: 992px) {
  :root {
    --navbar-height: 60px;
  }
  .navbar {
    padding: 0 20px;
  }
  .hamburger-menu {
    display: flex; /* Show hamburger menu */
  }
  .nav-links {
    display: none; /* Hide nav links by default */
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    width: 100%;
    background-color: var(--background-color);
    flex-direction: column;
    padding: 10px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 999;
  }
  .nav-links.active {
    display: flex; /* Show when active */
  }
  .nav-links a {
    padding: 12px 20px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #333;
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
  .navbar-right {
    gap: 15px;
  }
  .search-bar {
    max-width: 200px;
  }
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-links {
    flex-direction: column;
    align-items: center;
  }
}

/* PWA tablet styles */
@media (display-mode: standalone) and (max-width: 992px) {
  .navbar {
    padding: 0 20px !important;
  }
  .search-bar {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  .navbar {
    padding: 0 !important;
    height: 60px !important;
  }
  .logo img {
    height: 35px !important;
  }
  .search-bar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 10px;
  }
  .search-bar:focus {
    width: 100% !important;
  }
  .navbar-right {
    gap: 10px;
  }
  .hamburger-menu {
    display: flex !important;
    font-size: 1.2rem;
    padding: 8px;
    /* Center the hamburger menu in tablet mode */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, var(--background-color) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 998;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transition: all 0.3s ease;
    align-items: center; /* Center the navigation items */
  }
  .nav-links a {
    padding: 15px 25px;
    width: 100%;
    text-align: center; /* Center text in navigation items */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    margin: 0;
    border-radius: 0;
    transition: all 0.3s ease;
    max-width: 300px; /* Limit width for better centering */
  }
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px; /* Keep consistent padding */
    padding-right: 25px;
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
  .results {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }
  .modal-content {
    width: 95%;
    padding: 20px;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
  }
  .btn {
    padding: 10px 15px;
    font-size: 0.95rem;
    min-height: 44px; /* Touch-friendly size */
  }
  .content-container,
  .footer-content,
  .banner {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .search-tags {
    display: none !important;
  }
  .coffee-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0 !important;
        height: 55px !important;
    }
    .logo img {
        height: 30px !important;
    }
    .search-bar {
        width: calc(100% - 120px) !important;
        font-size: 14px;
        padding: 8px 12px 8px 35px;
    }
    .navbar-right {
        gap: 8px;
    }
    .hamburger-menu {
        font-size: 1.1rem;
        padding: 6px;
        /* Keep centered positioning from main styles */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .coffee-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: auto;
    }
    .nav-links {
        top: 55px;
        max-height: calc(100vh - 55px);
        align-items: center; /* Ensure centering is maintained */
    }
    .nav-links a {
        padding: 12px 20px;
        font-size: 0.95rem;
        text-align: center; /* Ensure text remains centered */
        max-width: 280px; /* Adjust max-width for smaller screens */
    }
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-height: 40px;
    }
    .content-container,
    .footer-content,
    .banner {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .modal-content {
        width: 98%;
        padding: 15px;
        margin: 10px auto;
    }
}

/* PWA mobile styles */
@media (display-mode: standalone) and (max-width: 576px) {
    .navbar {
        padding: 0 !important;
        height: 55px !important;
    }
    .logo img {
        height: 30px !important;
    }
    .search-bar {
        width: calc(100% - 120px) !important;
        font-size: 14px;
        padding: 8px 12px 8px 35px;
    }
    .navbar-right {
        gap: 8px;
    }
    .hamburger-menu {
        font-size: 1.1rem;
        padding: 6px;
        /* Keep centered positioning from main styles */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .coffee-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: auto;
    }
    .nav-links {
        top: 55px;
        max-height: calc(100vh - 55px);
        align-items: center; /* Ensure centering is maintained */
    }
    .nav-links a {
        padding: 12px 20px;
        font-size: 0.95rem;
        text-align: center; /* Ensure text remains centered */
        max-width: 280px; /* Adjust max-width for smaller screens */
    }
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-height: 40px;
    }
    .content-container,
    .footer-content,
    .banner {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .modal-content {
        width: 98%;
        padding: 15px;
        margin: 10px auto;
    }
}

/* --- Responsive Advanced Search Filters --- */
.search-tags {
  display: none !important;
}
.advanced-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.advanced-filters select {
  flex: 1 1 100%;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

/* Touch-friendly optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Mobile touch devices */
  .btn, .nav-links a, .hamburger-menu, .coffee-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .card:hover, .movie-card:hover, .anime-card:hover {
    transform: none;
  }
  
  .nav-links a:active {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .btn:active {
    transform: scale(0.98);
  }
  
  /* Prevent zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }
  
  /* Smooth scrolling for mobile */
  html, body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Better touch targets */
  .search-bar {
    min-height: 44px;
    padding: 10px 15px !important;
  }
  
  .category-tile, .quick-access-item {
    min-height: 44px;
  }
}

/* Prevent text selection on mobile for better UX */
@media (max-width: 768px) {
  .nav-links a, .btn, .hamburger-menu {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Viewport height optimization for mobile browsers */
:root {
  --vh: 1vh;
}

/* Fix viewport height issues on mobile */
@media (max-width: 768px) {
  .hero-section, .banner {
    height: 50vh;
    min-height: 300px;
  }
  
  .nav-links {
    max-height: calc(100 * var(--vh) - 60px);
  }
}

/* Small mobile viewport fix */
@media (max-width: 576px) {
  .hero-section, .banner {
    height: 40vh;
    min-height: 250px;
  }
  
  .nav-links {
    max-height: calc(100 * var(--vh) - 55px);
  }
}

@media (min-width: 600px) {
  .advanced-filters select {
    flex: 1 1 calc(33.33% - 8px); /* 3 per row with gap */
  }
}

/* ========================================
   AD SECTIONS - Mobile Edge-to-Edge
   ======================================== */
@media (max-width: 768px) {
  .ad-section {
    margin: 20px 0;
    padding: 10px 0;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    max-width: calc(100% + 40px);
    border-radius: 0;
  }

  .ad-section .ad-desktop {
    display: none !important;
  }

  .ad-section .ad-mobile {
    display: block !important;
  }

  .ad-section iframe {
    max-width: 100%;
    width: 100% !important;
  }
}

/* ==================== iOS & ANDROID SPECIFIC STYLES ==================== */

/* Safe area insets for notched devices (iPhone X+, modern Android) */
@supports (padding-top: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    .navbar {
      padding-top: env(safe-area-inset-top) !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
    
    .nav-links {
      padding-top: env(safe-area-inset-top);
    }
    
    /* Ensure hamburger menu stays centered with safe areas */
    .hamburger-menu {
      left: 50%;
      transform: translateX(-50%);
    }
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS devices */
  @media (max-width: 768px) {
    /* Fix iOS Safari 100vh issue */
    .navbar {
      height: calc(60px + env(safe-area-inset-top)) !important;
      min-height: 60px;
    }
    
    /* Ensure hamburger menu is properly centered on iOS */
    .hamburger-menu {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      /* iOS touch optimization */
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      user-select: none;
    }
    
    /* Fix iOS momentum scrolling */
    .nav-links {
      -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on double tap for iOS */
    .hamburger-menu,
    .nav-links a,
    .btn {
      touch-action: manipulation;
    }
  }
}

/* Android Chrome specific fixes */
@supports not (-webkit-touch-callout: none) {
  /* Android devices */
  @media (max-width: 768px) {
    /* Ensure hamburger menu is properly centered on Android */
    .hamburger-menu {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      /* Android touch optimization */
      touch-action: manipulation;
    }
    
    /* Fix Android Chrome address bar issues */
    .navbar {
      position: fixed;
      top: 0;
      will-change: transform;
    }
  }
}

/* General mobile touch optimizations for both iOS and Android */
@media (max-width: 768px) {
  /* Ensure proper touch targets for both platforms */
  .hamburger-menu {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove default button styles */
    -webkit-appearance: none;
    appearance: none;
    /* Prevent text selection */
    -webkit-user-select: none;
    user-select: none;
    /* Remove tap highlight on both platforms */
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Ensure nav menu works on both iOS and Android */
  .nav-links {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Hardware acceleration */
    will-change: transform;
  }
}

/* Landscape mode fixes for both platforms */
@media (max-width: 768px) and (orientation: landscape) {
  .hamburger-menu {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .navbar {
    height: 50px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }
}

/* PWA mode specific for iOS/Android */
@media (display-mode: standalone) {
  @media (max-width: 768px) {
    .navbar {
      padding-top: env(safe-area-inset-top, 0px) !important;
    }
    
    .hamburger-menu {
      left: 50%;
      transform: translateX(-50%);
    }
  }
}

/* Fix for iOS momentum scrolling in navigation */
@supports (-webkit-overflow-scrolling: touch) {
  .nav-links {
    -webkit-overflow-scrolling: touch;
  }
}

/* Android Chrome address bar compensation */
@supports (height: 100dvh) {
  @media (max-width: 768px) {
    .nav-links {
      max-height: calc(100dvh - 60px);
    }
  }
  
  @media (max-width: 576px) {
    .nav-links {
      max-height: calc(100dvh - 55px);
    }
  }
}

/* Prevent horizontal scroll on both platforms */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    -webkit-overflow-x: hidden;
  }
  
  /* Ensure content doesn't overflow */
  .content-container,
  .footer-content {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/* Hide install app button completely - both mobile and desktop */
#install-app-button,
.install-prompt-button,
.smart-install-button,
[data-install-prompt],
[data-install-button] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
