* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f0f1a;
  --gold: #ffd54a;
  --gold-deep: #e0a93e;
  --accent: #7b5cff;
  --accent-deep: #5b3fd4;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --text-dim: rgba(255, 255, 255, 0.65);
}

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

.app { position: relative; min-height: 100vh; }

/* 星空背景 */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(70, 50, 140, 0.45) 0%, transparent 60%),
    radial-gradient(90% 60% at 20% 80%, rgba(30, 60, 120, 0.35) 0%, transparent 55%),
    radial-gradient(90% 60% at 80% 70%, rgba(80, 40, 120, 0.3) 0%, transparent 55%),
    linear-gradient(180deg, #05060f 0%, #0a0e20 40%, #0f0f1a 100%);
}

/* 星星 */
.bg-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.star {
  position: absolute; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.7);
  animation: twinkle ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.1); }
}
.shooting {
  position: absolute; width: 2px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  border-radius: 999px;
  animation: shoot linear infinite;
}
@keyframes shoot {
  0% { transform: translate(0, 0) rotate(45deg); opacity: 0; }
  5% { opacity: 1; }
  20% { transform: translate(-220px, 220px) rotate(45deg); opacity: 0; }
  100% { transform: translate(-220px, 220px) rotate(45deg); opacity: 0; }
}

.content { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 20px 14px 40px; }

/* 顶部标题 */
.header { text-align: center; padding: 14px 0 8px; }
.title {
  font-size: 26px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffe27a 0%, #ffd54a 40%, #d99a2b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 12px rgba(255, 213, 74, 0.35);
}

/* 公告滚动栏 */
.marquee-wrap {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 16px; padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border); border-radius: 999px;
  overflow: hidden;
}
.marquee-icon { font-size: 14px; flex-shrink: 0; }
.marquee-track { flex: 1; overflow: hidden; white-space: nowrap; }
.marquee-inner { display: inline-block; animation: marquee 12s linear infinite; }
.marquee-text { font-size: 13px; color: #ff9d9d; }
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* 独立大图标按钮（呼吸发光 + 彩虹） */
.hero-button-wrap { margin-bottom: 14px; display: flex; justify-content: center; position: relative; }
.hero-label {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 80%; max-width: 220px; overflow: hidden;
  font-size: 13px; font-weight: 900;
  letter-spacing: 2px; line-height: 1; white-space: nowrap;
  z-index: 2;
}
.hero-label-inner {
  display: inline-block; white-space: nowrap;
  background: linear-gradient(90deg, #ffd76a, #00ff88, #00cfff, #ff9d9d, #ffd76a);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroLabelScroll 14s ease-in-out infinite, heroLabelFlow 3s linear infinite;
  padding-left: 100%;
}
@keyframes heroLabelScroll {
  0% { transform: translateX(0); }
  45% { transform: translateX(-100%); }
  70% { transform: translateX(-100%); }
  100% { transform: translateX(-200%); }
}
@keyframes heroLabelFlow {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}
.hero-button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 32px 36px 20px; border-radius: 16px; text-decoration: none; color: #fff;
  font-size: 20px; font-weight: 700; letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(123, 92, 255, 0.35), rgba(255, 92, 170, 0.25));
  border: 2px solid transparent;
  background-clip: padding-box;
  /* 彩虹旋转边框 */
  animation: heroRainbowBorder 4s linear infinite;
}
.hero-button::before {
  content: ''; position: absolute; inset: -2px; border-radius: 18px; padding: 2px;
  background: conic-gradient(from var(--rainbow-angle, 0deg),
    #ff004c, #ff8a00, #ffe600, #00ff88, #00cfff, #7a00ff, #ff004c);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: heroSpin 4s linear infinite;
  z-index: -1;
}
.hero-button::after {
  content: ''; position: absolute; inset: -6px; border-radius: 22px;
  background: conic-gradient(from 0deg,
    #ff004c, #ff8a00, #ffe600, #00ff88, #00cfff, #7a00ff, #ff004c);
  filter: blur(18px); opacity: 0.7;
  z-index: -2;
  /* 呼吸发光 */
  animation: heroBreathe 2.5s ease-in-out infinite;
}
.hero-icon { font-size: 48px; line-height: 1; }
.hero-icon img { width: 80px; height: 80px; border-radius: 16px; object-fit: cover; display: block; }
.hero-name {
  line-height: 1; text-align: center;
  background: linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #00ff88, #00cfff, #7a00ff, #ff004c);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: heroNameFlow 3s linear infinite;
}
@keyframes heroNameFlow {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}
.hero-badge {
  position: absolute; top: -10px; right: -10px;
  display: flex; align-items: center; justify-content: center;
  width: 35px; height: 35px; border-radius: 50%;
  background: linear-gradient(135deg, #ff004c, #ff6a00);
  color: #fff; font-size: 20px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 8px rgba(255, 0, 76, 0.6);
  z-index: 3;
}

@keyframes heroSpin {
  0% { --rainbow-angle: 0deg; }
  100% { --rainbow-angle: 360deg; }
}
@keyframes heroBreathe {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

/* 功能按钮区 */
.action-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px;
}
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 6px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(123, 92, 255, 0.25), rgba(123, 92, 255, 0.08));
  border: 1px solid rgba(123, 92, 255, 0.4);
  transition: transform .15s, box-shadow .15s;
}
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(123, 92, 255, 0.35); }
.action-btn .icon { font-size: 22px; }
.action-btn .name { font-size: 12px; }

