.browse-header {
  padding: 100px 5% 40px;
  background: linear-gradient(180deg, rgba(20,20,20,0.8) 0%, rgba(20,20,20,0) 100%);
  text-align: center;
}

.browse-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.browse-subtitle {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 24px;
}

.browse-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.filter-group select {
  background: rgba(40, 40, 40, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-width: 140px;
  backdrop-filter: blur(10px);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  transition: all 0.2sease;
}

.filter-group select:hover, .filter-group select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(50, 50, 50, 0.9);
}

.browse-section {
  padding: 0 5% 80px;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1200px) {
  .browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.browse-grid .card {
  width: 100%;
  aspect-ratio: 2/3;
  margin: 0;
  flex: none;
}

/* Inherit card styles from home.css but reset their dimensions for the grid */
.browse-grid .card-poster {
  aspect-ratio: 2/3;
  width: 100%;
}
.browse-grid .card-landscape {
  aspect-ratio: 16/9;
  width: 100%;
}

.loader, .end-message {
  text-align: center;
  padding: 40px 0;
  color: #888;
  font-size: 0.95rem;
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #e50914;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}
@media (max-width: 768px) { .topbar-actions > #openSearchBtn { display: none !important; } }
