/* ============================================
   CLAYMORE 大剑 · 全战士图鉴 — 暗黑主题样式 v2
   ============================================ */

/* --- CSS 变量 --- */
:root {
  --bg-deep: #050508;
  --bg-card: rgba(15, 15, 28, 0.88);
  --bg-card-hover: rgba(24, 24, 44, 0.94);
  --border-card: rgba(255, 255, 255, 0.05);
  --border-card-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #e0e0e0;
  --text-secondary: #888;
  --text-dim: #555;
  --accent-silver: #c0c0c0;
  --accent-gold: #c9a96e;
  --accent-blood: #8b1a1a;
  --accent-crimson: #c41e3a;
  --glow-silver: rgba(192, 192, 192, 0.3);
  --glow-gold: rgba(201, 169, 110, 0.4);
  --font-cinzel: 'Cinzel', 'Noto Serif SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', 'STSong', serif;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 重置 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 110, 0.012) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 26, 26, 0.015) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(192, 192, 192, 0.008) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Canvas 粒子背景 --- */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- 头部 --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 24px;
}
.header__inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo__sword {
  filter: drop-shadow(0 0 8px var(--glow-silver));
  animation: swordGlow 3s ease-in-out infinite;
}
@keyframes swordGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(192,192,192,0.2)); }
  50% { filter: drop-shadow(0 0 16px rgba(255,255,255,0.5)); }
}
.logo__text {
  display: flex;
  flex-direction: column;
}
.logo__title {
  font-family: var(--font-cinzel);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--accent-silver);
  line-height: 1;
}
.logo__o {
  color: var(--accent-blood);
  text-shadow: 0 0 10px rgba(200, 30, 30, 0.6);
  animation: eyePulse 2s ease-in-out infinite;
}
@keyframes eyePulse {
  0%, 100% { text-shadow: 0 0 8px rgba(200, 30, 30, 0.4); }
  50% { text-shadow: 0 0 22px rgba(255, 50, 50, 0.9); }
}
.logo__sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.header__stats {
  display: flex;
  gap: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.header__stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header__stats strong {
  color: var(--accent-silver);
  font-family: var(--font-cinzel);
  font-size: 1.1rem;
}

/* --- 主内容 --- */
.main {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* --- 英雄区 --- */
.hero {
  text-align: center;
  padding: 56px 20px 36px;
  position: relative;
  overflow: hidden;
}
.hero__bg-image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../assets/images/claymore_hero.jpg') center 25%/cover no-repeat;
  opacity: 0.12;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  pointer-events: none;
}
.hero__bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-cinzel);
  font-weight: 900;
  font-size: clamp(4rem, 12vw, 11rem);
  color: rgba(255, 255, 255, 0.012);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}
.hero__title {
  font-family: var(--font-cinzel);
  font-size: clamp(1.3rem, 4vw, 2rem);
  color: var(--accent-silver);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
  position: relative;
  text-shadow: 0 0 30px rgba(192, 192, 192, 0.3), 0 0 60px rgba(192, 192, 192, 0.08);
  animation: titleFlicker 6s ease-in-out infinite;
}
@keyframes titleFlicker {
  0%, 100% { text-shadow: 0 0 30px rgba(192, 192, 192, 0.3), 0 0 60px rgba(192, 192, 192, 0.08); }
  50% { text-shadow: 0 0 40px rgba(255, 255, 255, 0.45), 0 0 80px rgba(192, 192, 192, 0.15), 0 0 120px rgba(201, 169, 110, 0.1); }
}
.hero__title--jp {
  color: var(--accent-gold);
  font-family: var(--font-serif);
}
.hero__divider {
  color: var(--text-dim);
  margin: 0 10px;
}
.hero__title--cn {
  font-family: var(--font-serif);
}
.hero__desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.8;
}
.hero__desc strong {
  color: var(--accent-silver);
  font-family: var(--font-cinzel);
  font-size: 1.3rem;
}
.hero__desc em {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: normal;
}
.hero__sword-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.sword-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-silver), transparent);
}

/* --- 时间线 --- */
.timeline-section {
  padding: 12px 0 32px;
  position: relative;
  z-index: 1;
}

