﻿/* pages/browse.css - 拆分自 base.css/pages.css/components.css */

main.page.browse-page {
  padding: 0 32px 32px;
}

main.page.rankings-page {
  padding: 0 32px 32px;
}

.rankings-page {
  display: grid;
  row-gap: 0;
  align-content: start;
  grid-auto-rows: max-content;
}

.browse-page {
  display: grid;
  row-gap: 0;
  align-content: start;
  grid-auto-rows: max-content;
}

.browse-page .wall-grid {
  margin-top: -20px;
}

.browse-page .wall-thumb,
.rankings-page .wall-thumb {
  aspect-ratio: 16 / 9;
}

.browse-page .wall-thumb .wall-link,
.rankings-page .wall-thumb .wall-link {
  aspect-ratio: inherit;
  height: 100%;
  width: 100%;
}

.browse-page .wall-thumb img,
.rankings-page .wall-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-header {
    position: relative;
    padding: 14px 32px;
    border-radius: 4px;
    border-top: 1px solid rgba(15, 24, 32, 0.9);
    border-bottom: 1px solid rgba(10, 14, 18, 0.9);
    background-color: var(--listing-bg, #1b2126);
    background-image:
      radial-gradient(480px 120px at 0 0, var(--listing-glow, rgba(111, 217, 138, 0.16)), transparent),
      linear-gradient(180deg, rgba(28, 36, 43, 0.88), rgba(18, 24, 30, 0.8));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}



.listing-header h1 {
    margin: 0 0 2px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.1;
    color: #eef5fb;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  }

.listing-header p {
    margin: 0;
    color: #a9b6bf;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
  text-overflow: ellipsis;
}

.listing-related {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 6px 32px 0;
}

.listing-related-label {
  color: rgba(255, 255, 255, 0.55);
}

.listing-related-tag {
  color: #9edbff;
  text-decoration: none;
}

.listing-related-tag:hover {
  text-decoration: underline;
}

.listing-header .listing-icon {
    width: 26px;
    height: 26px;
    stroke: var(--listing-icon, var(--listing-accent, #6fd98a));
    fill: none;
    stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.listing-meta {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 4px 32px 6px;
  font-size: 12px;
  color: #a2a9ad;
  text-align: left;
  margin-top: 20px;
  margin-bottom: 20px;
}

.listing-controls {
  position: sticky;
  top: 42px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 32px;
  border-radius: 4px;
  border-top: 1px solid #0f0f0f;
  border-bottom: 1px solid #0f0f0f;
  background: linear-gradient(180deg, #2a2a2a, #1c1c1c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 52px;
}

.filter-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #191919;
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  color: #d5dadd;
  font-size: 12px;
  cursor: pointer;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 10px;
}

.control-row {
  display: contents;
}

.filter-close {
  display: none;
  margin-left: auto;
  height: 30px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #191919;
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  color: #d5dadd;
  font-size: 12px;
  cursor: pointer;
}

.filter-backdrop {
  display: none;
}

.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.batch-count {
  font-size: 12px;
  color: #c7cdd2;
}

.batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-btn {
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  color: #e6edf2;
  border-radius: 4px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}

.batch-btn--ghost {
  background: transparent;
  color: #9aa4aa;
}

.browse-page .wall-select {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 10, 12, 0.6);
  color: #f5f7f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.browse-page .wall-select-check {
  line-height: 1;
}

.browse-page .wall-grid.is-batch-mode .wall-select {
  opacity: 1;
  pointer-events: auto;
}

.browse-page .wall-grid.is-batch-mode .wall-card,
.browse-page .wall-grid.is-batch-mode .wall-card:hover {
  transform: translateY(0);
}

.browse-page .wall-grid.is-batch-mode .wall-link {
  cursor: default;
}

.browse-page .wall-card.is-selected {
  outline: 2px solid #7dc6ff;
  outline-offset: -2px;
  box-shadow: 0 0 0 1px rgba(125, 198, 255, 0.35) inset, 0 18px 30px rgba(5, 9, 11, 0.45);
}

.browse-page .wall-card.is-selected .wall-select {
  background: linear-gradient(180deg, #3a7bd5, #2a5fa8);
  border-color: rgba(125, 198, 255, 0.9);
  color: #ffffff;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-dropdowns {
  margin-left: 0;
}

.control-rating {
  margin-left: 0;
  gap: 2px;
}

.control-categories {
  gap: 2px;
}

.control-dropdowns {
  gap: 12px;
}

.control-dropdown--color .dropdown-menu {
  min-width: 220px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 24px);
  gap: 8px;
  padding: 6px 4px 10px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.color-swatch.is-active {
  outline: 2px solid rgba(125, 198, 255, 0.9);
  outline-offset: 2px;
}

.color-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 0;
  flex-wrap: wrap;
}

.color-label {
  font-size: 11px;
  color: #9aa4aa;
}

.color-input {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  background: #111;
}

.color-apply,
.color-clear {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  background: #1e1e1e;
  color: #d5dadd;
}

.color-clear {
  background: transparent;
  color: #9aa4aa;
}

.control-pill {
  border: 1px solid #191919;
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  color: #c5cbd0;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 64px;
}

.control-pill.is-active {
  background: linear-gradient(180deg, #4a4a4a, #333333);
  color: #f2f2f2;
  border-color: #2a2a2a;
}

.control-rating .control-pill {
  border-radius: 4px;
  height: 30px;
  background: linear-gradient(180deg, #34383d, #262a2e);
  border-color: #1b1f22;
}

.control-rating .control-pill.is-active {
  background: linear-gradient(180deg, #4a5259, #313a42);
  border-color: #2a3238;
  color: #f6f8fa;
}

.control-rating .control-pill[data-value="sfw"].is-active {
  background: linear-gradient(180deg, #2f5f47, #1f3f2f);
  border-color: #1c3326;
  color: #ffffff;
}

.control-rating .control-pill[data-value="sketchy"].is-active {
  background: linear-gradient(180deg, #7a5a1a, #5a3f12);
  border-color: #4a3310;
  color: #ffffff;
}

.control-categories .control-pill.is-active {
  background: linear-gradient(180deg, #585e63, #3f4449);
  border-color: transparent;
  color: #ffffff;
  box-shadow: none;
}

.control-dropdown {
  position: relative;
}

.control-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #111;
  background: linear-gradient(180deg, #333333, #222222);
  color: #d5dadd;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  line-height: 1;
  height: 30px;
}

.control-dropdown summary::-webkit-details-marker {
  display: none;
}

.control-dropdown[open] summary {
  background: linear-gradient(180deg, #3b3b3b, #2a2a2a);
  color: #ffffff;
}

.control-dropdown .caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #b9bfc4;
  margin-top: 2px;
}

.control-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  background: #242424;
  border: 1px solid #101010;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 20;
}

.control-dropdowns .dropdown-menu {
  right: 0;
  left: auto;
}

.control-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #c5cbd0;
}

.control-dropdown .dropdown-item:hover {
  background: #303030;
  color: #ffffff;
}

.control-dropdown .dropdown-item.is-active {
  background: #3a3a3a;
  color: #ffffff;
}

.control-dropdown .swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--swatch, #555);
}

.resolution-menu {
  min-width: 640px;
  padding: 12px;
  background: #1f1f1f;
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.resolution-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-btn {
  text-align: center;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #111;
  background: linear-gradient(180deg, #333333, #232323);
  color: #cbd2d6;
  font-size: 12px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
}

.mode-btn.is-active {
  background: linear-gradient(180deg, #4a4a4a, #2f2f2f);
  color: #ffffff;
  border-color: #202020;
}

.resolution-note {
  font-size: 12px;
  color: #8f989d;
  margin-bottom: 10px;
}

.resolution-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 12px;
  align-content: start;
  align-items: start;
}

.resolution-group {
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: start;
}

.resolution-title {
  font-size: 12px;
  color: #b6bec3;
}

.resolution-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  background: #2a2a2a;
  color: #c6cbd0;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.resolution-item:hover {
  background: #353535;
  color: #ffffff;
}

.resolution-item.is-active {
  background: #3b3b3b;
  color: #ffffff;
}

.resolution-custom {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #111;
}

.resolution-label {
  color: #aeb6bb;
  font-size: 12px;
}

.resolution-input {
  background: #2a2a2a;
  border: 1px solid #111;
  color: #d3d8db;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  height: 28px;
  line-height: 1;
}

.resolution-x {
  color: #aeb6bb;
}

.resolution-apply {
  background: #3a3a3a;
  border: 1px solid #111;
  color: #e6e8ea;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ratio-menu {
  min-width: 360px;
  padding: 10px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 12px;
  align-content: start;
  align-items: start;
}

.ratio-grid--simple {
  grid-template-columns: 1fr;
  justify-items: stretch;
}

.ratio-grid--simple .ratio-item {
  justify-content: flex-start;
  padding-left: 12px;
}

.ratio-group {
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: start;
}

.ratio-title {
  font-size: 12px;
  color: #b6bec3;
}

.ratio-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  background: #2a2a2a;
  color: #c6cbd0;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.ratio-item:hover {
  background: #353535;
  color: #ffffff;
}

.ratio-item.is-active {
  background: #3b3b3b;
  color: #ffffff;
}

.sort-menu {
  min-width: 140px;
  padding: 6px;
}

.sort-item {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  color: #c6cbd0;
  font-size: 12px;
  background: #2a2a2a;
  line-height: 1;
}

.sort-item + .sort-item {
  margin-top: 4px;
}

.sort-item:hover {
  background: #353535;
  color: #ffffff;
}

.sort-item.is-active {
  background: #3b3b3b;
  color: #ffffff;
}

.control-square {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #0e232a;
  background: linear-gradient(180deg, #2b6674, #1e4651);
  color: #cfe7ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.control-square svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.browse-pagination {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.browse-pagination.is-hidden {
  visibility: hidden;
  opacity: 0;
  height: 1px;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.browse-loadmore {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.browse-loadmore.is-hidden {
  visibility: hidden;
  opacity: 0;
  height: 1px;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.browse-pagination .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.browse-page-indicator {
  font-size: 12px;
  color: var(--muted);
  text-align: left;
}

.browse-page-marker {
  grid-column: 1 / -1;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 4px 32px 6px;
  text-align: left;
  font-size: 12px;
  color: #a2a9ad;
  margin-top: 0;
  margin-bottom: 0;
  justify-self: stretch;
}

.wall-section {
  margin-top: 0;
}

.wall-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #2a2a2a;
  aspect-ratio: 4 / 3;
  min-height: 160px;
}

.wall-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: wall-skeleton 1.2s ease-in-out infinite;
}

@keyframes wall-skeleton {
  to {
    transform: translateX(100%);
  }
}

/* 移动端响应式样式已移除 - 保持PC端布局 */
