/* ============================================================
   style.css — 明日方舟：终末地风主题
   （近黑工业底色 + 青蓝霓虹点缀 + 六边形/HUD 面板质感）
   保留全部类名与 --sakura-* 变量名，仅换视觉语言。
   ============================================================ */

/* ---------- 字体引入（失败时自动回退到系统字体） ---------- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ---------- 主题变量 ---------- */
:root {
  color-scheme: dark;
  /* 主色：终末地青蓝 / 冷钢蓝 */
  --sakura:        #00d8ff;
  --sakura-deep:   #00b8e6;
  --sakura-soft:   #0e2f40;
  --lilac:         #4fc3f7;
  --lilac-deep:    #2b7ba8;
  --cream:         #0b1016;
  --ink:           #d7e2ea;   /* 主文字：冷白 */
  --ink-soft:      #7d8d99;   /* 次要文字 */
  --card-bg:       rgba(14, 22, 31, 0.78);
  --card-border:   rgba(0, 216, 255, 0.24);
  --shadow:        0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 216, 255, 0.05);
  --shadow-soft:   0 4px 16px rgba(0, 0, 0, 0.35);
  --radius:        10px;
  --radius-sm:     6px;
  --nav-h:         64px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

::selection { background: rgba(0, 216, 255, 0.28); color: #eaf6fd; }

body {
  font-family: 'Rajdhani', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
  /* 蓝图网格 + 冷色辉光 + 近黑底 */
  background:
    radial-gradient(900px 620px at 85% -10%, rgba(0, 216, 255, 0.09), transparent 60%),
    radial-gradient(820px 600px at -10% 30%, rgba(10, 90, 170, 0.12), transparent 55%),
    linear-gradient(rgba(0, 216, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 216, 255, 0.035) 1px, transparent 1px),
    linear-gradient(160deg, #070b10 0%, #0a1017 40%, #0b1520 75%, #081018 100%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 数据粒子飘落层（原樱花，改为青蓝粒子） */
#sakura-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
#sakura-layer .petal {
  position: absolute;
  top: -40px;
  border-radius: 60% 40% 55% 45% / 55% 45% 60% 40%;
  opacity: 0.45;
  filter: drop-shadow(0 0 5px rgba(0, 216, 255, 0.55));
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 8vw), 106vh, 0) rotate(540deg); }
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 5vw, 56px);
  background: rgba(7, 11, 16, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 216, 255, 0.28);
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 21px; color: var(--sakura);
  text-decoration: none; letter-spacing: 2px;
}
.nav .brand .heart { display: inline-block; animation: beat 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(0, 216, 255, 0.6)); }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

.nav .links { display: flex; gap: 6px; align-items: center; }
.nav .links a {
  padding: 7px 15px; border-radius: 4px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  letter-spacing: 1px;
  border: 1px solid transparent;
  transition: all .25s ease;
}
.nav .links a:hover, .nav .links a.active {
  background: rgba(0, 216, 255, 0.10);
  color: var(--sakura);
  border-color: rgba(0, 216, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.15);
}

/* ---------- 通用容器 / 区块 ---------- */
.container { width: min(1120px, 92%); margin: 0 auto; }
section { padding: 72px 0; position: relative; z-index: 2; }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head .kicker {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--sakura); letter-spacing: 3px;
  background: rgba(0, 216, 255, 0.10);
  border: 1px solid rgba(0, 216, 255, 0.35);
  padding: 4px 16px; border-radius: 4px;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(26px, 4vw, 38px); font-weight: 700; color: var(--ink);
  letter-spacing: 1px;
}
.section-head h2 .dot { color: var(--sakura); text-shadow: 0 0 10px rgba(0, 216, 255, 0.7); }
.section-head p.sub { color: var(--ink-soft); margin-top: 8px; font-size: 15px; }

