/* ==========================================================================
   战斗吧精灵 · 各页面专用样式
   pages.css —— hero、卡片网格、文章页、pokedex、兑换码、下载等
   依赖:main.css(共享 CSS 变量与基础组件)
   ========================================================================== */

/* ==========================================================================
   1. 首页 Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 85vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 60% 40%;
    min-height: 88vh;
    padding: 6rem 0 5rem;
  }
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: rgba(255, 210, 63, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 10px var(--electric);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero-title .accent {
  color: var(--electric);
  position: relative;
  display: inline-block;
}
.hero-title .accent::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0.05em;
  width: 100%;
  height: 0.18em;
  background: rgba(255, 210, 63, 0.25);
  z-index: -1;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--electric);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* --- Hero 视觉区(精灵球浮动) --- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.hero-visual::before {
  content: '';
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.25), transparent 65%);
  filter: blur(20px);
}
.hero-pokeball {
  width: clamp(220px, 35vw, 340px);
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5))
          drop-shadow(0 0 30px rgba(255, 210, 63, 0.3));
}

/* 环绕轨道装饰 */
.hero-orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 210, 63, 0.2);
  border-radius: 50%;
  animation: spin-slow 30s linear infinite;
}
.hero-orbit::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 12px var(--electric);
  transform: translateX(-50%);
}

/* ==========================================================================
   2. 精灵球 SVG 动画
   ========================================================================== */
.pokeball-float {
  animation: float 4.5s ease-in-out infinite,
             spin-slow 18s linear infinite;
  transform-origin: center;
}
.pokeball-spin {
  animation: spin-slow 8s linear infinite;
  transform-origin: center;
}
.pokeball-bounce {
  animation: bounce-soft 2.6s ease-in-out infinite;
}

/* ==========================================================================
   3. 今日精选宝可梦
   ========================================================================== */
.featured-pokemon {
  background:
    radial-gradient(circle at top right, rgba(255, 210, 63, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg-deep));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.featured-pokemon::before {
  content: '#025';
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 700;
  color: rgba(255, 210, 63, 0.08);
  letter-spacing: -0.02em;
}

.pokemon-card-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .pokemon-card-featured { grid-template-columns: 240px 1fr; }
}
.pokemon-featured-sprite {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, rgba(255, 210, 63, 0.15), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.pokemon-featured-sprite img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-slow);
}
.pokemon-featured-sprite:hover img { transform: scale(1.08); }

.pokemon-featured-info h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.pokemon-featured-desc {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  max-width: 60ch;
}

