/* 游戏中心 · 主页样式 */
:root {
  --bg: #0b0e14;
  --bg-soft: #121722;
  --card: #161c29;
  --card-border: #232c3f;
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --accent-default: #5b9bff;
  --radius: 16px;
}

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

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 背景光效 */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(91, 155, 255, 0.14), transparent 60%),
    radial-gradient(800px 480px at 90% 0%, rgba(255, 111, 165, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 50% 115%, rgba(63, 210, 199, 0.10), transparent 60%),
    linear-gradient(180deg, #0b0e14 0%, #0d1119 100%);
}
.bg-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5));
}

/* 头部 */
.site-header {
  padding: 40px clamp(20px, 6vw, 72px) 8px;
}
.brand { display: flex; align-items: center; gap: 18px; }
.logo {
  font-size: 44px;
  filter: drop-shadow(0 4px 18px rgba(91, 155, 255, 0.45));
}
.brand h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.06em;
  background: linear-gradient(92deg, #e8ecf4 15%, #7fb2ff 55%, #3fd2c7 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { color: var(--text-dim); margin-top: 6px; font-size: 14px; letter-spacing: 0.02em; }

/* 主体 */
main { flex: 1; padding: 22px clamp(20px, 6vw, 72px) 40px; }

.recent-section { margin-bottom: 18px; }
.recent-section h2 {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.recent-info { font-size: 13px; color: #71809a; }
.hidden { display: none !important; }

/* 游戏卡片网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  --accent: var(--accent-default);
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  outline: none;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d1220;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.card:hover .card-cover img { transform: scale(1.045); }
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0) 55%, rgba(11, 14, 20, 0.72) 100%);
}
.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(10, 14, 22, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.card-play::before {
  content: "";
  display: block;
  margin-left: 5px;
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}
.card:hover .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.badge-recent {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0b0e14;
  font-weight: 700;
  background: linear-gradient(92deg, var(--accent), #ffffff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.card-sub { font-size: 12px; color: var(--text-dim); margin-top: -4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  color: color-mix(in srgb, var(--accent) 80%, #ffffff);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 2px 9px;
  border-radius: 999px;
}
.card-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
  flex: 1;
}
.card-meta { font-size: 12px; color: #71809a; display: flex; justify-content: space-between; }

/* 页脚 */
.site-footer {
  padding: 18px clamp(20px, 6vw, 72px) 26px;
  color: #5e6a80;
  font-size: 12.5px;
}

/* ===== 游戏播放层 ===== */
.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
}
.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  display: block;
}

.hoverzone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 3;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(5, 8, 14, 0.92) 0%, rgba(5, 8, 14, 0.78) 70%, transparent 100%);
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.topbar.faded {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.btn-back {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease;
  white-space: nowrap;
}
.btn-back:hover { background: rgba(255, 255, 255, 0.24); }
.player-title {
  flex: 1;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.04em;
}
.btn-newtab {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.btn-newtab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .logo { font-size: 34px; }
}

/* 语言切换按钮 */
.btn-lang {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--line, #2a3350);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-lang:hover { border-color: var(--accent, #5b9bff); }
