.search-view,
.library-view {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 36px 80px;
}

.browse-view {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px 36px 80px;
}

.browse-view .card-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.page-heading {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 24px;
  color: var(--text);
}

.page-heading em {
  font-style: normal;
  color: var(--accent);
}

.tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.tab-item {
  padding: 7px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  transition: all var(--ease);
}

.tab-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.tab-item.active {
  color: #0c0e0d;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(150, 167, 141, 0.3);
}

.ghost-btn {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 12.5px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--ease);
}

.ghost-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(230, 57, 70, 0.08);
}

.state-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 16px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 20px;
  text-align: center;
  gap: 12px;
}

.state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(150, 167, 141, 0.08);
  border: 1px solid rgba(150, 167, 141, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.state-empty h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.state-empty p {
  font-size: 14px;
  color: var(--muted);
  max-width: 360px;
}

.spin-ring {
  display: inline-block;
  position: relative;
  width: 36px;
  height: 36px;
}

.spin-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 28px;
  height: 28px;
  margin: 4px;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spin-ring div:nth-child(1) {
  animation-delay: -0.225s;
}
.spin-ring div:nth-child(2) {
  animation-delay: -0.15s;
}
.spin-ring div:nth-child(3) {
  animation-delay: -0.075s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.browse-tab-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.browse-tab-bar::-webkit-scrollbar {
  display: none;
}

.browse-tab {
  padding: 6px 16px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
  transition: all var(--ease);
}

.browse-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.browse-tab.active {
  background: var(--accent);
  color: #0c0e0d;
  font-weight: 600;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(150, 167, 141, 0.3);
}

.browse-load-more {
  display: block;
  margin: 40px auto 0;
  padding: 12px 36px;
  border-radius: var(--r);
  background: var(--surface2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.browse-load-more:hover {
  border-color: rgba(150, 167, 141, 0.4);
  background: var(--surface3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.browse-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
