:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --accent-color: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* 游戏网格布局 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* 1. 卡片基础容器 */
.game-card {
  position: relative;
  overflow: hidden; /* 防止图片放大时溢出卡片边缘 */
  border-radius: 8px;
  background: #1e293b;
}

/* 2. 图片统一裁切与自适应 */
.game-card img {
  width: 100%;
  height: 150px; /* 统一卡片高度，你可以根据喜好调整大小 */
  object-fit: cover; /* 核心：自动等比例缩放并裁剪，绝不拉伸变形 */
  object-position: center; /* 始终居中显示图片核心区域 */
  display: block;
  transition: transform 0.3s ease;
}



.game-info {
  padding: 15px;
}

.game-title a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
}

.game-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.score {
  color: #f59e0b;
  font-weight: bold;
}

/* 文章详情页样式 */
.post-detail {
  max-width: 800px;
  margin: 0 auto;
}

.post-cover img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}

.post-header h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

/* 游戏属性参数卡片 */
.game-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  background: var(--card-bg);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.spec-item .value {
  font-weight: bold;
  color: var(--text-main);
}

/* 正文排版 */
.post-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-content h2 {
  color: var(--accent-color);
  border-bottom: 1px solid #334155;
  padding-bottom: 8px;
  margin-top: 30px;
}

.post-content ul {
  padding-left: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

/* 让卡片本身成为定位基准，同时不要加 overflow: hidden */
.game-card {
  position: relative;
}

/* 悬浮预览框：完全覆盖当前卡片 */
.preview-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: rgba(30, 41, 59, 0.95); /* 深色带一点点透明 */
  box-sizing: border-box; /* 保证 padding 不挤爆卡片 */
  border-radius: 10px;
  
  /* 动画与显示控制 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
  z-index: 10; /* 只要高于卡片内的图片和文字即可 */
}

/* 鼠标悬停卡片时显示 */
.game-card:hover .preview-box {
  opacity: 1;
  visibility: visible;
}

/* 预览框布局调节 */
.preview-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 1. 标题样式 */
.preview-title {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: #f8fafc;
  line-height: 1.3;
}

/* 2 & 3. Tag 胶囊标签 */
.preview-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.tag-platform {
  background: #0284c7; /* 蓝灰背景 */
  color: #ffffff;
}

.tag-status {
  background: #10b981; /* 绿色背景 */
  color: #ffffff;
}

/* 4 & 5. 时长与星级信息栏 */
.preview-details {
  background: #0f172a;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.detail-item .label {
  color: #94a3b8;
}

.detail-item .value {
  color: #f8fafc;
  font-weight: 600;
}

.detail-item .score {
  color: #f59e0b;
}

/* 保证超链接样式正常 */
.card-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* 1. 未访问过的链接颜色 */
a:link {
  color: #e3e3e8; /* 经典白色 */
  text-decoration: none; /* 可选：去除下划线 */
}

/* 2. 已访问过的链接颜色 */
a:visited {
  color: #e3e3e8; /* 经典白色 */
}

/* 3. 鼠标悬停（移上去）时的颜色 */
a:hover {
  color: #d6df1b; /* 变成红色 */
  text-decoration: underline; /* 移上去时显示下划线 */
}

/* 4. 鼠标点击按住不放时的颜色 */
a:active {
  color: #006621; /* 变成绿色 */
}

