/* ============================================================
   霓虹游戏港 - 游戏小元素装饰层（纯追加，不影响现有布局）
   ============================================================ */

/* ---------- 背景漂浮像素物件 ---------- */
.ge-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ge-bg .ge-sprite {
  position: absolute;
  display: block;
  filter: drop-shadow(0 0 8px rgba(var(--neon-cyan-rgb), 0.8));
  animation-name: ge-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.ge-bg .ge-sprite svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes ge-float {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-26px) rotate(9deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* ---------- 板块标题像素图标 ---------- */
.ge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 7px rgba(var(--neon-magenta-rgb), 0.55));
  animation: ge-chip-pop 0.4s steps(3) both;
}
.ge-chip svg {
  width: 22px;
  height: 22px;
  display: block;
}
.section-title:has(.ge-chip)::before {
  content: none;
}
@keyframes ge-chip-pop {
  from { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ---------- 游戏卡片小元素 ---------- */
.ge-card .game-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.16) 46%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.55s ease;
}
.ge-card:hover .game-cover::after {
  transform: translateX(130%);
}

.ge-cover-icon {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 2;
  width: 18px;
  height: 18px;
  color: var(--neon-magenta);
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(var(--neon-magenta-rgb), 0.5));
  transition: opacity 0.2s, transform 0.2s;
}
.ge-cover-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ge-card:hover .ge-cover-icon {
  opacity: 1;
  transform: scale(1.18);
}

.ge-coin-pop {
  position: absolute;
  right: 14px;
  top: 10px;
  z-index: 3;
  width: 16px;
  height: 16px;
  color: var(--neon-yellow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.6);
}
.ge-coin-pop svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 6px rgba(var(--neon-yellow-rgb), 0.7));
}
.ge-card:hover .ge-coin-pop {
  animation: ge-coin-pop 0.6s steps(5) both;
}
@keyframes ge-coin-pop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.5) rotate(-20deg); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-24px) scale(1.05) rotate(25deg); }
}

.ge-badge-hot {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(180deg, #ff5c7a, #c2284a);
  border: 1px solid rgba(255, 92, 122, 0.65);
  padding: 3px 7px;
  box-shadow: 0 0 12px rgba(255, 92, 122, 0.4);
  animation: ge-blink 1.6s steps(2) infinite;
}
@keyframes ge-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* 弱动画偏好：关闭装饰动画 */
@media (prefers-reduced-motion: reduce) {
  .ge-bg .ge-sprite,
  .ge-chip,
  .ge-card:hover .ge-coin-pop,
  .ge-badge-hot {
    animation: none !important;
  }
  .ge-card .game-cover::after {
    display: none;
  }
}

/* ============================================================
   全局滚动条 - 霓虹风格（跟随站点主题变色）
   ============================================================ */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) var(--bg);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta));
  border-radius: 8px;
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px rgba(var(--neon-cyan-rgb), 0.45);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(var(--neon-cyan-rgb), 0.85);
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}
/* 后台浅色元素内部（如代码块）也统一 */
.admin-shell ::-webkit-scrollbar-track {
  background: var(--adm-bg);
}

/* ============================================================
   个人主页 - 紧凑布局（板块大小调整）
   ============================================================ */
.profile-head {
  padding: 20px 24px;
  margin-bottom: 18px;
}
.profile-panels {
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}
.profile-panels .pixel-card.panel {
  padding: 16px 18px;
  min-width: 0;
}
/* 长内容板块：通栏显示 + 内部滚动，避免页面被拉得过长 */
.profile-panels .pixel-card.panel:has(#dl-history),
.profile-panels .pixel-card.panel:has(#view-history),
.profile-panels .pixel-card.panel:has(#points-center),
.profile-panels .pixel-card.panel:has(#achievement-list),
.profile-panels .pixel-card.panel:has(#my-edit-requests),
.profile-panels .pixel-card.panel:has(#withdraw-panel),
.profile-panels .pixel-card.panel:has(#points-rank) {
  grid-column: 1 / -1;
}
#dl-history,
#view-history,
#achievement-list,
#my-edit-requests,
#withdraw-panel {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
/* 猫屎榜：与上下板块同宽（通栏），内部榜单从左到右三列 */
#points-rank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 16px;
  align-items: center;
}
#points-rank .pr-row {
  min-width: 0;
}
/* 手机端：长列表限高略低，保持单列原布局 */
@media (max-width: 640px) {
  #dl-history,
  #view-history,
  #achievement-list,
  #my-edit-requests,
  #withdraw-panel {
    max-height: 260px;
  }
  #points-rank {
    grid-template-columns: 1fr;
  }
}
