/* =========================================================
   小亚的小游戏站 · 公共样式
   ========================================================= */

:root {
  --bg: #0d1310;
  --bg-soft: #101813;
  --surface: #161f19;
  --surface-2: #1c2720;
  --surface-3: #24312a;
  --line: rgba(255, 255, 255, 0.065);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f2f4ee;
  --text-soft: #c4cec3;
  --muted: #8c998e;
  --muted-2: #6e7b70;
  --accent: #a8cf9b;
  --accent-strong: #8fc17f;
  --accent-ink: #14200f;
  --accent-dim: rgba(168, 207, 155, 0.12);
  --warm: #e8bd85;
  --danger: #e29a87;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.18);
  --content-max: 760px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(900px 620px at 12% -12%, rgba(132, 176, 119, 0.13), transparent 62%),
    radial-gradient(720px 520px at 108% 4%, rgba(126, 150, 118, 0.055), transparent 60%),
    var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(168, 207, 155, 0.26);
}

[hidden] {
  display: none !important;
}

/* ---------- 布局 ---------- */

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 19, 16, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--content-max);
  height: 58px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--text-soft);
}

.brand .dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 207, 155, 0.1);
}

.brand span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.top-link {
  flex: 0 0 auto;
  padding: 7px 2px;
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.top-link:hover {
  color: var(--text);
}

.topbar .back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 2px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.topbar .back-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* ---------- 个人主页 ---------- */

.hero {
  padding: 24px 0 2px;
}

.hero-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 5px rgba(168, 207, 155, 0.055),
    0 12px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  background: var(--surface-2);
}

.hero-id {
  min-width: 0;
}

.hero-name {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--muted);
}

.hero-sub .sep {
  margin: 0 5px;
  color: var(--muted-2);
}

.hero-bio {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
  line-height: 1;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip svg {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 49px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.15s ease,
    opacity 0.2s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(120, 168, 108, 0.16);
}

.btn-primary:hover {
  background: #b5d9a9;
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.19);
}

.btn[disabled] {
  cursor: default;
  opacity: 0.52;
  transform: none;
}

.btn[disabled]:hover {
  background: rgba(255, 255, 255, 0.025);
}

.divider {
  height: 1px;
  margin: 28px 0 22px;
  background: var(--line);
}

/* ---------- 游戏列表 ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-count {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 14px -20px 0;
  padding: 2px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  height: 33px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.filter:hover {
  color: var(--text-soft);
  border-color: var(--line-strong);
}

.filter.is-active {
  color: var(--accent);
  background: rgba(168, 207, 155, 0.1);
  border-color: rgba(168, 207, 155, 0.42);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.game-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
  animation: card-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.game-card:hover {
  z-index: 1;
  transform: translateY(-3px);
  background: #19231d;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.game-card:active {
  transform: scale(0.988);
}

.game-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 11px;
  isolation: isolate;
}

.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: inherit;
  pointer-events: none;
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.game-card:hover .game-cover img {
  transform: scale(1.035);
}

.game-card-body {
  padding: 9px 6px 5px;
}

.game-title {
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.game-desc {
  margin-top: 3px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.genre::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--genre-color, var(--accent));
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rating svg {
  width: 11px;
  height: 11px;
}

.rating.is-empty {
  color: var(--muted);
  font-weight: 600;
}

/* 加载骨架 */
.skeleton-card {
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #1a241d;
  border-radius: 9px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.045) 42%,
    transparent 64%
  );
  transform: translateX(-100%);
  animation: skeleton-sweep 1.5s ease-in-out infinite;
}

.skeleton-cover {
  aspect-ratio: 16 / 10;
  border-radius: 11px;
}

.skeleton-line {
  height: 10px;
  margin: 11px 6px 0;
  border-radius: 5px;
}

.skeleton-line.short {
  width: 55%;
  height: 8px;
  margin-top: 7px;
  opacity: 0.7;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 52px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-state .empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 50%;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 700;
}

.empty-state p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */

.site-footer {
  padding: 46px 20px 38px;
  text-align: center;
}

.site-footer p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-2);
}

.site-footer .footer-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 6px 2px;
  background: var(--muted-2);
  border-radius: 50%;
}

/* ---------- 联系弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 8, 5, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: fade-in 0.22s ease both;
}

.modal-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 24px;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(168, 207, 155, 0.09), transparent 70%),
    #1a241e;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--text);
}

.modal-person {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 34px;
}

.modal-avatar {
  width: 50px;
  height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  object-fit: cover;
}

.modal-person h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.modal-person > div {
  flex: 1 1 auto;
  min-width: 0;
}

.modal-person p {
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.modal-note {
  margin-top: 19px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-soft);
}

.contact-links {
  display: grid;
  gap: 9px;
  margin-top: 19px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 54px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.058);
  border-color: var(--line-strong);
}

.contact-link-label {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted);
}

.contact-link-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-soft);
}

.contact-link-value span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contact-link-value svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.contact-empty {
  margin-top: 18px;
  padding: 17px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.modal-tip {
  margin-top: 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------- 游戏详情 ---------- */

.detail-main {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 6px 20px 104px;
}

.detail-loading {
  padding-top: 6px;
}

.detail-skeleton-cover {
  aspect-ratio: 16 / 9.6;
  border-radius: var(--radius-xl);
}

.detail-skeleton-title {
  width: 56%;
  height: 30px;
  margin-top: 26px;
  border-radius: 9px;
}

.detail-skeleton-line {
  width: 84%;
  height: 13px;
  margin-top: 14px;
}

