/* 艺术百科 */
.wiki-page {
  background: #fff;
}

/* 百科顶栏 */
.wiki-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 20px 0 0;
}

.wiki-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.wiki-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.wiki-brand-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wiki-brand-actions .nav-action-lang {
  font-size: 14px;
  color: var(--color-text-muted, #666);
  text-decoration: none;
}

.wiki-brand-actions .nav-action-lang:hover {
  color: var(--color-primary, #c8161d);
}

.wiki-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wiki-brand .site-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.wiki-brand .badge {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.wiki-brand .badge span {
  color: var(--primary);
}

.wiki-search-row {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.wiki-search {
  display: flex;
  width: 100%;
  max-width: 560px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.wiki-search select {
  width: 110px;
  padding: 0 12px;
  border: none;
  border-right: 1px solid var(--border);
  background: #fafafa;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.wiki-search input {
  flex: 1;
  padding: 0 14px;
  border: none;
  font-size: 14px;
  outline: none;
}

.wiki-search button {
  width: 88px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.wiki-search button:hover {
  background: var(--primary-hover);
}

.wiki-subnav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 28px;
  padding: 12px 0 14px;
  border-top: 1px solid #f0f0f0;
  font-size: 15px;
}

.wiki-subnav a {
  color: var(--text-secondary);
}

.wiki-subnav a:hover,
.wiki-subnav a.active {
  color: var(--primary);
  font-weight: 600;
}

/* 主内容 */
.wiki-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.wiki-type-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wiki-type-tabs .tabs {
  display: flex;
  gap: 0;
}

.wiki-type-tab {
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  margin-left: -1px;
}

.wiki-type-tab:first-child {
  margin-left: 0;
  border-radius: 4px 0 0 4px;
}

.wiki-type-tab:last-child {
  border-radius: 0 4px 4px 0;
}

.wiki-type-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  z-index: 1;
  position: relative;
}

.btn-create-wiki {
  padding: 8px 20px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn-create-wiki:hover {
  background: #ebf5e8;
}

/* 筛选区 */
.wiki-filter-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px 12px;
  margin-bottom: 20px;
  background: #fff;
}

.wiki-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.wiki-filter-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.btn-clear-filter {
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-clear-filter:hover {
  color: var(--primary);
}

.filter-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13px;
}

.filter-row:last-child {
  border-bottom: none;
}

.filter-label {
  width: 56px;
  flex-shrink: 0;
  color: var(--text-muted);
  line-height: 28px;
}

.filter-options {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-opt {
  padding: 4px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  line-height: 20px;
}

.filter-opt:hover {
  color: var(--primary);
}

.filter-opt.active {
  background: var(--primary);
  color: #fff;
}

.filter-row-letters .filter-options {
  gap: 4px;
}

.filter-row-letters .filter-opt {
  min-width: 28px;
  padding: 4px 6px;
  text-align: center;
}

/* 结果 */
.wiki-result-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.wiki-result-bar strong {
  color: var(--primary);
  font-weight: 700;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 20px;
}

.artist-card {
  text-align: center;
}

.artist-card .avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  background: #f5f5f5;
}

.artist-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.artist-card:hover .avatar img {
  transform: scale(1.05);
}

.artist-card .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.artist-card:hover .name {
  color: var(--primary);
}

.wiki-empty,
.wiki-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 4px;
}

.wiki-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.wiki-pagination .page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.wiki-pagination .page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.wiki-pagination .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.wiki-pagination .page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wiki-topbar .btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 30px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 4px;
  font-size: 12px;
}

/* ========== 详情页 ========== */
.wiki-detail-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

.wiki-detail-main {
  min-width: 0;
}

.wiki-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.wiki-detail-header h1 {
  font-size: 32px;
  font-weight: 700;
}

.wiki-detail-actions {
  display: flex;
  gap: 10px;
}

.wiki-detail-actions a,
.wiki-detail-actions button {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.wiki-detail-actions a:hover,
.wiki-detail-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.index-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(90deg, #ebf5e8 0%, #f6ffed 100%);
  border: 1px solid #c2e2b9;
  border-radius: 4px;
  margin-bottom: 24px;
}

.index-banner .label {
  font-size: 14px;
  color: var(--text-secondary);
}

.index-banner .score {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.index-banner .trend {
  font-size: 14px;
  color: #cf1322;
  font-weight: 600;
}

.index-banner .trend.down {
  color: #389e0d;
}

.wiki-intro {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 32px;
  text-indent: 2em;
}

.wiki-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.wiki-timeline {
  margin-bottom: 32px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-year {
  flex-shrink: 0;
  width: 72px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.timeline-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* 侧栏 */
.wiki-detail-side {
  position: sticky;
  top: 80px;
}

.side-portrait {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  aspect-ratio: 3/4;
  background: #f5f5f5;
}

.side-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-block {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}

.side-block h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.info-table {
  width: 100%;
  font-size: 13px;
}

.info-table tr {
  border-bottom: 1px dashed #f0f0f0;
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table th,
.info-table td {
  padding: 8px 0;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 72px;
  color: var(--text-muted);
  font-weight: normal;
}

.wiki-toc a {
  display: block;
  padding: 8px 0 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
}

.wiki-toc a:hover,
.wiki-toc a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: #f6ffed;
}

.wiki-not-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

@media (max-width: 992px) {
  .artist-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wiki-detail-wrap {
    grid-template-columns: 1fr;
  }

  .wiki-detail-side {
    position: static;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }

  .side-portrait {
    margin-bottom: 0;
  }
}

.wiki-loading {
  text-align: center;
  padding: 48px 16px;
  color: #888;
}

.artist-card .avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  color: #999;
  font-size: 1.5rem;
}

@media (max-width: 576px) {
  .artist-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wiki-type-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .wiki-detail-side {
    grid-template-columns: 1fr;
  }

  .filter-label {
    width: 100%;
    margin-bottom: 4px;
  }

  .filter-row {
    flex-direction: column;
  }
}
