/* ===== H5 游戏聚合门户 - 前台样式（移动端优先，对齐参考站手机模式） ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1aad19;
  --primary-dark: #07c160;
  --primary-light: #edfcfa;
  --accent: #07c160;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #999;
  --muted-2: #666;
  --border: #ececec;
  --radius: 10px;
  --shadow: 0 0 4px rgba(221, 221, 221, .5);
  --shadow-hover: 0 4px 14px rgba(0, 0, 0, .08);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* 给底部 Tabbar 留位 */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 677px; margin: 0 auto; padding: 0 15px; }

/* ===== Header（头像 + 搜索 + 记录，参考站手机模式） ===== */
.site-header {
  background-color: var(--primary-light);
  padding: 10px 15px;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid #d8f0e6;
}
.header-row { display: flex; align-items: center; gap: 10px; }
.header-avatar {
  flex: 0 0 50px;
  width: 50px; height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 0 15px;
  height: 38px;
  min-width: 0;
}
.search-bar .search-ico { color: var(--primary); font-size: 16px; margin-right: 6px; flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  min-width: 0;
  caret-color: var(--primary);
}
.search-bar input::placeholder { color: #bbb; }
.search-bar button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 13px;
  margin-left: 8px;
  flex-shrink: 0;
}
.header-record {
  flex: 0 0 auto;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 13px;
  background: #fff;
  white-space: nowrap;
}
.header-admin {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
}

/* ===== 公告栏（滚动卡片） ===== */
.notice-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice-icon {
  flex-shrink: 0;
  font-size: 16px;
}
.notice-scroll-container {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  color: #b9770e;
  font-size: 13px;
}
.notice-scroll-content {
  display: inline-flex;
  animation: notice-scroll 12s linear infinite;
}
.notice-text {
  display: inline-block;
  padding-right: 50px;
}
@keyframes notice-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== 大图轮播（公告上方） ===== */
.home-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  background: #fff;
}
.slider-track {
  display: flex;
  transition: transform .45s ease;
  width: 100%;
}
.slider-slide {
  flex: 0 0 100%;
  width: 100%;
  display: block;
  text-decoration: none;
  font-size: 0;
}
.slider-slide img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.slider-dots {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 5;
}
.slider-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .2s;
}
.slider-dot.on {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}

/* ===== 快捷导航（公告下方5个） ===== */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 12px 15px 4px;
}
.quick-nav-item {
  text-decoration: none;
  color: #222;
  text-align: center;
}
.quick-nav-item img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  background: #f0f3fa;
}
.quick-nav-item span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Category Nav ===== */
.cat-nav { display: flex; gap: 6px; padding: 12px 15px 0; flex-wrap: wrap; }
.cat-nav a { padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--muted-2); font-size: 14px; border: 1px solid var(--border); transition: all .15s; }
.cat-nav a:hover { color: var(--primary); border-color: var(--primary); }
.cat-nav a.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Block ===== */
main { padding: 12px 0 30px; }
.block { background: var(--card); border-radius: var(--radius); padding: 14px; margin: 12px 0; box-shadow: var(--shadow); }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block-head h2 { font-size: 17px; font-weight: 700; }
.more { color: var(--primary); font-size: 13px; }
.meta-text { color: var(--muted); font-size: 13px; }