/* ---------- HUD 玻璃面板 ---------- */
.glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 26px rgba(0, 216, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 卡片四角 HUD 角标 */
.game-card, .acct-card, .contact-card {
  position: relative;
}
.game-card::before, .game-card::after,
.acct-card::before, .acct-card::after,
.contact-card::before, .contact-card::after {
  content: ''; position: absolute;
  width: 13px; height: 13px; z-index: 2;
  border: 2px solid rgba(0, 216, 255, 0.55);
  pointer-events: none; opacity: 0.75;
  transition: opacity .25s ease;
}
.game-card::before, .acct-card::before, .contact-card::before { top: 9px; left: 9px; border-right: none; border-bottom: none; }
.game-card::after,  .acct-card::after,  .contact-card::after  { bottom: 9px; right: 9px; border-left: none; border-top: none; }
.game-card:hover::before, .game-card:hover::after,
.acct-card:hover::before, .acct-card:hover::after,
.contact-card:hover::before, .contact-card:hover::after { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 0; position: relative; z-index: 2;
}
.hero-inner { max-width: 760px; }
.hero .avatar-wrap { margin-bottom: 18px; }
.hero .avatar {
  width: 132px; height: 132px; object-fit: cover;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #0e2f40, #123a52);
  filter: drop-shadow(0 6px 18px rgba(0, 216, 255, 0.30));
}
.hero .greet {
  font-size: 16px; font-weight: 700; color: var(--sakura); letter-spacing: 5px;
  text-shadow: 0 0 12px rgba(0, 216, 255, 0.5);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px); font-weight: 700; line-height: 1.25;
  margin: 10px 0 6px; letter-spacing: 3px;
  background: linear-gradient(120deg, var(--sakura), var(--lilac));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 216, 255, 0.25));
}
.hero .subtitle { font-size: 18px; color: var(--ink-soft); margin-bottom: 22px; letter-spacing: 1px; }
.hero .desc { max-width: 560px; margin: 0 auto 28px; font-size: 15.5px; color: var(--ink); }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 26px; border-radius: 4px;
  font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: 1px;
  transition: all .25s ease; border: none; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(120deg, rgba(0, 216, 255, 0.16), rgba(0, 110, 180, 0.16));
  color: var(--sakura);
  border: 1px solid var(--sakura);
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.20);
}
.btn-primary:hover {
  background: var(--sakura); color: #06121a;
  box-shadow: 0 0 24px rgba(0, 216, 255, 0.55);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid rgba(0, 216, 255, 0.45);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(0, 216, 255, 0.10); color: var(--sakura); }

/* Hero 底部小装饰 */
.hero .scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--ink-soft); font-size: 13px; opacity: .8; letter-spacing: 2px;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 关于我 ---------- */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
.about-card { padding: 26px; text-align: center; }
.about-card .card-img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft); background: linear-gradient(135deg, #0e2f40, #123a52);
  border: 1px solid rgba(0, 216, 255, 0.25);
}
.about-card .name { margin-top: 14px; font-weight: 900; font-size: 20px; letter-spacing: 1px; }
.about-card .role { color: var(--sakura); font-size: 14px; font-weight: 700; }