.timeline__header {
  text-align: center;
  margin-bottom: 28px;
}

.timeline__title {
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  color: var(--accent-silver);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-shadow: 0 0 20px rgba(192,192,192,0.2);
}

.timeline__sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: 400;
}

.timeline {
  position: relative;
  padding: 0 0 20px;
}

/* Timeline track */
.timeline__track {
  position: relative;
  overflow: visible;
  padding: 30px 0 20px;
  cursor: default;
}

/* Inner scroll wrapper — horizontal scroll only, no visible scrollbar */
.timeline__track-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 76px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  transition: min-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 时间线 hover 时展开，为悬停卡片留空间 */
.timeline:hover .timeline__track-scroll {
  min-height: 270px;
}

.timeline__track-scroll:active {
  cursor: grabbing;
}

.timeline__track-scroll::-webkit-scrollbar {
  display: none;
}

.timeline__line {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-width: 100%;
  padding: 0 40px;
}

/* Central spine */
.timeline__line::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(192,192,192,0.15) 5%,
    rgba(192,192,192,0.35) 20%,
    rgba(192,192,192,0.5) 50%,
    rgba(192,192,192,0.35) 80%,
    rgba(192,192,192,0.15) 95%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(192,192,192,0.08);
}

/* Era node */
.timeline__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 2;
}

.timeline__node:hover {
  transform: translateY(-6px);
}

.timeline__node:hover .timeline__dot {
  box-shadow: 0 0 24px var(--node-color);
  transform: scale(1.25);
}

.timeline__node:hover .timeline__card {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(192,192,192,0.06);
}

/* Dot on the line */
.timeline__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--node-color, #888);
  border: 3px solid rgba(255,255,255,0.2);
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
  transition: all 0.35s ease;
  box-shadow: 0 0 10px var(--node-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--node-color, #888) 60%, transparent);
}

.timeline__dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 20px;
  background: var(--node-color, #888);
  opacity: 0.5;
  transform: translate(-50%, -100%);
  border-radius: 2px;
  transition: height 0.35s ease;
}

.timeline__node:hover .timeline__dot::after {
  height: 28px;
  opacity: 0.8;
}

/* Node label */
.timeline__era-label {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--accent-silver);
  white-space: nowrap;
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(192,192,192,0.15);
}

