/* 前台公共样式（首页 + 游戏详情页） */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  min-height: 100vh;
}
button { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* 背景层 */
#bg {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(135deg, #d3c3fc, #ecf3fe, #b9dafb);
  background-size: cover; background-position: center;
}

.wrap { max-width: 480px; margin: 0 auto; padding: 72px 16px 40px; }
.page-game .wrap { padding-top: 88px; }

/* 头部 */
.site-head { text-align: center; margin-bottom: 18px; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 20px rgba(80, 90, 150, .25);
  background: #fff;
}
.site-head h1 { font-size: 25px; font-weight: 800; margin-top: 12px; letter-spacing: .5px; }
.site-head .desc { font-size: 13.5px; color: #64748b; margin-top: 8px; line-height: 1.7; }
.page-game .site-head h1 { text-shadow: 0 1px 10px rgba(255, 255, 255, .9); }
.page-game .site-head .desc { color: #475569; text-shadow: 0 1px 8px rgba(255, 255, 255, .8); }

/* 公告 */
.announce {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 16px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.7; color: #b45309;
  margin-bottom: 16px;
}

/* 链接卡片 */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 22px; padding: 18px;
  box-shadow: 0 8px 28px rgba(100, 116, 180, .13);
  cursor: pointer; text-align: left; width: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
  animation: rise .45s ease both;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(100, 116, 180, .2); }
.card:active { transform: scale(.985); }
.card .icon-circle {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: #f1f5f9; color: #475569;
  display: flex; align-items: center; justify-content: center;
}
.card .card-main { flex: 1; min-width: 0; }
.card .card-label { font-size: 15.5px; font-weight: 700; color: #1e293b; line-height: 1.45; }
.card .card-desc { font-size: 12px; color: #94a3b8; margin-top: 4px; line-height: 1.6; }
.card .pill {
  flex: none; font-size: 12.5px; color: #64748b;
  background: rgba(238, 242, 247, .95);
  border-radius: 999px; padding: 6px 13px; white-space: nowrap;
}

/* 纯展示卡（不可点击） */
.card.info { cursor: default; display: block; }
.card.info:hover { transform: none; box-shadow: 0 8px 28px rgba(100, 116, 180, .13); }
.card.info .info-head { display: flex; align-items: center; gap: 12px; }
.card.info .info-body {
  margin-top: 12px; font-size: 13px; color: #475569; line-height: 1.9;
  white-space: pre-line; word-break: break-word;
}

/* 游戏列表 */
.games { margin-top: 26px; }
.games-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.games-head h3 { font-size: 17px; font-weight: 800; }
.games-head span { font-size: 12px; color: #94a3b8; }
.search {
  width: 100%; border: 1px solid rgba(255, 255, 255, .7); outline: none;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 999px; padding: 12px 18px; font-size: 14px; color: #1e293b;
  margin-bottom: 14px; box-shadow: 0 6px 20px rgba(100, 116, 180, .1);
}
.search::placeholder { color: #94a3b8; }
.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 20px; padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(100, 116, 180, .12);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
  animation: rise .45s ease both;
}
.game-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(100, 116, 180, .2); }
.game-card img.g-avatar {
  flex: none; width: 62px; height: 62px; border-radius: 16px; object-fit: cover;
  background: #f1f5f9; border: 1px solid rgba(255, 255, 255, .8);
}
.game-card .g-main { flex: 1; min-width: 0; }
.game-card .g-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-card .g-title { font-size: 15.5px; font-weight: 700; }
.game-card .g-tag {
  flex: none; font-size: 11px; font-weight: 700; color: #dc2626;
  background: #fee2e2; border-radius: 999px; padding: 2px 9px;
}
.game-card .g-codes { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.game-card .g-codes span { font-size: 12px; color: #94a3b8; line-height: 1.5; }
.game-card .g-enter { flex: none; font-size: 13px; color: #94a3b8; white-space: nowrap; }
.empty { text-align: center; color: #94a3b8; font-size: 13px; padding: 30px 0; }

/* 返回主页 */
.back-btn {
  position: fixed; top: 14px; left: 14px; z-index: 10;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px; padding: 8px 15px;
  font-size: 13px; color: #334155; cursor: pointer;
  box-shadow: 0 4px 14px rgba(100, 116, 180, .18);
}

/* 页脚 */
.footer { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 34px; line-height: 1.7; }
.page-game .footer { color: #64748b; text-shadow: 0 1px 6px rgba(255, 255, 255, .8); }

/* 后台入口 */
.admin-entry {
  position: fixed; right: 14px; bottom: 14px; z-index: 10;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .7);
  color: #94a3b8; font-size: 12px; border-radius: 999px; padding: 7px 14px;
}

.loading, .notfound { text-align: center; color: #64748b; padding-top: 120px; font-size: 15px; }
.notfound .big { font-size: 44px; margin-bottom: 12px; }
.notfound a {
  display: inline-block; margin-top: 18px; background: rgba(255, 255, 255, .85);
  border-radius: 999px; padding: 10px 22px; font-size: 14px; color: #334155;
}

/* QQ 加群弹窗 */
.qq-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30, 41, 59, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.qq-modal {
  position: relative; width: 100%; max-width: 380px;
  background: #fff; border-radius: 24px; padding: 26px 22px 22px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  animation: rise .25s ease both;
}
.qq-close {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: #94a3b8; cursor: pointer; line-height: 1; padding: 4px;
}
.qq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-right: 24px; }
.qq-icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: #eff6ff; color: #3b82f6;
  display: flex; align-items: center; justify-content: center;
}
.qq-title { font-size: 16px; font-weight: 800; color: #1e293b; }
.qq-glabel { font-size: 13px; color: #94a3b8; margin-top: 3px; }
.qq-btn {
  display: block; width: 100%; text-align: center; cursor: pointer;
  border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 700;
  border: none; margin-bottom: 10px;
}
.qq-btn.primary { background: #3b82f6; color: #fff; }
.qq-btn.primary:hover { background: #2563eb; }
.qq-btn.ghost { background: #eff4fb; color: #334155; }
.qq-btn.ghost:hover { background: #e2eaf5; }
.qq-copy-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px; margin-top: 4px;
}
.qq-copy-row .num { font-size: 15px; font-weight: 700; color: #334155; letter-spacing: .5px; }
.qq-copy-row button {
  border: none; background: none; color: #3b82f6; font-size: 13.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 4px;
}
.qq-desc { font-size: 12.5px; color: #94a3b8; line-height: 1.8; text-align: center; margin-top: 10px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