/* ==========================================================================
   4. 特色卡片网格(破格布局)
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .feature-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  position: relative;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), var(--shadow-inner-pokedex);
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
  overflow: hidden;
}
/* 破格:偶数卡片 offset-y */
@media (min-width: 1024px) {
  .feature-card:nth-child(even) { transform: translateY(12px); }
  .feature-card:nth-child(even):hover { transform: translateY(8px); }
}
.feature-card:hover {
  border-color: var(--electric);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(255, 210, 63, 0.15);
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 210, 63, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}
.feature-card:hover::after { opacity: 1; }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: rgba(255, 210, 63, 0.1);
  border: 1px solid rgba(255, 210, 63, 0.3);
  color: var(--electric);
  margin-bottom: 1.25rem;
}
.feature-number {
  position: absolute;
  top: 1.5rem; right: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.feature-card p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

/* ==========================================================================
   5. Pokedex 页
   ========================================================================== */
.pokedex-search {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.pokedex-search .input {
  flex: 1;
  min-width: 240px;
  padding-left: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239BA3C7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1rem center;
}

.type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.type-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
}
.type-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.type-btn[aria-pressed="true"],
.type-btn.is-active {
  color: var(--bg-deep);
  border-color: transparent;
}

/* 类型按钮变体(激活态背景 = 类型色) */
.type-btn--grass     { --tb: var(--grass); }
.type-btn--water     { --tb: var(--water); }
.type-btn--fire      { --tb: var(--fire); }
.type-btn--electric  { --tb: var(--electric); }
.type-btn--normal    { --tb: var(--normal); }
.type-btn--fighting  { --tb: var(--fighting); }
.type-btn--flying    { --tb: var(--flying); }
.type-btn--poison    { --tb: var(--poison); }
.type-btn--ground    { --tb: var(--ground); }
.type-btn--rock      { --tb: var(--rock); }
.type-btn--bug       { --tb: var(--bug); }
.type-btn--ghost     { --tb: var(--ghost); }
.type-btn--steel     { --tb: var(--steel); }
.type-btn--psychic   { --tb: var(--psychic); }
.type-btn--ice       { --tb: var(--ice); }
.type-btn--dragon    { --tb: var(--dragon); }
.type-btn--dark      { --tb: var(--dark); }
.type-btn--fairy     { --tb: var(--fairy); }
.type-btn--grass[aria-pressed="true"],
.type-btn--water[aria-pressed="true"],
.type-btn--fire[aria-pressed="true"],
.type-btn--electric[aria-pressed="true"],
.type-btn--normal[aria-pressed="true"],
.type-btn--fighting[aria-pressed="true"],
.type-btn--flying[aria-pressed="true"],
.type-btn--poison[aria-pressed="true"],
.type-btn--ground[aria-pressed="true"],
.type-btn--rock[aria-pressed="true"],
.type-btn--bug[aria-pressed="true"],
.type-btn--ghost[aria-pressed="true"],
.type-btn--steel[aria-pressed="true"],
.type-btn--psychic[aria-pressed="true"],
.type-btn--ice[aria-pressed="true"],
.type-btn--dragon[aria-pressed="true"],
.type-btn--dark[aria-pressed="true"],
.type-btn--fairy[aria-pressed="true"] {
  background: var(--tb);
  color: var(--bg-deep);
  border-color: var(--tb);
}

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.pokemon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}
.pokemon-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 210, 63, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}
.pokemon-card:hover {
  transform: translateY(-6px);
  border-color: var(--electric);
  background: var(--surface-hover);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 210, 63, 0.4);
}
.pokemon-card:hover::before { opacity: 1; }

.pokemon-sprite {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 70%);
  border-radius: var(--radius-md);
  position: relative;
}
.pokemon-sprite img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}
.pokemon-card:hover .pokemon-sprite img {
  transform: scale(1.1) translateY(-2px);
}

.pokemon-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.pokemon-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.pokemon-types {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pokemon-types .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
}

/* --- 详情模态框 --- */
.pokemon-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.pokemon-modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
}
.pokemon-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(8px);
}
.pokemon-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 210, 63, 0.2);
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-slow);
}
.pokemon-modal[data-open="true"] .pokemon-modal-content {
  transform: scale(1) translateY(0);
}
.pokemon-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: all var(--transition-base);
}
.pokemon-modal-close:hover {
  background: var(--battle);
  color: #fff;
  transform: rotate(90deg);
}

.pokemon-modal-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .pokemon-modal-header { grid-template-columns: 160px 1fr; }
}
.pokemon-modal-sprite {
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.12), transparent 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pokemon-modal-sprite img {
  width: 80%; height: 80%;
  object-fit: contain;
}
.pokemon-modal-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pokemon-modal-header h2 .pokemon-en-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pokemon-modal-header .pokemon-id {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--electric);
  margin-bottom: 0.6rem;
}
.pokemon-desc {
  background: var(--bg-soft);
  border-left: 3px solid var(--electric);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* --- 能力值条形图 --- */
.stat-bar {
  margin-bottom: 0.85rem;
}
.stat-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-bar-track {
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--electric), var(--electric-soft));
  border-radius: var(--radius-full);
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px rgba(255, 210, 63, 0.5);
}