/* 标签栏 */
.tab-bar {
  margin-bottom: 16px; overflow-x: auto;
  scrollbar-width: none; /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none; /* IE/Edge 隐藏滚动条 */
}
.tab-bar::-webkit-scrollbar { display: none; width: 0; height: 0; } /* Chrome/Safari 隐藏滚动条 */
.tab-track { display: flex; flex-wrap: nowrap; gap: 8px; }
.tab-item {
  position: relative; padding: 9px 18px; border-radius: 999px; white-space: nowrap;
  text-decoration: none; color: var(--text-dim); font-size: 13px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid transparent;
  transition: all .15s;
}
.tab-item.active {
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #7b5cff, #5b3fd4);
  box-shadow: 0 4px 14px rgba(123, 92, 255, 0.5);
}
.tab-badge {
  position: absolute; top: -6px; right: -6px; padding: 1px 5px;
  background: #ff4d4d; color: #fff; font-size: 10px; border-radius: 999px; font-weight: 700;
}

/* 图标矩阵 */
.nav-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.nav-icon-wrap {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1; max-width: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255, 213, 74, 0.18), rgba(255, 213, 74, 0.04));
  border: 1px solid rgba(255, 213, 74, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 26px;
}
/* 「新」角标 */
.nav-badge-new {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff4d4d, #e02424);
  color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 6px rgba(224, 36, 36, 0.6);
  z-index: 2;
}
.nav-item:hover .nav-icon-wrap {
  box-shadow: 0 8px 20px rgba(255, 213, 74, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.nav-icon-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.nav-name { font-size: 14px; font-weight: 600; text-align: center; word-break: break-all; line-height: 1.3; }

/* 单图标居中大图模式 */
.nav-grid.single {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}
.nav-grid.single .single-item {
  gap: 14px;
  padding: 28px 24px;
}
.nav-grid.single .nav-icon-wrap {
  width: 100%; aspect-ratio: 1 / 1; max-width: 160px;
  border-radius: 32px;
  font-size: 76px;
}
.nav-grid.single .nav-icon-wrap img { border-radius: 32px; }
.nav-grid.single .nav-name { font-size: 18px; }

/* 底部 */
.footer { margin-top: 28px; text-align: center; }
.footer-inner {
  padding: 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
}
.footer-title { font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 10px; }
.footer-list { display: flex; flex-direction: column; gap: 8px; }
.footer-item { color: var(--text-dim); font-size: 13px; text-decoration: none; }
.footer-item:hover { color: var(--text); }
.copyright { margin-top: 14px; font-size: 12px; color: var(--text-dim); }
.disclaimer { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.35); line-height: 1.6; }

.empty { color: var(--text-dim); text-align: center; grid-column: 1 / -1; padding: 40px; }

/* ===== 移动端响应式适配 ===== */
@media (max-width: 400px) {
  .content { padding: 16px 10px 32px; }
  .title { font-size: 22px; letter-spacing: 1px; }

  /* 大图标按钮缩小 */
  .hero-button { padding: 26px 20px 16px; font-size: 17px; }
  .hero-icon img { width: 64px; height: 64px; border-radius: 14px; }
  .hero-icon { font-size: 40px; }
  .hero-badge { width: 28px; height: 28px; font-size: 16px; top: -8px; right: -8px; }
  .hero-label { font-size: 11px; letter-spacing: 1px; }

  /* 功能按钮 */
  .action-bar { gap: 6px; }
  .action-btn { padding: 10px 4px; border-radius: 10px; }
  .action-btn .name { font-size: 11px; }

  /* 图标矩阵：缩小图标和间距 */
  .nav-grid { gap: 14px; }
  .nav-item { padding: 12px 6px; gap: 10px; border-radius: 13px; }
  .nav-icon-wrap { max-width: 58px; border-radius: 16px; font-size: 28px; }
  .nav-icon-wrap img { border-radius: 16px; }
  .nav-name { font-size: 12px; }

  /* 单图标大图模式缩小 */
  .nav-grid.single .nav-icon-wrap { max-width: 120px; border-radius: 26px; font-size: 60px; }
  .nav-grid.single .single-item { padding: 20px 18px; }

  /* 标签栏 */
  .tab-item { padding: 8px 14px; font-size: 12px; }
}

@media (max-width: 340px) {
  /* 超窄屏：图标矩阵降为 3 列 */
  .nav-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-icon-wrap { max-width: 56px; font-size: 28px; }
}
