/* ===== BROWSE PAGE LAYOUT ===== */
.browse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1px;
  margin-top: 5px;
  padding: 5px;
}

.type-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-box-input {
  display: none;
  width: 0;
  transition: all 0.3s ease;
}

.search-box.expanded .search-box-input {
  display: block;
  width: 180px;
}

/* Mobile filter dropdown button */
.mobile-filter-btn {
  display: none;
  background: linear-gradient(135deg, #e50914 0%, #b2070e 100%);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-left: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.2);
}

.mobile-filter-btn:hover {
  background: linear-gradient(135deg, #ff0a16 0%, #d40810 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(229, 9, 20, 0.3);
}

.mobile-filter-btn i {
  margin-right: 8px;
}

/* Mobile filter dropdown */
.mobile-filter-dropdown {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.mobile-filter-dropdown.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-filter-header h3 {
  color: white;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(135deg, #e50914 0%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-filter-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-filter-close:hover {
  background: rgba(229, 9, 20, 0.8);
  transform: rotate(90deg);
}

.mobile-filter-options {
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex: 1;
}

.mobile-filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-filter-group label {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-filter-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  padding: 15px 20px;
  font-size: 16px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-filter-group select:focus {
  outline: none;
  border-color: #e50914;
  background: rgba(229, 9, 20, 0.1);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.mobile-filter-group select option {
  background: #1a1a1a;
  color: white;
  padding: 10px;
}

.mobile-filter-apply {
  background: linear-gradient(135deg, #e50914 0%, #b2070e 100%);
  border: none;
  border-radius: 12px;
  color: white;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.mobile-filter-apply:hover {
  background: linear-gradient(135deg, #ff0a16 0%, #d40810 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.mobile-filter-apply:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mobile-filter-btn {
    display: inline-flex;
    align-items: center;
  }
  
  .browse-header .filters .filter-select {
    display: none;
  }
  
  .browse-header .search-box {
    margin-left: auto;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .mobile-filter-dropdown {
    padding: 15px;
  }
  
  .mobile-filter-header h3 {
    font-size: 20px;
  }
  
  .mobile-filter-group select {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .mobile-filter-apply {
    padding: 16px 20px;
    font-size: 16px;
  }
}

/* Scrollbar styling for the dropdown */
.mobile-filter-dropdown::-webkit-scrollbar {
  width: 6px;
}

.mobile-filter-dropdown::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.mobile-filter-dropdown::-webkit-scrollbar-thumb {
  background: rgba(229, 9, 20, 0.6);
  border-radius: 10px;
}

.mobile-filter-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 9, 20, 0.8);
}

/* Overlay background animation */
.mobile-filter-dropdown::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 26, 26, 0.95) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-filter-dropdown.active::before {
  opacity: 1;
}

/* ===== BROWSE CONTENT GRID ===== */
.browse-content-grid {
  display: grid;
  gap: 8px;
  margin: 1px 0;
  padding: 5px;
  grid-template-columns: repeat(3, 1fr); /* Default 3 columns */
}

.browse-card {
  position: relative;
  background: #1a1a1a;
  border-radius: 1px;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
  aspect-ratio: 2/3;
}

.browse-card[data-type="series"],
.browse-card[data-type="live"] {
  aspect-ratio: 16/9;
}

.browse-card:hover {
  transform: scale(1.05);
  z-index: 5;
}

.browse-card-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.browse-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.browse-tags-container {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  gap: 3px;
  z-index: 5;
  flex-wrap: wrap;
  max-width: calc(100% - 10px);
}

.browse-language-tag {
  background: linear-gradient(60deg, #eaa538, #d31027);
  color: white;
  padding: 2px 6px;
  border-radius: 1px;
  font-size: 9px;
  white-space: nowrap;
  line-height: 1.2;
}

.browse-season-tag {
  background: rgba(0, 123, 255, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 1px;
  font-size: 9px;
  white-space: nowrap;
  line-height: 1.2;
}

.browse-premium-tag {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(229, 9, 20, 0.9);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 4;
  box-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.browse-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.browse-card:hover .browse-card-overlay {
  opacity: 1;
}

.browse-play-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #e50914;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 4;
}

.browse-watchlist-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  backdrop-filter: blur(10px);
  z-index: 4;
}

.browse-watchlist-btn.browse-in-watchlist {
  background: #1db954;
}

.browse-card-title {
  padding: 6px;
  text-align: center;
  font-size: 11px;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.browse-card:hover .browse-card-title {
  opacity: 1;
  background: #e50914;
}

/* ===== FILTER ELEMENTS ===== */
.filter-select {
  padding: 8px;
  background: #1a1a1a;
  color: white;
  border: 1px solid #333;
  border-radius: 1px;
  min-width: 130px;
  font-size: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 4px;
}

.search-box input {
  background: transparent;
  border: none;
  color: white;
  padding: 6px;
  width: 0;
  font-size: 14px;
  transition: width 0.3s ease;
}

.search-box.expanded input {
  width: 150px;
}

.search-box button {
  background: transparent;
  border: none;
  color: #1db954;
  cursor: pointer;
  font-size: 14px;
  padding: 6px 8px;
}

/* ===== TYPE TABS ===== */
.type-tab {
  padding: 10px 10px;
  background: #1a1a1a;
  color: white;
  text-decoration: none;
  border-radius: 1px;
  transition: background 0.3s;
  font-size: 14px;
  white-space: nowrap;
}

.type-tab.active {
  background: #ff002d;
}

.type-tab:hover:not(.active) {
  background: #333;
}

/* ===== PAGINATION ===== */
.browse-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: 5px;
}

.browse-pagination a {
  padding: 6px 12px;
  background: #474342;
  color: white;
  border-radius: 1px; 
  transition: background 0.3s;
  text-decoration: none;
  font-size: 14px;
}

.browse-pagination a.browse-active {
  background: #ff0000;
}

.browse-pagination a:hover:not(.browse-active) {
  background: #333;
}

/* ===== NO RESULTS ===== */
.browse-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #ccc;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Smart TV & Extra Large screens - 12 movies, 4 series/live */
@media (min-width: 1600px) {
  .browse-content-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    padding: 10px;
  }
  
  /* Target series and live TV grids specifically */
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0px;
  }
  
  /* Add extra margin to series/live cards on large screens */
  .browse-content-grid[data-type="series"] .browse-card,
  .browse-content-grid[data-type="live"] .browse-card {
    margin: 8px; /* Additional spacing around each card */
  }
  
  /* Also add some spacing to movie cards for consistency */
  .browse-content-grid[data-type="movie"] .browse-card {
    margin: 4px;
  }
}

/* Large screens - 8 movies, 4 series/live */
@media (min-width: 1200px) and (max-width: 1599px) {
  .browse-content-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 5px;
  }
  
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 5px;
  }
  
  .browse-content-grid[data-type="series"] .browse-card,
  .browse-content-grid[data-type="live"] .browse-card {
    margin: 6px;
  }
  
  .browse-content-grid[data-type="movie"] .browse-card {
    margin: 6px;
  }
}

/* Smart TV & Extra Large screens */
@media (min-width: 1600px) {
  /* Header spacing */
  .browse-header {
    margin-top: 15px;
    padding: 15px 20px;
    gap: 20px;
  }
  
  .type-tabs {
    gap: 15px;
  }
  
  .type-tab {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  .filters {
    gap: 20px;
  }
  
  .filter-select {
    padding: 12px 16px;
    min-width: 160px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  .search-box {
    border-radius: 25px;
    padding: 8px;
  }
  
  .search-box.expanded input {
    width: 250px;
    font-size: 16px;
    padding: 8px 12px;
  }
  
  .search-box button {
    font-size: 16px;
    padding: 8px 12px;
  }
  
  /* Pagination spacing */
  .browse-pagination {
    margin: 30px 20px 20px;
    gap: 12px;
  }
  
  .browse-pagination a {
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 8px;
    min-width: 45px;
    text-align: center;
  }
}

/* Large screens */
@media (min-width: 1200px) and (max-width: 1599px) {
  /* Header spacing */
  .browse-header {
    margin-top: 12px;
    padding: 12px 15px;
    gap: 15px;
  }
  
  .type-tabs {
    gap: 12px;
  }
  
  .type-tab {
    padding: 8px 18px;
    font-size: 15px;
    border-radius: 6px;
  }
  
  .filters {
    gap: 15px;
  }
  
  .filter-select {
    padding: 10px 14px;
    min-width: 150px;
    font-size: 15px;
    border-radius: 6px;
  }
  
  .search-box {
    border-radius: 22px;
    padding: 6px;
  }
  
  .search-box.expanded input {
    width: 200px;
    font-size: 15px;
    padding: 7px 10px;
  }
  
  .search-box button {
    font-size: 15px;
    padding: 7px 10px;
  }
  
  /* Pagination spacing */
  .browse-pagination {
    margin: 25px 15px 15px;
    gap: 10px;
  }
  
  .browse-pagination a {
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 6px;
    min-width: 40px;
    text-align: center;
  }
}

/* Medium screens - keep existing or adjust slightly */
@media (min-width: 900px) and (max-width: 1199px) {
  .browse-header {
    margin-top: 10px;
    padding: 10px 12px;
  }
  
  .browse-pagination {
    margin: 20px 12px 12px;
  }
}

/* Ensure mobile filter button is hidden on large screens */
@media (min-width: 600px) {
  .mobile-filter-btn {
    display: none;
  }
}

/* Show mobile filter button only on mobile */
@media (max-width: 599px) {
  .mobile-filter-btn {
    display: flex;
  }
  
  /* Hide desktop filters on mobile */
  .filters .filter-select {
    display: none;
  }
}

/* ===== LARGE SCREEN SPACING FOR HEADER & PAGINATION ===== */

/* Smart TV & Extra Large screens */
@media (min-width: 1600px) {
  /* Main content container spacing */
  .main-content {
    padding: 0 0px;
  }
  
  /* Header spacing - add margin between header and content */
  .browse-header {
    margin: 20px 0 30px 0; /* top right bottom left */
    padding: 20px 25px;
    gap: 25px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 12px;
    border: 1px solid #333;
  }
  
  .type-tabs {
    gap: 15px;
  }
  
  .type-tab {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    margin: 5px;
  }
  
  .filters {
    gap: 20px;
  }
  
  .filter-select {
    padding: 12px 18px;
    min-width: 160px;
    font-size: 16px;
    border-radius: 8px;
    margin: 5px;
  }
  
  .search-box {
    border-radius: 25px;
    padding: 8px 12px;
    margin: 5px;
  }
  
  .search-box.expanded input {
    width: 250px;
    font-size: 16px;
    padding: 8px 15px;
  }
  
  .search-box button {
    font-size: 16px;
    padding: 8px 12px;
  }
  
  /* Add spacing between content grid and pagination */
  .browse-content-grid {
    margin: 0 0 40px 0; /* Add bottom margin before pagination */
  }
  
  /* Pagination spacing - center and add more space */
  .browse-pagination {
    margin: 5px 5px 30px 5px;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 12px;
    border: 1px solid #333;
  }
  
  .browse-pagination a {
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 8px;
    min-width: 50px;
    text-align: center;
    margin: 2px;
  }
}

/* Large screens */
@media (min-width: 1200px) and (max-width: 1599px) {
  /* Main content container spacing */
  .main-content {
    padding: 0 0px;
  }
  
  /* Header spacing */
  .browse-header {
    margin: 15px 0 10px 0;
    padding: 15px 20px;
    gap: 20px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 10px;
    border: 1px solid #333;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .type-tabs {
    gap: 12px;
  }
  
  .type-tab {
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 6px;
    margin: 4px;
  }
  
  .filters {
    gap: 15px;
  }
  
  .filter-select {
    padding: 10px 16px;
    min-width: 150px;
    font-size: 15px;
    border-radius: 6px;
    margin: 4px;
  }
  
  .search-box {
    border-radius: 22px;
    padding: 6px 10px;
    margin: 4px;
  }
  
  .search-box.expanded input {
    width: 200px;
    font-size: 15px;
    padding: 7px 12px;
  }
  
  .search-box button {
    font-size: 15px;
    padding: 7px 10px;
  }
  
  /* Add spacing between content grid and pagination */
  .browse-content-grid {
    margin: 0 0 30px 0;
  }
  
  /* Pagination spacing */
  .browse-pagination {
    margin: 10px 10px 25px 10px;
    gap: 12px;
    justify-content: center;
    padding: 15px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 10px;
    border: 1px solid #333;
  }
  
  .browse-pagination a {
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
    margin: 2px;
  }
}

/* Medium screens */
@media (min-width: 900px) and (max-width: 1199px) {
  .main-content {
    padding: 0 0px;
  }
  
  .browse-header {
    margin: 12px 0 10px 0;
    padding: 12px 15px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 10px;
    border: 1px solid #333;
    margin-left: 4px;
    margin-right: 4px;
  }
  
  .browse-content-grid {
    margin: 0 0 25px 0;
  }
  
  .browse-pagination {
    margin: 10px 0 20px 0;
    gap: 10px;
    justify-content: center;
    padding: 12px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 12px;
    border: 1px solid #333;
  }
} 

/* Small screens */
@media (min-width: 600px) and (max-width: 899px) {
  .main-content {
    padding: 0 0px;
  }
  
  .browse-header {
    margin: 10px 0 5px 0;
    padding: 10px 12px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 10px;
    border: 1px solid #333;
    margin-left: 4px;
    margin-right: 4px;
  }
  
  .browse-content-grid {
    margin: 0 0 20px 0;
  }
  
  .browse-pagination {
    margin: 10px 5px 15px 0;
    gap: 8px;
    justify-content: center;
    padding: 10px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 12px;
    border: 1px solid #333;
  }
}

/* Mobile screens */
@media (max-width: 599px) {
  .main-content {
    padding: 0 0px;
  }
  
  .browse-header {
    margin: 8px 4px 6px 4px;
    padding: 8px 10px;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 10px;
    border: 1px solid #333;
  }
  
  .browse-content-grid {
    margin: 0 0 15px 0;
  }
  
  .browse-pagination {
    margin: 8px 4px 6px 4px;
    gap: 6px;
    justify-content: center;
    padding: 8px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 12px;
    border: 1px solid #333;
  }
}

/* Ensure mobile filter button is hidden on large screens */
@media (min-width: 600px) {
  .mobile-filter-btn {
    display: none;
  }
}

/* Show mobile filter button only on mobile */
@media (max-width: 599px) {
  .mobile-filter-btn {
    display: flex;
  }
  
  /* Hide desktop filters on mobile */
  .filters .filter-select {
    display: none;
  }
}

/* Medium screens - 6 movies, 3 series/live */
@media (min-width: 900px) and (max-width: 1199px) {
  .browse-content-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 8px;
  }
  
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0px;
  }
  
  .browse-content-grid[data-type="series"] .browse-card,
  .browse-content-grid[data-type="live"] .browse-card {
    margin: 4px;
  }
}

/* Small screens - 4 movies, 2 series/live */
@media (min-width: 600px) and (max-width: 899px) {
  .browse-content-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 8px;
  }
  
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0px;
  }
  
  .browse-content-grid[data-type="series"] .browse-card,
  .browse-content-grid[data-type="live"] .browse-card {
    margin: 3px;
  }
}

/* Mobile screens - ALWAYS 3 movies, 2 series/live */
@media (max-width: 599px) {
  .browse-content-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 5px;
  }
  
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0px;
  }
  
  /* Reduce card size for better fit */
  .browse-card {
    aspect-ratio: 2/3;
  }
  
  /* Make text smaller to fit */
  .browse-card-title {
    font-size: 9px;
    padding: 3px;
    line-height: 1.1;
  }
  
  /* Reduce overlay button sizes */
  .browse-play-btn {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  
  .browse-watchlist-btn {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  
  /* Make language tag smaller */
  .browse-language-tag {
    font-size: 8px;
  }
  
  /* Make premium tag smaller */
  .browse-premium-tag {
    width: 16px;
    height: 16px;
    font-size: 8px;
  }
  
  /* Hide desktop filters, show mobile filter button */
  .filters .filter-select {
    display: none;
  }
  
  .mobile-filter-btn {
    display: flex;
    align-items: center;
  }
  
  .search-box.expanded input {
    width: 120px;
  }
  
  /* Hide search box on mobile */
  .search-box {
    display: none;
  }
  
  /* Keep header items on the same line on mobile */
  .browse-header {
    flex-direction: row; /* Keep items in a row */
    flex-wrap: wrap; /* Allow wrapping if needed */
  }
  
  .type-tabs {
    justify-content: flex-start; /* Remove center alignment */
  }
  
  .filters {
    justify-content: flex-end; /* Keep filters on the right */
  }
}

/* Very small screens - 3 movies, 2 series/live */
@media (max-width: 380px) {
  .browse-content-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
  }
  
  .browse-content-grid[data-type="series"],
  .browse-content-grid[data-type="live"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
  }
  
  .browse-card-title {
    font-size: 8px;
  }
  
  .type-tab {
    font-size: 12px;
  }
  
  /* Adjust header for very small screens */
  .browse-header {
    align-items: stretch;
  }
  
  .type-tabs, .filters {
    justify-content: center; /* Center on very small screens */
  }
}

/* Skeleton Loading for Browse Page */
.browse-skeleton-grid {
    display: grid;
    gap: 8px;
    margin: 1px 0;
    padding: 5px;
    grid-template-columns: repeat(3, 1fr);
}

.browse-skeleton-card {
    background-color: #1a2245;
    border-radius: 1px;
    overflow: hidden;
    aspect-ratio: 2/3;
    position: relative;
}

.browse-skeleton-card[data-type="series"],
.browse-skeleton-card[data-type="live"] {
    aspect-ratio: 16/9;
}

.browse-skeleton-loading {
    position: relative;
    overflow: hidden;
}

.browse-skeleton-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 150%; }
}

