/* ============================================================
   Wiki 全局样式 — 花仙子 (yuyuan_juese) DST Mod Wiki
   深色系，贴近 DST 暗色调
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #1a1a1e;
  color: #d4cfc8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── 导航栏 ────────────────────────────────────────────────── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #111114;
  border-bottom: 1px solid #2e2e38;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 48px;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav-brand {
  font-weight: 700;
  color: #f0e6c8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 4px 12px;
  border-radius: 4px;
  color: #a09890;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: #2a2a34;
}

.nav-links a.active {
  background: #2e2e3e;
  color: #f0e6c8;
  font-weight: 600;
}

/* ── 首页 ──────────────────────────────────────────────────── */
.home-hero {
  text-align: center;
  padding: 56px 16px 32px;
}

.home-hero h1 {
  font-size: 2rem;
  color: #f0e6c8;
  margin-bottom: 12px;
}

.home-hero p {
  color: #8a8480;
}

.category-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 16px;
}

.category-card {
  background: #22222c;
  border: 1px solid #2e2e38;
  border-radius: 8px;
  padding: 32px 40px;
  min-width: 160px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.category-card:hover {
  background: #2a2a38;
  border-color: #4a4a5e;
}

.category-card .card-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0e6c8;
  margin-top: 10px;
}

.home-footer {
  text-align: center;
  padding: 32px 16px;
  color: #5a5654;
  font-size: 0.85rem;
  border-top: 1px solid #2e2e38;
  margin-top: 32px;
}

/* ── 列表页 ────────────────────────────────────────────────── */
.list-header {
  padding: 24px 0 16px;
}

.list-header h2 {
  font-size: 1.4rem;
  color: #f0e6c8;
  margin-bottom: 12px;
}

.search-box {
  width: 100%;
  max-width: 360px;
  background: #22222c;
  border: 1px solid #2e2e38;
  border-radius: 6px;
  padding: 7px 12px;
  color: #d4cfc8;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-box:focus {
  border-color: #5a5a7a;
}

.search-box::placeholder {
  color: #5a5654;
}

.item-list {
  border-top: 1px solid #2e2e38;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid #22222c;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s;
}

.item-row:hover {
  background: #22222c;
}

.item-row .row-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #2e2e38;
  background: #16161a;
  flex-shrink: 0;
}

.item-row .row-name {
  font-weight: 600;
  color: #e8e0d0;
  white-space: nowrap;
}

.item-row .row-desc {
  flex: 1;
  color: #7a7470;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-row .tag-skin {
  background: #3a2e50;
  color: #c0a0e8;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.skin-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.skin-tag-free {
  background: #1a3a1a;
  color: #6dcc6d;
  border: 1px solid #3a6a3a;
}
.skin-tag-paid {
  background: #3a2a10;
  color: #e0a030;
  border: 1px solid #6a4a20;
}

.item-row .row-arrow {
  color: #4a4a5e;
  flex-shrink: 0;
}

.list-empty {
  text-align: center;
  padding: 48px 0;
  color: #5a5654;
}

/* ── 详情页 ────────────────────────────────────────────────── */
.detail-back {
  display: inline-block;
  margin: 20px 0 16px;
  color: #7a7470;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.detail-back:hover {
  color: #d4cfc8;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #2e2e38;
}

.detail-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #2e2e38;
  background: #16161a;
  flex-shrink: 0;
}

.detail-title h1 {
  font-size: 1.4rem;
  color: #f0e6c8;
  margin-bottom: 6px;
}

.detail-category {
  display: inline-block;
  background: #22222c;
  color: #8a8480;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.detail-section {
  padding: 16px 0;
  border-bottom: 1px solid #22222c;
}

.detail-section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 0.78rem;
  color: #5a5654;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.section-value {
  color: #c8c0b0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.stats-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: #5a5654;
}

.stat-value {
  font-size: 1.05rem;
  color: #c8c0b0;
  font-weight: 600;
}

.skin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.skin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e1e28;
  border-radius: 6px;
  padding: 8px 12px;
}

.skin-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #2e2e38;
  background: #16161a;
  flex-shrink: 0;
}

.skin-name {
  font-weight: 600;
  color: #d4cfc8;
  font-size: 0.9rem;
}

.skin-desc {
  color: #7a7470;
  font-size: 0.83rem;
}

.detail-error {
  text-align: center;
  padding: 64px 16px;
}

.detail-error p {
  color: #7a7470;
  margin-bottom: 16px;
}

.detail-error a {
  color: #8080b0;
  text-decoration: underline;
}

/* ── 人物展示区 ────────────────────────────────────────────── */
.hero-section {
  text-align: center;
  padding: 48px 16px 32px;
  background: linear-gradient(180deg, #16161a 0%, #1a1a1e 100%);
  border-bottom: 1px solid #2e2e38;
}

.hero-portrait {
  width: 280px;
  height: 560px;
  object-fit: cover;
  object-position: center 8%;
  border-radius: 16px;
  border: 2px solid #3a3a4e;
  background: #22222c;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hero-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f0e6c8;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: #8a8480;
  margin-bottom: 24px;
}

.hero-stats {
  display: inline-flex;
  gap: 32px;
  background: #22222c;
  border: 1px solid #2e2e38;
  border-radius: 10px;
  padding: 12px 28px;
  margin-bottom: 20px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hstat-label {
  font-size: 0.78rem;
  color: #5a5654;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hstat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #c8c0b0;
}

.hero-traits {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  margin-top: 4px;
}

.hero-trait {
  font-size: 0.9rem;
  color: #a09890;
}

.hero-skins {
  margin-top: 16px;
  text-align: center;
}

.hero-skins-title {
  font-size: 0.8rem;
  color: #5a5654;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero-skin-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-skin-item {
  background: #1e1c2a;
  border: 1px solid #2e2c3a;
  border-radius: 8px;
  padding: 6px 12px;
}

.hero-skin-name {
  font-size: 0.9rem;
  color: #c8b8e8;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #5a5654;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 28px 0 12px;
  border-bottom: 1px solid #2e2e38;
  margin-bottom: 0;
}

/* ── 响应式 ────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .item-row .row-desc {
    display: none;
  }

  .category-cards {
    flex-direction: column;
    align-items: center;
  }

  .hero-portrait {
    width: 160px;
    height: 160px;
  }

  .hero-stats {
    gap: 20px;
    padding: 10px 16px;
  }
}
