/* 漫游星盒 — 共享样式 */

:root {
  --bg-base: #070b1f;
  --bg-elevated: #1a2145;
  --bg-card: rgba(29, 37, 74, 0.9);
  --border: rgba(137, 170, 232, 0.26);
  --border-strong: rgba(255, 210, 116, 0.5);
  --text: #f1f4ff;
  --text-muted: #b5c0df;
  --accent: #f2bf5c;
  --accent-hover: #ffd687;
  --accent-dim: rgba(242, 191, 92, 0.18);
  --accent-blue: #6aa8ff;
  --accent-blue-hover: #8fc1ff;
  --silver-line: rgba(208, 219, 245, 0.45);
  --silver-soft: rgba(208, 219, 245, 0.16);
  --success: #4cd2a8;
  --error: #f28397;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 8, 24, 0.45);
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shell-pad-x: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg-base);
  /* 多层星云：蓝、青紫、暖尘、远紫外缘，叠出纵深 */
  background-image:
    radial-gradient(ellipse 140% 100% at 50% -30%, rgba(55, 110, 220, 0.28), transparent 58%),
    radial-gradient(ellipse 80% 60% at 95% 15%, rgba(100, 70, 200, 0.14), transparent 52%),
    radial-gradient(ellipse 65% 55% at 5% 75%, rgba(40, 160, 190, 0.12), transparent 48%),
    radial-gradient(ellipse 50% 40% at 80% 85%, rgba(200, 120, 180, 0.08), transparent 45%),
    radial-gradient(ellipse 45% 35% at 15% 25%, rgba(255, 200, 140, 0.06), transparent 42%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(20, 50, 120, 0.35), transparent 55%);
  line-height: 1.5;
  position: relative;
}

button,
input,
select,
textarea {
  font-family: var(--font);
}

/* 星空 + 流星（不影响点击） */
.sky-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star-field {
  position: absolute;
  inset: 0;
}

.star-field--far {
  z-index: 1;
  opacity: 0.88;
  filter: blur(0.25px);
}

.star-field--mid {
  z-index: 2;
  opacity: 0.95;
}

.star-field--near {
  z-index: 3;
  opacity: 1;
}

.meteor-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* 定点恒星：远层更小更淡，闪烁更慢 */
.star {
  position: absolute;
  border-radius: 50%;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.star--far {
  width: 1px;
  height: 1px;
  animation-name: twinkle-far;
}

.star--far.star--fat {
  width: 2px;
  height: 2px;
}

.star--mid {
  width: 2px;
  height: 2px;
  animation-name: twinkle-mid;
}

.star--mid.star--fat {
  width: 3px;
  height: 3px;
}

.star--near {
  width: 2px;
  height: 2px;
  animation-name: twinkle-near;
}

.star--near.star--fat {
  width: 3px;
  height: 3px;
}

/* 色相：冰蓝、青、金、紫、白 */
.star.tone-ice {
  background: #c4dcff;
  box-shadow: 0 0 3px 1px rgba(160, 205, 255, 0.55);
}

.star.tone-cyan {
  background: #9cf0ff;
  box-shadow: 0 0 4px 1px rgba(120, 230, 255, 0.45);
}

.star.tone-gold {
  background: #ffe6b8;
  box-shadow: 0 0 3px 1px rgba(255, 220, 160, 0.4);
}

.star.tone-violet {
  background: #d4c6ff;
  box-shadow: 0 0 4px 1px rgba(200, 180, 255, 0.45);
}

.star.tone-white {
  background: #f5f9ff;
  box-shadow: 0 0 4px 1px rgba(230, 240, 255, 0.65);
}

.star.tone-rose {
  background: #ffc8e0;
  box-shadow: 0 0 3px 1px rgba(255, 180, 210, 0.35);
}

@keyframes twinkle-far {
  0%,
  100% {
    opacity: 0.12;
    transform: scale(1);
  }
  35% {
    opacity: 0.55;
    transform: scale(1.15);
  }
  65% {
    opacity: 0.35;
    transform: scale(0.95);
  }
}

@keyframes twinkle-mid {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  40% {
    opacity: 0.95;
    transform: scale(1.2);
  }
  70% {
    opacity: 0.45;
    transform: scale(1);
  }
}

@keyframes twinkle-near {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  25% {
    opacity: 1;
    transform: scale(1.4);
  }
  55% {
    opacity: 0.6;
    transform: scale(1.08);
  }
}

.body-inner {
  position: relative;
  z-index: 1;
}

.meteor {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f2f8ff;
  opacity: 0;
  box-shadow:
    0 0 10px 3px rgba(160, 210, 255, 0.85),
    -50px 50px 14px -1px rgba(100, 170, 255, 0.35),
    -100px 100px 24px -4px rgba(80, 140, 230, 0.12);
  animation: meteor-streak 3.2s linear infinite;
}

@keyframes meteor-streak {
  0% {
    opacity: 0;
    transform: translate3d(40px, -40px, 0) scale(1);
  }
  6% {
    opacity: 1;
  }
  55% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(-340px, 340px, 0) scale(0.85);
  }
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

/* —— 布局 —— */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--shell-pad-x) 48px;
}