/* Skeleton tags and premium indicators */
.browse-skeleton-tags-container {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 3px;
    z-index: 5;
    flex-wrap: wrap;
    max-width: calc(100% - 10px);
}

.browse-skeleton-language-tag {
    width: 40px;
    height: 14px;
    background: linear-gradient(60deg, #eaa538, #d31027);
    border-radius: 1px;
}

.browse-skeleton-season-tag {
    width: 35px;
    height: 14px;
    background: rgba(0, 123, 255, 0.9);
    border-radius: 1px;
}

.browse-skeleton-premium-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    z-index: 4;
}

.browse-skeleton-title {
    position: absolute;
    bottom: 6px;
    left: 6px;
    right: 6px;
    height: 12px;
    background: #2a335a;
    border-radius: 2px;
}

.browse-content-loaded {
    display: none;
}

/* Image loading states */
.browse-content-image {
    transition: opacity 0.3s ease;
}

.browse-image-loading {
    opacity: 0;
}

.browse-image-loaded {
    opacity: 1;
}

.browse-image-error {
    opacity: 1;
    background: #2a335a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
}

/* Responsive skeleton grid - UPDATED */
@media (min-width: 1600px) {
    .browse-skeleton-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .browse-skeleton-grid[data-type="series"],
    .browse-skeleton-grid[data-type="live"] {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .browse-skeleton-grid[data-type="series"] .browse-skeleton-card,
    .browse-skeleton-grid[data-type="live"] .browse-skeleton-card {
        margin: 8px;
    }
    
    .browse-skeleton-grid[data-type="movie"] .browse-skeleton-card {
        margin: 8px;
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .browse-skeleton-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 5px;
        padding: 5px;
    }
    
    .browse-skeleton-grid[data-type="series"],
    .browse-skeleton-grid[data-type="live"] {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        padding: 5px;
    }
    
    .browse-skeleton-grid[data-type="series"] .browse-skeleton-card,
    .browse-skeleton-grid[data-type="live"] .browse-skeleton-card {
        margin: 6px;
    }
    
    .browse-skeleton-grid[data-type="movie"] .browse-skeleton-card {
        margin: 6px;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .browse-skeleton-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
        padding: 0px;
    }
    
    .browse-skeleton-grid[data-type="series"],
    .browse-skeleton-grid[data-type="live"] {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 0px;
    }
    
    .browse-skeleton-grid[data-type="series"] .browse-skeleton-card,
    .browse-skeleton-grid[data-type="live"] .browse-skeleton-card {
        margin: 4px;
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .browse-skeleton-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 8px;
    }
    
    .browse-skeleton-grid[data-type="series"],
    .browse-skeleton-grid[data-type="live"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 8px;
    }
    
    .browse-skeleton-grid[data-type="series"] .browse-skeleton-card,
    .browse-skeleton-grid[data-type="live"] .browse-skeleton-card {
        margin: 3px;
    }
}

@media (max-width: 599px) {
    .browse-skeleton-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 4px;
    }
    
    .browse-skeleton-grid[data-type="series"],
    .browse-skeleton-grid[data-type="live"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 4px;
    }
    
    /* Adjust skeleton elements for mobile */
    .browse-skeleton-language-tag,
    .browse-skeleton-season-tag {
        height: 12px;
    }
    
    .browse-skeleton-premium-tag {
        width: 16px;
        height: 16px;
    }
    
    .browse-skeleton-title {
        height: 10px;
    }
}

/* End of Section Message */
.end-of-section-message {
  text-align: center;
  padding: 40px 20px;
  margin: 10px 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 1px;
  border: 1px solid #333;
}

.end-of-section-content h3 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 600;
}

.end-of-section-content p {
  color: #ccc;
  font-size: 16px;
  margin-bottom: 25px;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #e50914;
  color: white;
  padding: 12px 24px;
  border-radius: 1px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.view-all-btn:hover {
  background: #f40612;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .end-of-section-message {
    padding: 30px 15px;
    margin: 10px 0;
  }
  
  .end-of-section-content h3 {
    font-size: 20px;
  }
  
  .end-of-section-content p {
    font-size: 14px;
  }
  
  .view-all-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}