/* --- 属性相克计算器 --- */
.type-calculator {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}
.type-calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.type-effect {
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.type-effect-multiplier {
  font-family: var(--font-mono);
  font-weight: 700;
}
.type-effect-multiplier.x4   { color: var(--battle); }
.type-effect-multiplier.x2   { color: var(--fire); }
.type-effect-multiplier.x05  { color: var(--grass); }
.type-effect-multiplier.x025 { color: var(--water); }
.type-effect-multiplier.x0   { color: var(--text-dim); }

/* ==========================================================================
   6. 兑换码页
   ========================================================================== */
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
@media (min-width: 768px) {
  .code-card { grid-template-columns: 1fr auto; }
}
.code-card:hover {
  border-color: var(--electric);
  box-shadow: 0 0 24px rgba(255, 210, 63, 0.12);
}
.code-card-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.code-card-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.code-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.code-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--electric);
  background: rgba(255, 210, 63, 0.08);
  border: 1px dashed rgba(255, 210, 63, 0.4);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.05em;
  user-select: all;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--electric);
  color: var(--bg-deep);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-base);
}
.copy-btn:hover {
  background: var(--electric-soft);
  transform: translateY(-2px);
}
.copy-btn[data-copied="true"] {
  background: var(--grass);
  color: var(--bg-deep);
}

/* ==========================================================================
   7. 资讯列表(杂志式网格)
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--electric);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(255, 210, 63, 0.12);
}
.news-card:nth-child(3n+1) {
  /* 破格:第一列卡片微微下移 */
  transform: translateY(0);
}
@media (min-width: 1024px) {
  .news-card:nth-child(3n+1) { transform: translateY(8px); }
  .news-card:nth-child(3n+1):hover { transform: translateY(4px); }
}

.news-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
}
.news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.news-card:hover .news-cover img { transform: scale(1.06); }
.news-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11, 16, 32, 0.7));
  pointer-events: none;
}

.news-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  transition: color var(--transition-base);
}
.news-card:hover h3 { color: var(--electric); }
.news-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ==========================================================================
   8. 下载页
   ========================================================================== */
.download-hero {
  text-align: center;
  padding: 4rem 0 3rem;
  position: relative;
}
.download-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.download-hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
  height: 100%;
}
.platform-card:hover {
  transform: translateY(-4px);
  border-color: var(--electric);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(255, 210, 63, 0.15);
}
.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  background: rgba(255, 210, 63, 0.08);
  border: 1px solid rgba(255, 210, 63, 0.25);
  color: var(--electric);
  margin-bottom: 1.25rem;
}
.platform-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.platform-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.platform-card .btn {
  width: 100%;
}

.qr-card {
  background:
    radial-gradient(circle at top right, rgba(255, 210, 63, 0.08), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
}
.qr-card-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(0, 0, 0, 0.3);
}
.qr-card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* --- FAQ 折叠面板 --- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color var(--transition-base);
}
.faq-item[open] {
  border-color: rgba(255, 210, 63, 0.4);
}
.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--electric);
  transition: transform var(--transition-base);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item-body {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   9. 攻略页
   ========================================================================== */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .guide-layout { grid-template-columns: 260px 1fr; }
}

.guide-toc {
  position: sticky;
  top: 2rem;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}
.guide-toc-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.guide-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.guide-toc a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
}
.guide-toc a:hover,
.guide-toc a.is-active {
  color: var(--electric);
  background: rgba(255, 210, 63, 0.06);
  border-left-color: var(--electric);
}

.guide-section {
  margin-bottom: 3rem;
  scroll-margin-top: 2rem;
}
.guide-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.guide-section h2::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 60px; height: 1px;
  background: var(--electric);
}
.guide-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--electric-soft);
}
.guide-section p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.guide-section ul,
.guide-section ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.guide-section ul li { list-style: disc; }
.guide-section ol li { list-style: decimal; }

/* ==========================================================================
   10. 文章页
   ========================================================================== */
.article-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 2rem 0;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}
.article-meta-divider {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body p {
  margin-bottom: 1.5rem;
  color: var(--text);
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--electric);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--electric-soft);
}
.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.75rem;
  color: var(--text);
  line-height: 1.8;
}
.article-body ul li { list-style: disc; margin-bottom: 0.5rem; }
.article-body ol li { list-style: decimal; margin-bottom: 0.5rem; }
.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 4px solid var(--electric);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-muted);
  font-style: italic;
  position: relative;
}
.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem; left: 0.75rem;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--electric);
  opacity: 0.4;
  line-height: 1;
}
.article-body img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.article-body figcaption {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}
.article-body a {
  color: var(--electric);
  text-decoration: underline;
  text-decoration-color: rgba(255, 210, 63, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-base);
}
.article-body a:hover {
  text-decoration-color: var(--electric);
}
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.4rem;
  color: var(--electric);
}
.article-body pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

