.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100dvh - 6.7rem);
}

// Browse Header
.browse-header {
  padding: 0.75rem 1rem 0;
}

.browse-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff, #e2e8f0, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.browse-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;

  .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    z-index: 1;
  }

  .search-input {
    width: 100%;
    padding-left: 2.25rem;
    font-size: 0.9rem;
  }
}

.filter-sort-wrapper {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-dropdown,
.sort-dropdown {
  min-width: 160px;
}

// Display settings
.display-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--p-surface-500), transparent 50%);
  background: color-mix(in srgb, var(--p-surface-700), transparent 30%);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    color: #e2e8f0;
    border-color: var(--p-primary-400);
  }
}

.display-settings-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 180px;
}

.display-settings-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.scale-value-display {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

// Virtual scroller and grid
.virtual-scroller {
  width: 100%;
  height: calc(100dvh - 12.5rem);
  padding: 1rem;
  box-sizing: border-box;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(20, 20, 30, 0.5);

  &::-webkit-scrollbar {
    width: 12px;
  }

  &::-webkit-scrollbar-track {
    background: rgba(20, 20, 30, 0.5);
    border-radius: 10px;
  }

  @media (max-width: 768px) {
    height: calc(100dvh - 13rem);
    padding: 0.5rem;

    &::-webkit-scrollbar {
      width: 8px;
    }
  }
}

.series-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  justify-items: center;
  width: 100%;
  padding-top: 1rem;
  padding-right: 1rem;
  padding-left: 1rem;
}

.virtual-scroller-item {
  position: relative;
  overflow: visible;
  transition: width 0.2s ease, height 0.2s ease;
}

// Empty state
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;

  .empty-icon {
    font-size: 3rem;
    color: #64748b;
    margin-bottom: 1rem;
  }

  p {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
  }
}

@media (max-width: 767px) {
  .browse-header {
    padding: 0.5rem 0.5rem 0;
  }

  .browse-controls {
    flex-direction: column;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .filter-sort-wrapper {
    width: 100%;
  }

  .filter-dropdown,
  .sort-dropdown {
    flex: 1;
    min-width: 0;
  }
}