.timeline__era-sub {
  font-size: 0.58rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Hover card */
.timeline__card {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 240px;
  background: rgba(16,16,30,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
}

.timeline__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--node-color, #888);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  opacity: 0.7;
}

.timeline__card-title {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 4px;
}

.timeline__card-desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.timeline__card-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.timeline__char-tag {
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
  .timeline__track-scroll {
    min-height: 64px;
    padding-bottom: 6px;
  }
  .timeline:hover .timeline__track-scroll {
    min-height: 230px;
  }
  .timeline__line {
    padding: 0 20px;
  }
  .timeline__line::before {
    left: 20px;
    right: 20px;
  }
  .timeline__card {
    width: 200px;
    top: 72px;
    padding: 10px 12px;
  }
  .timeline__card-desc {
    font-size: 0.62rem;
  }
  .timeline__dot {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 480px) {
  .timeline__track-scroll {
    min-height: 56px;
  }
  .timeline:hover .timeline__track-scroll {
    min-height: 200px;
  }
  .timeline__line {
    padding: 0 12px;
  }
  .timeline__line::before {
    left: 12px;
    right: 12px;
  }
  .timeline__card {
    width: 170px;
    padding: 8px 10px;
  }
  .timeline__card-title {
    font-size: 0.72rem;
  }
}

/* --- 筛选区 --- */
.filters {
  position: sticky;
  top: 64px;
  z-index: 99;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0 -24px;
  padding: 12px 24px;
}

.filters__inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

/* 时代 Tab */
.era-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.era-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}
.era-tab:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.era-tab small {
  font-size: 0.68rem;
  opacity: 0.5;
  margin-left: 2px;
}
.era-tab--active {
  border-color: var(--tab-color, var(--accent-silver));
  color: #fff;
  background: color-mix(in srgb, var(--tab-color, var(--accent-silver)) 12%, transparent);
  box-shadow: 0 0 18px rgba(192, 192, 192, 0.12);
  font-weight: 600;
}
.era-tab--active small {
  opacity: 0.9;
}

/* 类型标签 */
.type-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.type-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 4px;
}
.type-tag {
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.type-tag:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.type-tag--active {
  border-color: var(--tag-color, #888);
  color: #fff;
  background: color-mix(in srgb, var(--tag-color, #888) 15%, transparent);
  box-shadow: 0 0 10px rgba(255,255,255,0.06);
}

/* 搜索 + 排序 */
.filters__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 8px 14px;
  gap: 8px;
  transition: var(--transition);
  min-width: 200px;
}
.search-box:focus-within {
  border-color: var(--accent-silver);
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.08);
  background: rgba(255, 255, 255, 0.05);
}
.search-box__icon {
  color: var(--text-dim);
  flex-shrink: 0;
}
.search-box__input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  width: 100%;
}
.search-box__input::placeholder {
  color: var(--text-dim);
}
.search-box__clear {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 2px 4px;
  transition: var(--transition);
  display: none;
  border-radius: 50%;
}
.search-box__clear:hover { color: #fff; background: rgba(255,255,255,0.06); }
.search-box__clear--visible { display: block; }

.sort-select {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.sort-select:hover, .sort-select:focus {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.sort-select option {
  background: #1a1a2e;
  color: #e0e0e0;
}

/* 状态图例 */
.status-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.legend-item {
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
}
.legend-item i { font-style: normal; }
.legend--alive i { color: #4caf50; }
.legend--deceased i { color: #9e9e9e; }
.legend--awakened i { color: #e91e63; }
.legend--unknown i { color: #616161; }

/* --- 卡片网格 --- */
.cards-section {
  padding-top: 28px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* --- 战士卡片 --- */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: cardEnter 0.5s ease-out both;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius);
  opacity: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.04) 0%, transparent 70%);
  transition: opacity 0.4s;
}
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 2px;
  background: var(--era-accent, transparent);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0.4;
  transition: opacity 0.4s, height 0.3s, left 0.3s, right 0.3s;
}
.card:hover::after { opacity: 1; height: 3px; left: 0; right: 0; }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-card-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.card:hover::before { opacity: 1; }
.card:active { transform: scale(0.985); transition: transform 0.1s; }
.card--deceased { opacity: 0.7; }
.card--deceased:hover { opacity: 0.85; }
.card--has-title {
  border-color: rgba(201, 169, 110, 0.15);
}
.card--has-title:hover {
  border-color: rgba(201, 169, 110, 0.45);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 35px var(--glow-gold);
}
.card--title-glow {
  border-left: 2px solid rgba(201, 169, 110, 0.35);
}
.card--srank {
  border-color: rgba(212, 175, 55, 0.12);
}
.card--srank::after {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}
.card--srank:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.15);
}

/* 卡片头像 */
.card__avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  box-shadow: 0 0 15px rgba(255,255,255,0.05);
}
.card__avatar::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.06), transparent, rgba(255,255,255,0.03), transparent);
  animation: avatarSpin 8s linear infinite;
  opacity: 0.5;
}
@keyframes avatarSpin {
  to { transform: rotate(360deg); }
}
.card__rank-num {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(0,0,0,0.9);
  color: var(--accent-silver);
  font-family: var(--font-cinzel);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px 0 8px 0;
  border: 1px solid rgba(255,255,255,0.18);
}

/* 图片头像 */
.card__avatar--image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: #111;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(255,255,255,0.08), inset 0 0 10px rgba(0,0,0,0.3);
}
.card__avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}
.card:hover .card__avatar--image img {
  transform: scale(1.08);
}
.card__avatar--image .card__rank-num {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 2;
}