.article-cta {
  margin: 3rem 0;
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255, 210, 63, 0.1), transparent 70%),
    var(--surface);
  border: 1px solid rgba(255, 210, 63, 0.3);
  border-radius: var(--radius-lg);
}

.related-articles {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.related-articles-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   11. 联系页
   ========================================================================== */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-form .form-group {
  margin-bottom: 1.25rem;
}
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.contact-form .input {
  background: var(--bg-soft);
}
.contact-form .error-text {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--battle);
  min-height: 1rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.social-card:hover {
  border-color: var(--electric);
  transform: translateX(4px);
  box-shadow: 0 0 24px rgba(255, 210, 63, 0.1);
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 210, 63, 0.08);
  color: var(--electric);
  flex-shrink: 0;
}
.social-card-info { flex: 1; }
.social-card-info h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.social-card-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   12. 社区页
   ========================================================================== */
.community-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .community-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .community-grid { grid-template-columns: repeat(3, 1fr); } }

.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}
.player-card:hover {
  transform: translateY(-4px);
  border-color: var(--electric);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(255, 210, 63, 0.12);
}
.player-avatar {
  width: 72px; height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--electric), var(--battle));
  padding: 3px;
  margin-bottom: 1rem;
}
.player-avatar img {
  width: 100%; height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--bg-deep);
}
.player-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.player-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--electric);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.player-quote {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
  border-left: 2px solid var(--border-strong);
  padding-left: 0.85rem;
}
.player-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.player-stat-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--electric);
}
.player-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   13. 公告卡片 & 充值档位
   ========================================================================== */
.announcement-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--electric);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.announcement-card:hover {
  background: var(--surface-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.announcement-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding-right: 1.25rem;
  border-right: 1px solid var(--border);
}
.announcement-body h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.announcement-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.announcement-tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(255, 210, 63, 0.1);
  color: var(--electric);
  border: 1px solid rgba(255, 210, 63, 0.3);
  white-space: nowrap;
}
@media (max-width: 767px) {
  .announcement-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .announcement-date {
    border-right: none;
    padding-right: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
}

/* 充值档位卡片 */
.tier-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base),
              box-shadow var(--transition-base);
}
.tier-card:hover {
  transform: translateY(-6px);
  border-color: var(--electric);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(255, 210, 63, 0.15);
}
.tier-card--featured {
  border-color: rgba(255, 210, 63, 0.5);
  background:
    radial-gradient(circle at top, rgba(255, 210, 63, 0.08), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-md), 0 0 24px rgba(255, 210, 63, 0.1);
}
.tier-card-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.85rem;
  background: var(--electric);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.tier-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--electric);
  line-height: 1;
  margin: 1rem 0 0.5rem;
}
.tier-price-currency {
  font-size: 1.2rem;
  vertical-align: top;
  margin-right: 0.15rem;
}
.tier-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.tier-features {
  text-align: left;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.tier-features li::before {
  content: '✓';
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--electric);
  flex-shrink: 0;
}
.tier-features li.is-disabled {
  color: var(--text-dim);
  text-decoration: line-through;
}
.tier-features li.is-disabled::before {
  content: '×';
  color: var(--text-dim);
}
.tier-card .btn {
  width: 100%;
}

/* ==========================================================================
   14. 响应式补丁(768px 以下/1024px 以上)
   ========================================================================== */

/* 768px 以下:网格变单列、隐藏桌面导航、显示汉堡菜单 */
@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding: 3rem 0;
  }
  .hero-visual {
    order: -1;
    margin-bottom: 1rem;
  }
  .featured-pokemon {
    padding: 1.5rem;
  }
  .pokemon-modal-content {
    padding: 1.5rem;
  }
  .article-body { font-size: 1rem; }
  .section { padding: 3rem 0; }
  .footer { padding: 3rem 0 1.5rem; }
}

/* 1024px 以上:4 列网格(已在 main.css .grid-4 中处理) */
@media (min-width: 1280px) {
  .pokemon-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
  }
}