.about-text { padding: 12px 8px; }
.about-text h3 { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.about-text h3 .dot { color: var(--sakura); }
.about-text p { margin-bottom: 12px; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tag {
  padding: 4px 13px; border-radius: 4px; font-size: 13px; font-weight: 700;
  background: rgba(0, 216, 255, 0.10); color: var(--sakura);
  border: 1px solid rgba(0, 216, 255, 0.30);
}

/* ---------- 游戏卡片 ---------- */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px; position: relative; z-index: 2;
}
.game-card {
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; cursor: pointer;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 216, 255, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 22px rgba(0, 216, 255, 0.16);
}
.game-card .thumb {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
  background: linear-gradient(135deg, #0e2f40, #123a52);
}
.game-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card .g-title { font-weight: 900; font-size: 17px; color: #eaf6fd; letter-spacing: 0.5px; }
.game-card .g-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.game-card .g-meta .chip {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 4px;
  background: rgba(0, 216, 255, 0.10); color: #7fd4ff;
  border: 1px solid rgba(0, 216, 255, 0.25);
}
.game-card .g-meta .chip.platform { background: rgba(0, 216, 255, 0.16); color: var(--sakura); }
.game-card .g-meta .chip.pub-hg   { background: rgba(255, 176, 0, 0.13);  color: #ffb000; border-color: rgba(255, 176, 0, 0.35); }   /* 鹰角：琥珀 */
.game-card .g-meta .chip.pub-mh   { background: rgba(79, 195, 247, 0.13); color: #4fc3f7; border-color: rgba(79, 195, 247, 0.35); }  /* 米哈游：蓝 */
.game-card .g-meta .chip.pub-steam{ background: rgba(143, 163, 179, 0.13); color: #9db4c4; border-color: rgba(143, 163, 179, 0.35); } /* Steam：灰 */
.game-card .g-meta .chip.pub-free { background: rgba(74, 222, 128, 0.13); color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }  /* 免费：绿 */
.game-card .g-price { font-size: 15px; font-weight: 900; color: var(--sakura); }
.game-card .g-price.free { color: #4ade80; }
.game-card .g-desc {
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.game-card .g-link { margin-top: auto; font-size: 13.5px; font-weight: 800; color: var(--sakura); }

/* 游玩时长 */
.game-card .g-time {
  font-size: 12.5px; font-weight: 800; color: #4fc3f7; margin-top: 2px;
}
.game-card .g-time.recent { color: #5eead4; }

/* ---------- 联系 ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.contact-card { padding: 22px; text-align: center; }
.contact-card .icon { font-size: 30px; margin-bottom: 6px; }
.contact-card .label { font-size: 13px; color: var(--ink-soft); font-weight: 700; letter-spacing: 1px; }
.contact-card .value { font-weight: 800; margin-top: 4px; word-break: break-all; color: #cfe2ee; }

/* ---------- 游戏库页 ---------- */
.page-hero { padding: 56px 0 20px; text-align: center; position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 700; letter-spacing: 3px; }
.page-hero h1 .dot { color: var(--sakura); text-shadow: 0 0 10px rgba(0, 216, 255, 0.7); }
.page-hero p { color: var(--ink-soft); margin-top: 8px; letter-spacing: 1px; }

.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin: 28px 0 34px; padding: 16px; position: relative; z-index: 2;
}
.toolbar .search {
  flex: 1; min-width: 220px;
  padding: 10px 18px; border-radius: 4px; border: 1px solid rgba(0, 216, 255, 0.30);
  background: rgba(9, 15, 22, 0.9); font-size: 15px; font-family: inherit; color: #e2f0f8;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.toolbar .search:focus { border-color: var(--sakura); box-shadow: 0 0 12px rgba(0, 216, 255, 0.2); }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .filter {
  padding: 8px 15px; border-radius: 4px; border: 1px solid rgba(0, 216, 255, 0.25);
  background: rgba(9, 15, 22, 0.9); font-weight: 700; font-size: 13.5px;
  font-family: inherit; color: #b9ccd9; cursor: pointer; transition: all .2s;
}
.toolbar .filter:hover { border-color: var(--sakura); color: var(--sakura); }
.toolbar .filter.active {
  background: var(--sakura); color: #06121a; border-color: transparent;
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.4);
}

/* 排序下拉 */
.toolbar .sort {
  padding: 10px 14px; border-radius: 4px; border: 1px solid rgba(0, 216, 255, 0.30);
  background: rgba(9, 15, 22, 0.9); font-size: 14px; font-weight: 700;
  font-family: inherit; color: #b9ccd9; outline: none; cursor: pointer;
  transition: border-color .2s;
}
.toolbar .sort:focus { border-color: var(--sakura); }

/* 提示条 */
#config-notice, #error-notice {
  font-size: 13.5px; color: var(--ink); gap: 6px; padding: 13px 18px;
  margin-top: 0; margin-bottom: -6px;
}
#config-notice code {
  background: rgba(0, 216, 255, 0.14); color: var(--sakura);
  padding: 1px 6px; border-radius: 4px; font-size: 12.5px;
}

/* 账号信息条 */
.acct-avatar {
  width: 46px; height: 46px; border-radius: 6px; object-fit: cover;
  border: 1px solid rgba(0, 216, 255, 0.4);
  background: linear-gradient(135deg, #0e2f40, #123a52);
  box-shadow: var(--shadow-soft);
}
.acct-meta { flex: 1; min-width: 0; line-height: 1.6; }
#acct-name { font-weight: 900; font-size: 16px; color: #eaf6fd; letter-spacing: 1px; }
#acct-stats { font-size: 12.5px; color: var(--ink-soft); }

/* 我的游戏账号卡片 */
.accounts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px; position: relative; z-index: 2; margin-bottom: 30px;
}
.acct-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.acct-head { display: flex; align-items: center; gap: 12px; }
.acct-head-avatar {
  width: 54px; height: 54px; object-fit: cover; flex: none;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #0e2f40, #123a52);
  filter: drop-shadow(0 3px 8px rgba(0, 216, 255, 0.25));
}
.acct-head-avatar.ph { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.acct-head-text { flex: 1; min-width: 0; line-height: 1.5; }
.acct-game { font-weight: 900; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #eaf6fd; }
.acct-badge {
  font-size: 11px; font-weight: 700; color: #041018;
  background: linear-gradient(120deg, var(--sakura), #0a5c8a);
  padding: 1px 9px; border-radius: 4px;
}
.acct-badge.manual { background: rgba(0, 216, 255, 0.12); color: #7fd4ff; border: 1px solid rgba(0, 216, 255, 0.35); }
.acct-nick { font-size: 13.5px; color: var(--ink-soft); }
.acct-line { font-size: 12.5px; color: var(--ink-soft); }
.acct-line.note { color: var(--ink); font-size: 13px; }
.acct-chars { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.acct-char {
  position: relative; width: 46px; height: 46px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.16), rgba(20, 60, 90, 0.35));
  border: 1px solid rgba(0, 216, 255, 0.25);
  box-shadow: var(--shadow-soft);
}
.acct-char img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-char span {
  position: absolute; right: 3px; bottom: 2px; font-size: 10px; font-weight: 800;
  color: #eaf6fd; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  background: rgba(0, 20, 30, 0.72); padding: 0 4px; border-radius: 4px;
  border: 1px solid rgba(0, 216, 255, 0.3);
}

.games-section { padding-top: 0; padding-bottom: 80px; }
#game-count { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; position: relative; z-index: 2; }

/* 加载 / 空态 */
.state-msg { text-align: center; padding: 60px 0; color: var(--ink-soft); font-size: 15px; position: relative; z-index: 2; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid rgba(0, 216, 255, 0.15); border-top-color: var(--sakura);
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; padding: 34px 0 40px; font-size: 13.5px; color: var(--ink-soft);
  position: relative; z-index: 2; letter-spacing: 1px;
}
.footer .heart { color: var(--sakura); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .nav .links a { padding: 6px 12px; font-size: 14px; }
}
@media (max-width: 520px) {
  .hero .actions .btn { width: 100%; }
}