.detail-skeleton-line.short {
  width: 48%;
  margin-top: 10px;
}

.detail-skeleton-stats {
  height: 78px;
  margin-top: 26px;
  border-radius: var(--radius);
}

#games {
  scroll-margin-top: 72px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9.6;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-head {
  padding-top: 22px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.pill-genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  color: var(--pill-color, var(--accent));
  background: var(--pill-bg, rgba(168, 207, 155, 0.1));
  border: 1px solid var(--pill-border, rgba(168, 207, 155, 0.25));
  border-radius: 999px;
}

.detail-title {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.detail-lede {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  position: relative;
  padding: 14px 8px 13px;
  text-align: center;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 1px;
  background: var(--line);
}

.stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-value svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.stat-value.is-accent {
  color: var(--accent);
}

.stat-label {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.detail-play {
  width: 100%;
  margin-top: 18px;
  min-height: 53px;
  font-size: 14.5px;
}

.play-hint {
  margin-top: 11px;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  color: var(--muted-2);
}

.detail-panel {
  margin-top: 17px;
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.005em;
}

.panel-title::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(168, 207, 155, 0.08);
}

.prose {
  margin-top: 13px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-soft);
}

.prose p + p {
  margin-top: 10px;
}

.prose ul {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.prose li {
  position: relative;
  padding-left: 16px;
}

.prose li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 2px;
  width: 4px;
  height: 4px;
  background: var(--accent-strong);
  border-radius: 50%;
  opacity: 0.8;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.info-item {
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.info-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}

.info-value {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.related {
  margin-top: 30px;
}

.related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.related-head h2 {
  font-size: 16px;
  font-weight: 750;
}

.related-head a {
  font-size: 11px;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.sticky-play {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: block;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(13, 19, 16, 0.86);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sticky-play.is-visible {
  transform: translateY(0);
}

.sticky-play .btn {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.detail-empty {
  padding: 80px 20px;
  text-align: center;
}

.detail-empty h1 {
  font-size: 22px;
  font-weight: 800;
}

.detail-empty p {
  margin: 8px 0 22px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 游戏启动页 ---------- */

body.play-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #090e0b;
}

.play-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.inline-player {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  background: #090e0b;
}

body.has-inline-player {
  overflow: hidden;
}

.inline-player .play-stage {
  flex: 1 1 auto;
}

.play-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  background: #0d1410;
  border-bottom: 1px solid var(--line);
}

.play-bar .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.play-bar .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.play-bar .icon-btn svg {
  width: 16px;
  height: 16px;
}

.play-bar-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.play-stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  background: #0a0f0c;
}

.play-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0f0c;
}

.play-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #0a0f0c;
  transition: opacity 0.35s ease;
}

.play-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 27px;
  height: 27px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.play-loader p {
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.play-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  background: #0a0f0c;
}

.play-error h2 {
  font-size: 17px;
  font-weight: 750;
}

.play-error p {
  max-width: 320px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.play-error .btn {
  margin-top: 20px;
  min-height: 44px;
  font-size: 12.5px;
}

.play-stage:fullscreen,
.play-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}

.fullscreen-exit {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 4;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(242, 244, 238, 0.85);
  background: rgba(10, 15, 12, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease both;
}

.fullscreen-exit:hover {
  background: rgba(10, 15, 12, 0.82);
}

/* ---------- 通用动画 ---------- */

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeleton-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ---------- 响应式 ---------- */

@media (min-width: 620px) {
  .wrap {
    padding: 0 26px;
  }

  .topbar-inner {
    padding: 0 26px;
  }

  .filters {
    margin-right: -26px;
    margin-left: -26px;
    padding-right: 26px;
    padding-left: 26px;
  }

  .game-title {
    font-size: 15px;
  }

  .game-desc {
    font-size: 12px;
  }

  .hero-name {
    font-size: 33px;
  }

  .hero-sub {
    font-size: 12.5px;
  }

  .avatar {
    width: 94px;
    height: 94px;
  }

  .detail-main {
    padding: 10px 26px 70px;
  }

  .detail-title {
    font-size: 34px;
  }

  .detail-panel {
    padding: 24px;
  }

  .modal {
    align-items: center;
  }
}

@media (min-width: 760px) {
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .hero-actions {
    max-width: 390px;
  }

  .game-card {
    padding: 8px;
  }

  .game-card-body {
    padding: 10px 7px 6px;
  }
}

@media (min-width: 900px) {
  .sticky-play {
    display: none;
  }
}

@media (min-width: 1100px) {
  :root {
    --content-max: 1000px;
  }

  .hero {
    padding-top: 34px;
  }

  .games-grid {
    gap: 16px;
  }

  .hero-head {
    gap: 22px;
  }

  .avatar {
    width: 102px;
    height: 102px;
  }

  .hero-name {
    font-size: 36px;
  }
}

@media (max-width: 380px) {
  .hero-head {
    gap: 14px;
  }

  .avatar {
    width: 76px;
    height: 76px;
  }

  .hero-name {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 11.5px;
  }

  .hero-bio {
    font-size: 13px;
  }

  .games-grid {
    gap: 10px;
  }

  .game-card {
    padding: 6px;
  }

  .game-card-body {
    padding: 8px 5px 4px;
  }

  .game-title {
    font-size: 13.5px;
  }

  .game-desc {
    font-size: 10.5px;
  }

  .stat-value {
    font-size: 15px;
  }

  .detail-title {
    font-size: 26px;
  }
}

@media (max-width: 370px) {
  .hero-sub .sep {
    display: none;
  }

  .hero-sub #profileTagline {
    display: block;
    margin-top: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