/* 与首页共用同一顶栏轨道，避免切换页面时错位 */
.shell-header-only {
  padding-bottom: 0;
}

.shell-header-only .site-header {
  margin-bottom: 0;
}

/* —— 顶栏 —— */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 32px;
  background:
    linear-gradient(145deg, rgba(40, 50, 95, 0.9), rgba(22, 29, 58, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--silver-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-brand {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.75rem;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: rgba(233, 242, 255, 0.12);
}

.nav a.is-active {
  color: #241b06;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  border-color: rgba(255, 224, 157, 0.7);
}

/* —— 卡片 / 面板 —— */
.panel {
  background:
    linear-gradient(160deg, rgba(40, 52, 97, 0.9), rgba(24, 34, 66, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--silver-soft);
  overflow: hidden;
}

.panel-hd {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #dbe8ff;
}

.panel-bd {
  padding: 20px;
}

.panel-bd--no-padding {
  padding: 0;
}

/* —— 首页网格 —— */
.layout-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.site-info-footer {
  margin-top: 28px;
  padding: 8px 0 2px;
}

.site-info-footer-inner {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

.site-info-line {
  margin: 0;
}

.hero-banner {
  margin-bottom: 22px;
}

.hero-banner-inner {
  min-height: 220px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(30, 45, 90, 0.28), rgba(16, 27, 56, 0.28)),
    url("/images/indexImages/StarSky.jpg") center/cover no-repeat;
  padding: clamp(18px, 4vw, 34px);
  display: flex;
  align-items: end;
}

.hero-banner-content {
  max-width: 800px;
}

.my-info-banner-inner {
  min-height: 220px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(30, 45, 90, 0.32), rgba(16, 27, 56, 0.32)),
    url("/images/myInfoImages/Sky.jpg") center/cover no-repeat;
  padding: clamp(18px, 4vw, 28px);
}

.my-info-panel .profile-subtitle,
.my-info-panel .profile-stat-label {
  color: rgba(227, 236, 255, 0.86);
}

.hero-banner-content h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.hero-banner-content p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.hero-search {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.hero-search input {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(24, 36, 70, 0.9);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.hero-search input:focus {
  outline: none;
  border-color: rgba(255, 215, 132, 0.76);
  box-shadow: 0 0 0 3px rgba(242, 191, 92, 0.16);
}

@media (min-width: 960px) {
  .layout-home {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-height: min(560px, 70vh);
  overflow-y: auto;
  padding: 4px 2px 8px 0;
}

.game-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, #314273, #202d56);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
}

.game-tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(5, 14, 36, 0.5);
}

.game-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.game-tile-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #3a4f88, #243462);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-tile-placeholder {
  font-size: 2rem;
  opacity: 0.35;
}

.game-tile-meta {
  padding: 12px 14px;
}

.game-tile-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— 侧栏 —— */
.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-block {
  text-align: center;
  padding: 24px 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(92, 157, 255, 0.32);
  display: grid;
  place-items: stretch;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

/* 字母与头像图叠在同一格，避免 flex 下隐藏 img 仍占位导致字符偏移 */
.profile-avatar-letter,
.profile-avatar > img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

.profile-avatar > img[hidden] {
  display: none !important;
}

.profile-avatar > img:not([hidden]) {
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-avatar--editable {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.profile-avatar--editable input[type="file"] {
  display: none;
}

.profile-avatar-letter {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
}

.profile-name {
  font-weight: 600;
  font-size: 1rem;
}

.profile-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.profile-block .profile-actions .profile-action-link,
.profile-block .profile-actions .profile-action-btn {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
  flex: 0 0 124px;
}

.profile-action-link,
.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  font-family: var(--font);
  letter-spacing: 0.01em;
  color: var(--text);
  background: linear-gradient(145deg, rgba(63, 83, 148, 0.82), rgba(36, 50, 96, 0.9));
  box-shadow: inset 0 1px 0 rgba(235, 243, 255, 0.12);
  transition: border-color 0.15s, background 0.15s, transform 0.15s, color 0.15s;
}

.profile-action-link,
.profile-action-btn,
.profile-settings .profile-action-link,
.profile-settings .profile-action-btn {
  min-width: 118px;
}

.profile-action-link:hover,
.profile-action-btn:hover {
  border-color: rgba(255, 224, 157, 0.7);
  background: linear-gradient(145deg, rgba(91, 113, 181, 0.9), rgba(49, 66, 124, 0.95));
  color: #fff8ea;
  transform: translateY(-1px);
}

.profile-action-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

#logoutBtn {
  min-width: 118px;
  padding-left: 14px;
  padding-right: 14px;
  font-family: var(--font) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.game-list li {
  margin: 0;
}

.game-list-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.game-list-link:hover {
  background: rgba(234, 243, 255, 0.12);
  border-color: var(--border);
}

.game-list-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.game-list-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-list-ico span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.game-list-txt {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* —— 上传页 —— */
.upload-body .upload-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  /* 与 .shell 相同的水平内边距，顶栏与首页像素级对齐 */
  padding: 32px var(--shell-pad-x) 56px;
  min-height: calc(100vh - 120px);
  align-items: flex-start;
}

.upload-card {
  width: 100%;
  max-width: 440px;
  background:
    linear-gradient(158deg, rgba(30, 46, 78, 0.9), rgba(20, 33, 58, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--silver-soft);
  padding: 32px clamp(20px, 5vw, 36px);
}

.upload-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.upload-lead {
  margin: 0 0 28px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(24, 36, 70, 0.86);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 215, 132, 0.76);
  box-shadow: 0 0 0 3px rgba(242, 191, 92, 0.16);
}

.field-hint {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 自定义文件区 */
.dropzone {
  position: relative;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  background: rgba(17, 29, 54, 0.8);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(103, 167, 255, 0.18);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.dropzone span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.dropzone .file-name {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--accent);
  word-break: break-all;
}

.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  color: #2f220a;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffe1a1, #f4bf55);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.progress-wrap {
  margin-top: 20px;
  display: none;
}

.progress-wrap.is-visible {
  display: block;
}

.progress-track {
  height: 6px;
  background: rgba(17, 29, 54, 0.8);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #8eb8ff);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.progress-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: none;
}

.alert.is-visible {
  display: block;
}

.alert--ok {
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.35);
  color: var(--success);
}

.alert--err {
  background: rgba(240, 113, 120, 0.1);
  border: 1px solid rgba(240, 113, 120, 0.35);
  color: var(--error);
}

.upload-footer {
  margin-top: 24px;
  text-align: center;
}

.upload-footer a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.upload-footer a:hover {
  color: var(--accent);
}

/* —— 登录页 —— */
.auth-card {
  max-width: 500px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab {
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 40px;
  background: linear-gradient(145deg, rgba(54, 71, 129, 0.72), rgba(33, 46, 89, 0.86));
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
}

.auth-tab.is-active {
  color: #2f220a;
  border-color: rgba(255, 224, 157, 0.7);
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.field input[type="password"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(24, 36, 70, 0.86);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input[type="password"]:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 215, 132, 0.76);
  box-shadow: 0 0 0 3px rgba(242, 191, 92, 0.16);
}

/* —— 个人主页 —— */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-avatar--lg {
  width: 72px;
  height: 72px;
  margin: 0;
  font-size: 1.5rem;
}

.profile-title {
  margin: 0;
  font-size: 1.3rem;
}

.profile-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.profile-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.profile-stat-num {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.profile-stat-label {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-settings-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.profile-game-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  display: flex;
  gap: 12px;
}

a.profile-game-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

a.profile-game-card-link:hover {
  border-color: rgba(255, 224, 157, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.game-edit-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.game-edit-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.game-edit-upload-col {
  margin-top: 0;
}

.game-edit-inline-msg {
  margin-top: 6px;
  min-height: 1.25em;
}

.profile-action-btn--danger {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffb4b4;
  background: linear-gradient(145deg, rgba(120, 40, 50, 0.5), rgba(60, 24, 32, 0.72));
}

.profile-action-btn--danger:hover {
  border-color: rgba(255, 160, 160, 0.65);
  color: #ffd0d0;
}

.game-detail-download--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.follow-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.follow-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.follow-user-item:hover {
  border-color: rgba(255, 224, 157, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.follow-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(92, 157, 255, 0.32);
  background: var(--accent-dim);
  display: grid;
  place-items: center;
}

.follow-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.follow-user-main {
  min-width: 0;
}

.follow-user-main h3 {
  margin: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.follow-user-main p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.profile-game-item--compact {
  padding: 8px;
  display: block;
}

.profile-game-cover {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-game-item--compact .profile-game-cover {
  width: 100%;
  min-width: 0;
}

.profile-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-game-main {
  min-width: 0;
  flex: 1;
}

.profile-game-main--compact {
  margin-top: 8px;
}

.profile-game-main h3 {
  margin: 2px 0 6px;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-game-main h3 a {
  color: var(--text);
}

.profile-game-main h3 a:hover {
  color: var(--accent-hover);
}

.profile-game-main p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.profile-game-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.game-detail-media {
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr 1fr;
}

.game-detail-overview {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.game-detail-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-author-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(92, 157, 255, 0.32);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.game-author-avatar--image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.game-author-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.game-author-name {
  color: var(--text);
  min-width: 0;
  font-weight: 500;
}

.game-author-name a {
  color: inherit;
  text-decoration: none;
}

.game-author-name a:hover {
  text-decoration: underline;
}

.game-author-date {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.profile-stats--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.game-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.game-action-row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-action-full {
  width: 100%;
}

.game-detail-video,
.game-detail-cover {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-game-item {
    flex-direction: column;
  }

  .profile-game-cover {
    width: 100%;
  }

  .game-detail-media {
    grid-template-columns: 1fr;
  }

  .game-detail-overview {
    grid-template-columns: 1fr;
  }

  .profile-settings {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-settings-left {
    width: 100%;
  }

  .profile-settings .profile-action-btn {
    width: 100%;
  }

  .game-edit-upload-grid {
    grid-template-columns: 1fr;
  }
}

/* 滚动条 */
.games-grid::-webkit-scrollbar,
.game-list::-webkit-scrollbar {
  width: 6px;
}
.games-grid::-webkit-scrollbar-track,
.game-list::-webkit-scrollbar-track {
  background: transparent;
}
.games-grid::-webkit-scrollbar-thumb,
.game-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