/* ===== Card Grid（随机精选/相关推荐） ===== */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.card { background: #fff; border-radius: 12px; padding: 6px; transition: transform .15s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); }
.card-icon { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: #f0f3fa; margin-bottom: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-size: 12px; font-weight: 500; line-height: 1.3; height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; color: #333; }
.card-date { color: var(--muted); font-size: 11px; margin-top: 4px; }
.card-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; background: #eef9ee; color: var(--primary); }
.card-views { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* 随机精选：移动端只显示图标+标题（对齐参考站） */
.random-grid .card-date,
.random-grid .card-tags,
.random-grid .card-views { display: none; }
.random-grid .card { padding: 4px; }
.random-grid .card-icon { border-radius: 14px; }
.random-grid .card-title { font-size: 12px; height: 30px; }

/* ===== Media List（横向列表卡片，对齐参考站最新更新） ===== */
.media-list { display: flex; flex-direction: column; }
.media-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background .12s;
}
.media-item:last-child { border-bottom: none; }
.media-item:hover { background: #fafafa; }
.media-thumb {
  flex: 0 0 60px;
  width: 60px; height: 60px;
  margin-right: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f3fa;
  position: relative;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-badge-new {
  position: absolute;
  top: 0; right: 0;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-bottom-left-radius: 8px;
  line-height: 16px;
  z-index: 2;
}
.thumb-badge-top {
  position: absolute;
  top: 0; right: 0;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  font-size: 14px;
  padding: 1px 6px;
  border-bottom-left-radius: 8px;
  line-height: 18px;
  z-index: 2;
}
.media-title-top {
  display: inline-block;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #9b59b6);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbow-slide 3s linear infinite;
  font-weight: 700;
}
@keyframes rainbow-slide {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes rainbow-slide-3 {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.badge-recommend {
  display: inline-block;
  background: linear-gradient(90deg, #ff0080, #ff8c00, #40e0d0, #ff0080);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbow-slide-3 2s linear infinite;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 4px;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.1);
  filter: drop-shadow(0 0 3px rgba(255, 0, 128, .3));
}
.media-body {
  flex: 1;
  min-width: 0;
  padding-right: 70px; /* 给"开始游戏"按钮留位 */
  position: relative;
  min-height: 60px;
}
.media-title-row { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; overflow: hidden; line-height: 1.4; }
.media-title { font-size: 14px; font-weight: 600; color: #222; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; flex-shrink: 1; min-width: 0; line-height: 1.35; }
.media-date {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #f5f5f5;
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}
.media-tags { flex-shrink: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.media-tag {
  background: #ffc107;
  color: #fff;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
}
.media-tag:nth-child(2) { background: #f44336; }
.media-tag:nth-child(3) { background: #2196f3; }
.media-tip {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.media-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}
.media-cat { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.media-play {
  position: absolute;
  right: 0;
  bottom: 2px;
  border: none;
  width: 64px;
  height: 26px;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
  line-height: 26px;
}

/* ===== Link Grid ===== */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.link-card { display: flex; align-items: center; gap: 10px; background: #f8faf8; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; transition: all .15s; text-decoration: none; color: inherit; }
.link-card:hover { background: #fff; border-color: var(--primary); transform: translateY(-2px); }
.link-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid #eef0f3; display: flex; align-items: center; justify-content: center; }
.link-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-no-img { font-size: 14px; font-weight: 700; color: var(--primary); }
.link-body { flex: 1; min-width: 0; }
.link-title { font-weight: 600; color: var(--primary); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Sort list ===== */
.cat-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.cat-group:last-child { border-bottom: none; }
.cat-group-title { font-size: 16px; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.cat-sub-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-sub { padding: 7px 16px; border-radius: 999px; background: #f0f3fa; color: #4a5673; font-size: 13px; transition: all .15s; }
.cat-sub:hover, .cat-sub.on { background: var(--primary); color: #fff; }

/* ===== Sub filter ===== */
.sub-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 10px; background: #f8faf8; border-radius: 8px; }
.sub-pill { padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--muted-2); font-size: 13px; border: 1px solid var(--border); }
.sub-pill:hover, .sub-pill.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.page-item { padding: 7px 13px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--muted-2); font-size: 13px; }
.page-item:hover { color: var(--primary); border-color: var(--primary); }
.page-item.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item.disabled { color: #c0c6d2; cursor: not-allowed; background: #f7f9fc; }
.page-ellipsis { padding: 7px 6px; color: var(--muted); }

/* ===== Detail ===== */
.detail-wrap { padding-top: 12px; }
.detail-top { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; gap: 18px; box-shadow: var(--shadow); margin-bottom: 14px; flex-wrap: wrap; }
.detail-icon { width: 110px; height: 110px; border-radius: 16px; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { flex: 1; min-width: 240px; }
.detail-title { font-size: 20px; margin-bottom: 8px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-tags .tag { font-size: 12px; padding: 2px 9px; }
.detail-score { font-size: 22px; color: #f39c12; font-weight: 700; margin-bottom: 10px; }
.detail-score span { font-size: 13px; color: var(--muted); font-weight: normal; margin-left: 8px; }
.detail-info { color: var(--muted-2); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-actions { margin-top: 12px; }
.btn-play { display: inline-block; padding: 12px 36px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 999px; font-size: 16px; font-weight: 600; box-shadow: 0 4px 14px rgba(26, 173, 25, .35); transition: transform .15s; }
.btn-play:hover { transform: translateY(-2px); }
.detail-section { background: var(--card); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.detail-section h3 { font-size: 16px; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
.detail-text { color: #444f63; line-height: 1.85; font-size: 14px; word-break: break-word; }
.detail-text p { margin: 0.6em 0; }
.detail-text h1, .detail-text h2, .detail-text h3, .detail-text h4, .detail-text h5, .detail-text h6 { margin: 1em 0 0.5em; color: #333; font-weight: 600; }
.detail-text ul, .detail-text ol { margin: 0.6em 0; padding-left: 1.5em; }
.detail-text li { margin: 0.3em 0; }
.detail-text img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.8em 0; display: block; }
.detail-text video { max-width: 100%; height: auto; border-radius: 6px; margin: 0.8em 0; }
.detail-text iframe { max-width: 100%; border-radius: 6px; margin: 0.8em 0; }
.detail-text a { color: var(--primary); text-decoration: none; }
.detail-text a:hover { text-decoration: underline; }
.detail-text table { width: 100%; border-collapse: collapse; margin: 0.8em 0; }
.detail-text th, .detail-text td { border: 1px solid #ddd; padding: 8px; text-align: left; }
.detail-text th { background: #f5f5f5; }
.detail-text blockquote { border-left: 4px solid var(--primary); padding-left: 1em; margin: 0.8em 0; color: #666; }
.detail-text pre, .detail-text code { background: #f5f5f5; padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.detail-text pre { padding: 0.8em; overflow-x: auto; }

/* ===== Banner 热门推荐滚动 ===== */
.banner-section { background: var(--card); border-radius: var(--radius); padding: 14px 0 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.banner-section .block-head { padding: 0 16px 10px; margin-bottom: 0; }
.banner-scroll { overflow-x: auto; overflow-y: hidden; cursor: grab; -webkit-overflow-scrolling: touch; padding: 0 12px; scrollbar-width: none; }
.banner-scroll::-webkit-scrollbar { display: none; }
.banner-track { display: flex; gap: 10px; padding: 4px 4px 8px; width: max-content; }
.banner-card { flex: 0 0 auto; width: 130px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); text-decoration: none; color: inherit; transition: transform .15s; border: 1px solid #eef0f3; }
.banner-card:hover { transform: translateY(-2px); }
.banner-img { width: 100%; height: 130px; background: linear-gradient(135deg, #f5f7fa, #e8edf3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.banner-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-no-img { font-size: 36px; font-weight: 700; color: var(--primary); }
.banner-info { padding: 6px 8px 8px; }
.banner-title { font-size: 12px; color: #333; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.banner-desc { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 首页统计 ===== */
.stat-section { display: flex; background: var(--card); border-radius: var(--radius); padding: 14px 8px; margin-bottom: 14px; box-shadow: var(--shadow); }
.stat-item { flex: 1; text-align: center; padding: 4px 4px; border-right: 1px solid #eef0f3; }
.stat-item:last-child { border-right: none; }
.stat-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-item b { display: block; font-size: 18px; color: var(--primary); font-weight: 700; }

/* ===== Empty ===== */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); font-size: 14px; }

/* ===== Footer ===== */
.site-footer { background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%); border-top: 2px solid #e3e8f0; padding: 15px 0 80px; margin-top: 16px; font-size: 12px; color: var(--muted-2); }
.stat-bar { display: flex; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; gap: 4px 0; }
.stat-bar span { display: inline-flex; align-items: center; white-space: nowrap; font-size: 12px; flex: 1; justify-content: center; }
.stat-bar b { color: var(--primary); font-size: 14px; margin-left: 3px; }
.copyright { text-align: center; color: var(--muted); font-size: 12px; word-break: break-all; }
.footer-tongji { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 8px; overflow-wrap: break-word; }

/* ===== Bottom Tabbar（对齐参考站） ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex;
  background: #fff;
  box-shadow: 0 -4px 5px rgba(192, 191, 196, .2);
  z-index: 80;
  max-width: 677px;
  margin: 0 auto;
}
.tabbar-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px 0 8px;
  color: #000;
  font-size: 12px;
  transition: color .15s;
}
.tabbar-item .tabbar-icon { font-size: 22px; line-height: 1; margin-bottom: 3px; }
.tabbar-item.on { color: var(--primary); }
.tabbar-item.on .tabbar-icon { transform: translateY(-2px); transition: transform .15s; }

/* ===== Rank Page ===== */
.rank-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rank-tab { padding: 8px 18px; border-radius: 999px; background: #f0f3fa; color: var(--muted-2); font-size: 14px; }
.rank-tab.on { background: var(--primary); color: #fff; }
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--border); transition: background .12s; }
.rank-row:hover { background: #fafafa; }
.rank-num { width: 28px; text-align: center; font-size: 16px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.rank-num.top1 { color: #e74c3c; }
.rank-num.top2 { color: #e67e22; }
.rank-num.top3 { color: #f39c12; }
.rank-icon { width: 50px; height: 50px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.rank-icon img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta { color: var(--muted); font-size: 12px; }
.rank-go { color: var(--primary); font-size: 18px; padding: 0 6px; }

/* ===== My Page ===== */
.my-page { padding-top: 12px; }
.my-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(26, 173, 25, .25);
}
.my-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 10px; }
.my-name { font-size: 18px; font-weight: 700; }
.my-desc { font-size: 13px; opacity: .85; margin-top: 4px; }
.my-section { margin-bottom: 14px; }
.my-empty { text-align: center; color: var(--muted); padding: 24px 12px; font-size: 13px; }
.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.my-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.my-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.my-card-title { font-size: 13px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-card-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 22px; padding: 0; }
.my-notice { color: #444f63; line-height: 1.7; font-size: 14px; }
.my-menu { list-style: none; }
.my-menu li { display: flex; justify-content: space-between; padding: 11px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.my-menu li:last-child { border-bottom: none; }
.my-menu li span:first-child { color: var(--muted); }
.my-menu li span:last-child { font-weight: 600; }
.my-footer-tip { text-align: center; color: var(--muted); font-size: 12px; padding: 14px 0; }

/* 用户卡片 */
.my-user-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(26, 173, 25, .2);
}
.my-user-card.admin-card { background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); box-shadow: 0 4px 14px rgba(44, 62, 80, .25); }
.my-user-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; }
.my-user-info { flex: 1; min-width: 0; }
.my-user-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.my-user-name .admin-badge { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #e74c3c; color: #fff; font-weight: 600; }
.my-user-meta { font-size: 12px; opacity: .85; margin-top: 3px; }
.my-user-actions { flex-shrink: 0; }
.my-user-actions a { color: #fff; font-size: 13px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; margin-left: 6px; }
.my-user-actions a:hover { background: rgba(255,255,255,.18); }

/* 下载次数统计 */
.my-quota { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.my-quota > div { background: #fff; border-radius: var(--radius); padding: 14px 6px; text-align: center; box-shadow: var(--shadow); }
.my-quota-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.my-quota-num.limited { color: #e74c3c; }
.my-quota-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 管理员后台入口 */
.my-admin-entry {
  display: block;
  text-align: center;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  transition: all .15s;
}
.my-admin-entry:hover { background: var(--primary); color: #fff; }

/* 功能菜单列表 */
.my-link-list { list-style: none; }
.my-link-list li { border-bottom: 1px solid var(--border); }
.my-link-list li:last-child { border-bottom: none; }
.my-link-list li a { display: flex; align-items: center; padding: 12px 4px; transition: background .12s; }
.my-link-list li a:hover { background: #fafafa; }
.my-link-list .ic { font-size: 20px; margin-right: 12px; width: 26px; text-align: center; flex-shrink: 0; }
.my-link-list .tx { flex: 1; font-size: 14px; color: #333; }
.my-link-list .tx .sub { font-size: 12px; color: var(--muted); }
.my-link-list .arrow { color: var(--muted); font-size: 18px; flex-shrink: 0; }

/* ===== Lock Page（游戏锁定页） ===== */
.lock-page { padding: 30px 0; }
.lock-card { background: #fff; border-radius: var(--radius); padding: 30px 24px; box-shadow: var(--shadow); text-align: center; max-width: 400px; margin: 0 auto; }
.lock-icon { width: 90px; height: 90px; border-radius: 18px; overflow: hidden; margin: 0 auto 14px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.lock-icon img { width: 100%; height: 100%; object-fit: cover; }
.lock-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; color: #333; }
.lock-msg { background: #fff7e0; border-radius: 10px; padding: 16px 14px; margin-bottom: 20px; }
.lock-emoji { font-size: 36px; display: block; margin-bottom: 6px; }
.lock-msg p { color: #b9770e; font-size: 14px; line-height: 1.6; }
.lock-msg .lock-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.lock-actions { display: flex; flex-direction: column; gap: 10px; }
.lock-btn { display: block; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; transition: all .15s; }
.lock-btn-primary { background: var(--primary); color: #fff; }
.lock-btn-primary:hover { background: var(--primary-dark); }
.lock-btn-vip { background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; }
.lock-btn-vip:hover { opacity: .92; }
.lock-btn-ghost { background: #f5f6f8; color: var(--muted-2); border: 1px solid var(--border); }
.lock-btn-ghost:hover { background: #ececec; }

/* VIP 徽章 */
.vip-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: linear-gradient(135deg, #f39c12, #e67e22); color: #fff; font-size: 11px; font-weight: 700; }

/* ===== Auth Page（登录/注册） ===== */
.auth-page { padding: 20px 0; }
.auth-card { background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); max-width: 380px; margin: 0 auto; }
.auth-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-hint { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.auth-err { background: #fdecea; color: #e74c3c; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; text-align: center; }
.auth-row { margin-bottom: 14px; }
.auth-row label { display: block; font-size: 13px; color: #4a5673; margin-bottom: 6px; font-weight: 600; }
.auth-row input { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; transition: border-color .15s; }
.auth-row input:focus { border-color: var(--primary); }
.auth-btn { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 6px; transition: background .15s; }
.auth-btn:hover { background: var(--primary-dark); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted-2); }
.auth-foot a { color: var(--primary); }
.auth-sep { margin: 0 8px; color: var(--muted); }

/* ===== Search Landing ===== */
.search-landing { padding: 18px 16px; }
.big-search { display: flex; gap: 10px; margin-bottom: 22px; }
.big-search input { flex: 1; padding: 13px 16px; border: 2px solid var(--primary); border-radius: 999px; font-size: 15px; outline: none; }
.big-search button { padding: 0 24px; background: var(--primary); color: #fff; border: none; border-radius: 999px; font-size: 14px; cursor: pointer; }
.hot-block { margin-bottom: 20px; }
.hot-block h3 { font-size: 15px; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
.hot-list { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-item { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #f0f3fa; border-radius: 999px; color: #4a5673; font-size: 13px; }
.hot-item:hover { background: var(--primary); color: #fff; }
.hot-rank { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; background: #c9d3ee; color: #fff; font-size: 12px; font-weight: 700; }
.hot-item:nth-child(1) .hot-rank { background: #e74c3c; }
.hot-item:nth-child(2) .hot-rank { background: #e67e22; }
.hot-item:nth-child(3) .hot-rank { background: #f39c12; }

/* ===== Detail favorite button ===== */
.btn-fav {
  display: inline-block;
  padding: 11px 24px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  margin-left: 12px;
}
.btn-fav.on { background: #fff7e0; color: #f39c12; border-color: #f39c12; }
.btn-link { color: var(--primary); font-size: 14px; }

/* ===== Desktop adaptation（>=800px 保持窄容器，与参考站一致） ===== */
@media screen and (min-width: 800px) {
  .wrap, .tabbar { max-width: 677px; }
  .media-thumb { flex: 0 0 72px; width: 72px; height: 72px; }
  .media-title { font-size: 15px; }
  .media-body { min-height: 72px; }
}

/* ===== Small screens (<360px) tighter grid ===== */
@media (max-width: 360px) {
  .card-grid { gap: 10px 6px; }
  .card-icon { border-radius: 12px; }
  .media-thumb { flex-basis: 52px; width: 52px; height: 52px; margin-right: 8px; }
  .media-title { font-size: 13px; }
  .media-body { padding-right: 60px; min-height: 52px; }
  .media-play { width: 56px; height: 24px; line-height: 24px; font-size: 11px; }
  .header-avatar { flex-basis: 42px; width: 42px; height: 42px; }
  .header-record { padding: 5px 9px; font-size: 12px; }
}

/* ===== Game Play Page ===== */
* { -webkit-tap-highlight-color: transparent; }
.game-play-body { margin: 0; padding: 0; overflow: hidden; background: #000; }

/* 游戏主区域：真正全屏，铺满整个视口 */
.play-main {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  z-index: 1;
}
.play-iframe { width: 100%; height: 100%; border: none; display: block; }

.play-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: #ccc; font-size: 16px; gap: 16px;
}
.play-error .btn-play { padding: 10px 32px; background: var(--primary); color: #fff; border-radius: 20px; text-decoration: none; font-size: 15px; }

/* 顶栏：浮在游戏上方，半透明渐变背景，可显隐 */
.play-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,0));
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 100;
  font-size: 15px;
  box-sizing: border-box;
  transition: opacity .3s ease, transform .3s ease;
}
.play-header.hidden { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.play-back { color: #fff; font-size: 14px; text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 2px; }
.play-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.play-header-right { display: flex; align-items: center; gap: 6px; }
.play-newwin { color: #fff; font-size: 18px; text-decoration: none; line-height: 1; }
.play-chat-toggle {
  background: rgba(255,255,255,.25); border: none; color: #fff;
  font-size: 13px; cursor: pointer; padding: 5px 12px; border-radius: 16px;
  white-space: nowrap; backdrop-filter: blur(4px);
}

/* 聊天悬浮按钮 */
.chat-fab {
  position: fixed; right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff; font-size: 22px;
  border: none; cursor: pointer;
  box-shadow: 0 3px 10px rgba(26, 173, 25, .45);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, opacity .3s;
}
.chat-fab:active { transform: scale(0.9); }

/* 聊天遮罩：半透明黑色 */
.chat-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 94;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.chat-overlay.open { opacity: 1; pointer-events: auto; }

/* 聊天面板：右侧滑出 */
.chat-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 82%;
  max-width: 360px;
  background: #fff;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  z-index: 95;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.chat-panel.open { transform: translateX(0); }

.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--primary);
  font-size: 15px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.chat-close { background: rgba(255,255,255,.2); border: none; font-size: 16px; cursor: pointer; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  -webkit-overflow-scrolling: touch;
  background: #f5f5f5;
  min-height: 0;
}
.chat-empty { text-align: center; color: #bbb; padding: 40px 0; font-size: 13px; }

.chat-msg { margin-bottom: 12px; }
.chat-msg-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.chat-msg-name { font-size: 12px; color: var(--primary); font-weight: 600; }
.chat-msg-time { font-size: 11px; color: #aaa; }
.chat-msg-text {
  font-size: 14px; color: #333; word-break: break-word; line-height: 1.5;
  background: #fff; padding: 8px 12px; border-radius: 4px 12px 12px 12px;
  display: inline-block; max-width: 85%;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.chat-input {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}
.chat-input input {
  flex: 1; padding: 9px 16px;
  border: 1px solid #e0e0e0; border-radius: 22px;
  font-size: 16px; outline: none;
  -webkit-appearance: none;
  background: #f9f9f9;
}
.chat-input input:focus { border-color: var(--primary); background: #fff; }
.chat-input button {
  padding: 9px 20px; background: var(--primary); color: #fff;
  border: none; border-radius: 22px; font-size: 14px; cursor: pointer;
  flex-shrink: 0; font-weight: 500;
}
.chat-input button:disabled { opacity: .5; cursor: not-allowed; }
.chat-login-hint { text-align: center; padding: 12px; font-size: 13px; color: #999; width: 100%; }
.chat-login-hint a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ===== Market App (MOD游戏市场) ===== */
.market-search {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.market-search input {
  flex: 1; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 14px; outline: none;
}
.market-search input:focus { border-color: var(--primary); }
.market-search button {
  padding: 8px 18px; background: var(--primary); color: #fff;
  border: none; border-radius: 20px; font-size: 14px; cursor: pointer;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.market-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px;
  transition: box-shadow .2s;
}
.market-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.market-head { display: flex; gap: 10px; }
.market-icon {
  width: 56px; height: 56px; border-radius: 12px;
  object-fit: cover; background: #eef2f7;
  border: 1px solid var(--border); flex-shrink: 0;
}
.market-icon-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--muted); font-weight: 600;
}
.market-info { flex: 1; min-width: 0; }
.market-name {
  margin: 0; font-size: 16px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.market-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.market-tags {
  margin-top: 8px; display: flex; gap: 6px;
  overflow: hidden; flex-wrap: nowrap;
}
.market-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid #dce4ee; background: #f8fafc; color: #334155;
  white-space: nowrap;
}
.market-desc {
  margin: 10px 0 0; font-size: 13px; color: #374151;
  line-height: 1.45; min-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-actions { margin-top: 10px; }
.market-actions a {
  display: inline-flex; text-decoration: none; height: 32px;
  align-items: center; padding: 0 14px; border-radius: 8px;
  background: #ecfeff; color: var(--primary); font-size: 13px;
}
.market-empty {
  background: #fff; border: 1px dashed #cbd5e1;
  border-radius: 12px; padding: 40px 20px;
  text-align: center; color: var(--muted);
  grid-column: 1/-1;
}

.pager {
  margin-top: 14px; display: flex; gap: 8px;
  justify-content: center; align-items: center;
}
.pager a, .pager span {
  border: 1px solid var(--border); border-radius: 8px;
  height: 34px; padding: 0 14px; display: inline-flex;
  align-items: center; font-size: 14px; text-decoration: none; color: var(--text);
  background: #fff;
}
.pager-info { border: none; background: none; color: var(--muted); }

/* 详情页 */
.market-detail { background: #fff; border-radius: 14px; padding: 16px; }
.market-detail-head { display: flex; gap: 14px; margin-bottom: 16px; }
.market-detail-icon {
  width: 80px; height: 80px; border-radius: 16px;
  object-fit: cover; border: 1px solid var(--border); flex-shrink: 0;
}
.market-detail-info { flex: 1; min-width: 0; }
.market-detail-name { margin: 0 0 6px; font-size: 20px; line-height: 1.3; }
.market-detail-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.market-detail-download { margin: 16px 0; }
.btn-download {
  display: block; text-align: center; padding: 14px;
  background: var(--primary); color: #fff; border-radius: 24px;
  text-decoration: none; font-size: 16px; font-weight: 600;
}
.market-section { margin-top: 20px; }
.market-section h2 { font-size: 16px; margin: 0 0 10px; border-left: 3px solid var(--primary); padding-left: 8px; }
.market-shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.market-shots img {
  width: 200px; height: auto; border-radius: 8px;
  border: 1px solid var(--border); flex-shrink: 0;
  cursor: pointer; transition: transform .2s;
}
.market-shots img.enlarge { width: 100%; }
.market-detail-text { font-size: 14px; line-height: 1.7; color: #374151; word-break: break-word; }