/* 卡片信息 */
.card__info {
  flex: 1;
  min-width: 0;
}
.card__name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card__name-en {
  font-family: var(--font-cinzel);
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.card__meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: var(--font-cinzel);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.card__type-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 8px;
  border-radius: 8px;
  border: 1px solid currentColor;
  opacity: 0.7;
  white-space: nowrap;
}
.card__title-badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.18), rgba(201, 169, 110, 0.04));
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: var(--accent-gold);
  white-space: nowrap;
  animation: titleShimmer 3s ease-in-out infinite;
}
@keyframes titleShimmer {
  0%, 100% { border-color: rgba(201, 169, 110, 0.25); }
  50% { border-color: rgba(255, 215, 0, 0.55); box-shadow: 0 0 14px rgba(201, 169, 110, 0.18); }
}
.card__status {
  font-size: 0.68rem;
  margin-top: 3px;
}

/* --- 无结果 --- */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}
.no-results__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.25;
}
.no-results p {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.no-results span {
  font-size: 0.85rem;
}

/* --- 详情弹窗 --- */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.modal--visible {
  pointer-events: auto;
  opacity: 1;
}
.modal__backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal__content {
  position: relative;
  background: rgba(20, 20, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
  animation: modalIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  /* Firefox 自定义滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 192, 192, 0.2) transparent;
}

/* Webkit 自定义滚动条 */
.modal__content::-webkit-scrollbar {
  width: 5px;
}
.modal__content::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}
.modal__content::-webkit-scrollbar-thumb {
  background: rgba(192, 192, 192, 0.2);
  border-radius: 10px;
  transition: background 0.3s;
}
.modal__content::-webkit-scrollbar-thumb:hover {
  background: rgba(192, 192, 192, 0.45);
}
.modal__content::-webkit-scrollbar-corner {
  background: transparent;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute;
  top: 10px; right: 16px;
  z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.modal__close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.modal__header {
  text-align: center;
  padding: 32px 24px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}
.modal__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  box-shadow: 0 0 30px rgba(255,255,255,0.06);
}

/* 弹窗图片头像 */
.modal__avatar--image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,0.2);
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 30px rgba(255,255,255,0.12), 0 0 60px rgba(0,0,0,0.4);
}
.modal__avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.modal__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 2px;
}
.modal__alt-name {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.modal__jp-name {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-serif);
}

.modal__body {
  padding: 0 24px 28px;
}
.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.modal__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.modal__label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.modal__value {
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
}
.modal__value--gold {
  color: var(--accent-gold);
  font-family: var(--font-serif);
}

.modal__section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.modal__section-title {
  font-family: var(--font-cinzel);
  font-size: 0.78rem;
  color: var(--accent-silver);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.modal__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
}
.modal__text--en {
  font-family: var(--font-cinzel);
  letter-spacing: 0.04em;
  color: var(--accent-silver);
}

/* --- 页脚 --- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 0.72rem;
}
.footer__quote {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

/* --- 回到顶部 --- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15,15,28,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.back-to-top--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  background: rgba(30,30,50,0.9);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 16px rgba(192,192,192,0.06);
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: scale(0.93);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 8px;
  }
  .header__stats { font-size: 0.68rem; gap: 10px; }
  .hero { padding: 36px 16px 20px; }
  .hero__title { font-size: 1.05rem; }
  .hero__desc { font-size: 0.8rem; }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
  }
  .card { padding: 14px; gap: 12px; }
  .card__avatar { width: 50px; height: 50px; font-size: 1.2rem; }
  .card__name { font-size: 0.92rem; }
  .filters { top: auto; position: relative; margin: 0 -16px; padding: 10px 16px; }
  .filters__row { flex-direction: column; gap: 8px; }
  .filters__tools { width: 100%; }
  .search-box { flex: 1; min-width: 0; }
  .sort-select { flex-shrink: 0; }
  .type-filters { justify-content: center; }
  .status-legend { gap: 10px; }
  .modal__grid { grid-template-columns: 1fr; }
  .modal__content { max-width: calc(100% - 16px); }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .header__stats { display: none; }
  .era-tab { padding: 5px 10px; font-size: 0.72rem; }
  .type-tag { padding: 4px 8px; font-size: 0.68rem; }
  .search-box { flex: 1; min-width: 0; }
  .hero__bg-text { font-size: 2.5rem; }
}
