.filters {
  margin: 0px 22px 10px 22px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  display: flex;
  padding: 5px 2px 5px 2px;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters button {
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #6A5ACD, #5B4FC7, #4C44C1);
  padding: 8px 15px 6px 15px;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 0 0 1px transparent;
}

.filters button:hover:not(.active) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
}

.filters button.active {
  background: linear-gradient(135deg, #0F0C29, #24243e, #302b63, #4a41a7);
  box-shadow: 0 0 0 1px rgba(106, 90, 205, 0.5);
}

.filters-container {
  position: relative;
  margin: 0px 22px 10px 22px;
}

.filters {
  margin: 0;
}

.category-tabs {
  gap: 8px;
  padding: 5px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #6A5ACD, #5B4FC7, #4C44C1);
  padding: 5px 15px 3px 15px;
  flex-shrink: 0;
  white-space: nowrap;
  color: white;
  font-family: "Rollbox", "Montserrat", sans-serif, arial;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 0 1px transparent;
}

.category-tab:hover:not(:disabled):not(.active) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
}

.category-tab.active {
  background: linear-gradient(135deg, #0F0C29, #24243e, #302b63, #4a41a7);
  box-shadow: 0 0 0 1px rgba(106, 90, 205, 0.5);
}

.category-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tab-badge {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 4px 8px 2px 8px;
  margin-bottom: 2px;
  font-size: 0.8em;
}

.filters button.special-btn {
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
}

.filters button.special-btn:hover:not(.active) {
  background: linear-gradient(135deg, #60a5fa, #6366f1);
}

.filters button.special-btn.active {
  background: linear-gradient(135deg, #0b1f3a, #1e1b4b, #312e81);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.action-row {
  margin-top: 10px;
  display: none;
  gap: 8px;
  padding: 0 2px 8px 2px;
}

.action-row-btn {
  flex: 1;
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #2563eb, #4338ca);
  color: white;
  font-family: "Rollbox", "Montserrat", sans-serif, arial;
  text-transform: uppercase;
  padding: 7px 15px 6px 15px;
  cursor: pointer;
  box-shadow: 0 0 0 1px transparent;
}

.action-row-btn:hover:not(.active) {
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
}

.action-row-btn.active {
  background: linear-gradient(135deg, #0a1a33, #1e1b4b, #312e81);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

.media-toggle {
  display: inline-flex;
  background: #656565;
  border-radius: 5px;
  border: 1px solid rgba(106, 90, 205, 0.35);
  flex-shrink: 0;
  overflow: hidden;
}

.filters .toggle-option {
  background: transparent;
  border: none;
  border-radius: 0;
  color: white;
  padding: 8px 13px 6px 13px;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.filters .toggle-option.active {
  background:#13172099;
  box-shadow: none;
}

html.media-toggle-movie #toggle-movies,
html.media-toggle-tv #toggle-tv {
  background: #13172099;
}

.filters .toggle-option:hover:not(.active) {
  background: #57575799;
  color: white;
}

.genre-page-title {
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  color: white;
  margin: 10px 25px 0 25px;
  padding: 0 0 15px 0;
  letter-spacing: 1.5px;
  position: relative;
}

.genre-page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #6A5ACD;
}

@media (max-width: 840px) {
  .filters-container {
    position: relative;
    margin: 0px 22px 0px 22px;
  }

  .secondary-nav-btn {
    display: none;
  }

  .action-row {
    display: flex;
    padding: 2px 2px 8px 2px;
    margin-top: 10px;
  }
}

@media (max-width: 650px) {
  .filters button {
    font-size: 0.78rem;
    padding: 7px 12px 5px 12px;
  }

  .category-tab {
    flex: 1;
    flex-shrink: 1;
    min-width: 0;
    font-size: 0.78rem;
    padding: 4px 6px 2px 6px;
    gap: 8px;
    justify-content: center;
  }

  .tab-badge {
    padding: 4px 4px 2px 4px;
    margin-bottom: 3px;
    font-size: 0.58rem;
  }

  .action-row-btn {
    font-size: 0.78rem;
    padding: 7px 12px 5px 12px;
  }

  .filters .toggle-option {
    font-size: 0.78rem;
    padding: 7px 10px 5px 10px;
  }

  .genre-page-title {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
  }
}

@media (max-width: 400px) {
  .filters-container {
    margin: 0px 12px 0px 12px;
  }

  .action-row {
    padding: 0 0px 8px 0px;
  }

  .category-tabs {
    display: flex;
    overflow-x: hidden;
  }

  .category-tab {
    gap: 3px;
    justify-content: center;
    padding: 4px 4px 2px 6px;
  }

  .genre-page-title {
    font-size: 1rem;
    margin: 10px 15px 0 15px;
    letter-spacing: 0.5px;
  }
}