:root {
  --bg: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --line: #e6e6e9;
  --radius: 22px;
  --maxw: 1120px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-brand { font-weight: 600; font-size: 17px; letter-spacing: 0.2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-home {
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  color: #0071e3;
  padding: 8px 14px;
  border-radius: 980px;
  border: 1px solid rgba(0, 113, 227, 0.35);
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.12s ease;
}
.nav-home:hover { background: rgba(0, 113, 227, 0.08); }
.nav-home:active { transform: scale(0.96); }
.nav-updated { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

.btn-update {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: #0071e3;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 980px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-update:hover { background: #0077ed; }
.btn-update:active { transform: scale(0.96); }
.btn-update:disabled { opacity: 0.6; cursor: default; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero（PlayStation 设计语言） ---------- */
.hero {
  position: relative;
  min-height: 28vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  /* 蓝天白云草地花背景图 */
  background: url('assets/hero-bg.jpg') center/cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.hero-bg {
  display: none;
}

.hero-content {
  position: relative; z-index: 2;
  padding: 48px 28px;
  max-width: 860px;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
}

/* eyebrow：badge-info 蓝色胶囊 */
.hero-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  background: #0070d1; /* PlayStation Blue */
  color: #ffffff;
  font: 500 12px/1 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 9999px;
}

/* 大标题：SST 招牌细体（weight 300），airy 编辑感 */
.hero-title {
  font-family: "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 700; line-height: 1.2; margin: 0 0 16px;
  letter-spacing: 0.1px;
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.hero-sub {
  font: 400 17px/1.5 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: rgba(255,255,255,0.7); margin: 0 0 30px;
}

/* CTA：全圆角胶囊；蓝色=主操作，描边=次级（flat，无投影） */
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  min-height: 48px; padding: 13px 30px; border-radius: 9999px;
  font: 700 15px/1 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.45px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: translateY(1px); }
.pill-light { background: #0070d1; color: #fff; }                          /* PlayStation Blue 主操作 */
.pill-light:hover { background: #0064b7; }                                 /* pressed */
.pill-ghost { background: transparent; color: #fff; border-color: rgba(229,229,229,0.2); } /* 次级描边 */
.pill-ghost:hover { background: rgba(255,255,255,0.1); }

/* 滚动提示：carousel-paddle 半透明圆 */
.hero-scroll {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 48px; border-radius: 9999px;
  background: rgba(255,255,255,0.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; z-index: 2;
  transition: background 0.15s ease;
}
.hero-scroll:hover { background: rgba(255,255,255,0.28); }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 布局 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 60px; }
.section { padding: 64px 0 24px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-title { font-size: clamp(28px, 5vw, 44px); font-weight: 700; margin: 0 0 10px; letter-spacing: -0.5px; }
.section-desc { color: var(--ink-soft); font-size: 15px; max-width: 640px; margin: 0 auto; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ---------- 卡片（PlayStation game-tile 风格） ---------- */
.card {
  position: relative;
  border-radius: 8px; /* rounded.md */
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: var(--card-grad, #1b3a6b);
  box-shadow: none; /* 扁平无投影 */
  isolation: isolate;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.16); /* soft active shadow */
}

.card-bg {
  position: absolute; inset: 0;
  z-index: 0;
  background-color: var(--card-grad, #1b3a6b);
  background-image: var(--card-bg-image, none);
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.card:hover .card-bg { transform: scale(1.02); }
.card-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.92) 100%);
}

/* 游戏Logo圆标 */
.card-logo {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  width: 40px; height: 40px; border-radius: 9999px; /* full */
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

.card-body { position: relative; z-index: 1; padding: 20px; }

/* 游戏名：细体 + 大写追踪 */
.card-game {
  font-family: "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; margin: 0 0 4px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.85), 0 0 18px rgba(0,0,0,0.5);
}

/* tagline：body-dark 灰，但提升亮度与阴影 */
.card-tagline {
  font: 400 14px/1.5 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: rgba(255,255,255,0.92); margin: 0 0 16px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.85), 0 0 18px rgba(0,0,0,0.5);
}

/* 兑换码块：深色毛玻璃卡片，确保在复杂背景图上可读 */
.code-item {
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.code-item-expired { opacity: 0.78; }

.code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 6px;
}
.code-val {
  font-family: "Roboto Mono", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  word-break: break-all;
}
.code-item-expired .code-val {
  text-decoration: line-through;
  opacity: 0.7;
}

.code-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* 状态徽章 */
.code-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 9999px;
  letter-spacing: 0.3px;
}
.code-badge-valid {
  background: rgba(46, 204, 113, 0.18);
  color: #7af1a8;
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.code-badge-expired {
  background: rgba(255, 82, 82, 0.18);
  color: #ff9e9e;
  border: 1px solid rgba(255, 82, 82, 0.4);
}

/* 复制按钮：全圆角胶囊 */
.code-copy {
  border: none; background: #0070d1; color: #fff;
  font: 700 12px/1 "Roboto", "Inter", Arial, sans-serif;
  padding: 6px 14px; border-radius: 9999px; cursor: pointer;
  white-space: nowrap; transition: background 0.15s ease, transform 0.12s ease;
}
.code-copy:hover { background: #0064b7; }
.code-copy:active { transform: scale(0.96); }

.code-meta {
  font: 400 12px/1.5 "Roboto", "Inter", Arial, sans-serif;
  color: rgba(255, 255, 255, 0.85);
}
.code-meta .code-reward {
  font-size: 13px; font-weight: 600; color: #eaf4ff; margin: 2px 0;
}
.code-meta .code-sub {
  font-size: 12px; color: rgba(255, 255, 255, 0.75); margin-top: 3px;
}
.code-meta .warn { color: #53b1ff; } /* link-dark 蓝 */

.card-empty {
  font: 400 14px/1.5 "Roboto", "Inter", Arial, sans-serif;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06); border-radius: 8px; padding: 14px; text-align: center;
}

/* 活动列表 */
.event-item {
  display: block; text-decoration: none; color: inherit;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.event-item:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.event-title {
  font-size: 15px; font-weight: 600; margin: 0 0 8px; line-height: 1.35;
  text-shadow: 0 1px 6px rgba(0,0,0,0.85);
}
.event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 980px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
}
.tag.time { background: rgba(0,0,0,0.25); }
.event-summary {
  font-size: 12.5px; opacity: 0.95; margin: 0 0 10px; line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.75);
}
.event-more {
  font-size: 12px; font-weight: 600; opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.75);
}
.event-more::after { content: " →"; }

/* ---------- 联名活动（PlayStation 设计语言） ---------- */

/* 区块标题：浅色画布，细体大标题 + 发丝分割线（无装饰） */
#events .section-head {
  background: transparent;
  border-radius: 0;
  padding: 0 0 10px;
  margin-bottom: 24px;
  text-align: left;
  border-bottom: 1px solid #f3f3f3; /* hairline-light */
}
#events .section-title {
  color: #000000; /* ink */
  text-transform: none;
  letter-spacing: 0.1px;
  font: 300 clamp(28px, 4vw, 40px)/1.2 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0 0 8px;
  text-shadow: none;
}
#events .section-desc {
  color: rgba(0,0,0,0.6); /* body-light */
  font: 400 16px/1.5 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  max-width: 720px;
  margin: 0;
}

/* 活动卡片：深色 game-tile（surface-dark-card），8px 圆角，无静止投影 */
.event-card {
  position: relative;
  background: #181818; /* surface-dark-card */
  color: #fff;
  border: 1px solid rgba(229,229,229,0.12);
  border-radius: 8px; /* rounded.md */
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 200px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* 顶部品牌色条（游戏身份标识） */
.event-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--event-bg, #1b3a6b);
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.16); /* 仅抬升时出现（soft active shadow） */
}

/* 卡片头 */
.event-card-head {
  display: flex; align-items: center; gap: 10px;
  background: #121314; /* surface-dark-elevated */
  padding: 13px 16px;
  margin: 0;
  border-bottom: 1px solid rgba(229,229,229,0.12);
}
.event-card-logo {
  width: 32px; height: 32px; border-radius: 9999px;
  background: var(--event-bg, #1b3a6b);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
}
.event-card-game {
  font: 600 13px/1.2 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0; color: #fff;
}

/* 活动条目：surface-dark-elevated 内嵌面板（8px 圆角，扁平） */
.event-card .event-item {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  text-decoration: none;
  color: #fff;
  background: #121314;
  border: none;
  border-radius: 8px;
  padding: 13px 15px;
  margin: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.event-card .event-item:last-child { margin-bottom: 12px; }
.event-card .event-item:hover { background: #20222a; transform: translateY(-1px); }
.event-card .event-title {
  color: #fff;
  margin: 0 0 10px;
  font: 600 15px/1.4 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.event-card .event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
/* 标签：badge-info 蓝色胶囊 */
.event-card .tag {
  background: #0070d1; /* PlayStation Blue */
  color: #fff;
  border: none;
  border-radius: 9999px;
  font: 500 12px/1 "Roboto", "Inter", Arial, "PingFang SC", sans-serif;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  text-shadow: none;
}
/* 时间标签：中性灰，低调 */
.event-card .tag.time { background: rgba(255,255,255,0.08); color: #cccccc; }
.event-card .event-summary {
  color: rgba(255,255,255,0.7); /* body-dark */
  margin: 0 0 10px;
  font: 400 14px/1.6 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  text-shadow: none;
}
/* 前进线索：link-dark 蓝 + chevron */
.event-card .event-more {
  color: #53b1ff; /* link-dark */
  font: 700 13px/1 "Roboto", "Inter", Arial, "PingFang SC", sans-serif;
  letter-spacing: 0.3px;
  text-shadow: none;
  margin-top: auto;
}
.event-card .event-more::after { content: " \2192"; font-weight: 700; }
.event-card .card-empty {
  color: #cccccc;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  text-align: left;
  margin: 12px;
  padding: 14px;
}

/* ---------- 联名活动（复用 event-card 结构） ---------- */

#collabs .section-head {
  background: transparent;
  border-radius: 0;
  padding: 0 0 10px;
  margin-bottom: 24px;
  text-align: left;
  border-bottom: 1px solid #f3f3f3;
}
#collabs .section-title {
  color: #000000;
  text-transform: none;
  letter-spacing: 0.1px;
  font: 300 clamp(28px, 4vw, 40px)/1.2 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0 0 8px;
  text-shadow: none;
}
#collabs .section-desc {
  color: rgba(0,0,0,0.6);
  font: 400 16px/1.5 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  max-width: 720px;
  margin: 0;
}

/* 联名条目 */
.collab-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  background: #121314;
  border: none;
  border-radius: 8px;
  padding: 13px 15px;
  margin: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.collab-item:last-child { margin-bottom: 12px; }
.collab-item:hover { background: #20222a; transform: translateY(-1px); }

.collab-title {
  color: #fff;
  margin: 0 0 10px;
  font: 600 15px/1.4 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 联名奖励：浅金底色突出 */
.collab-reward {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font: 500 13px/1.4 "Roboto", "Inter", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0 0 10px;
}

/* 品牌标签：与游戏主色联动 */
.event-card .tag.partner {
  background: rgba(255, 255, 255, 0.15);
  color: #ffd166;
  border: none;
  border-radius: 9999px;
  font: 600 12px/1 "Roboto", "Inter", Arial, "PingFang SC", sans-serif;
  letter-spacing: 0.3px;
  padding: 4px 10px;
  text-shadow: none;
}

/* 联名卡片复用 event-card 样式：顶部 4px 彩色条由 --event-bg 决定 */

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(0,0,0,0.86); color: #fff; padding: 11px 20px; border-radius: 980px;
  font-size: 14px; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--ink-soft); font-size: 12.5px; padding: 40px 10px 0; border-top: 1px solid var(--line); margin-top: 40px; }
.foot-dim { opacity: 0.7; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .card { min-height: 360px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
}
