/* 街机柜式布局样式 */
:root {
  --neon-yellow: #ffff00;
  --neon-pink: #ff00ff;
  --neon-blue: #00ffff;
  --neon-green: #00ff00;
  --dark-bg: #0a0a0a;
  --arcade-dark: #121212;
  --arcade-light: #2a2a2a;
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Press Start 2P', cursive, sans-serif;
  background-color: var(--dark-bg);
  color: white;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px;
  background-position: 0 0, 25px 25px;
}

/* CRT屏幕效果 */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1000;
}

/* 霓虹文字效果 */
.neon-text {
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px var(--neon-blue),
    0 0 20px var(--neon-blue),
    0 0 25px var(--neon-blue);
}

.neon-yellow {
  color: var(--neon-yellow);
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 25px var(--neon-yellow);
}

.neon-pink {
  color: var(--neon-pink);
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px var(--neon-pink),
    0 0 20px var(--neon-pink),
    0 0 25px var(--neon-pink);
}

.neon-blue {
  color: var(--neon-blue);
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px var(--neon-blue),
    0 0 20px var(--neon-blue),
    0 0 25px var(--neon-blue);
}

.neon-green {
  color: var(--neon-green);
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px var(--neon-green),
    0 0 20px var(--neon-green),
    0 0 25px var(--neon-green);
}

/* 闪烁效果 */
.blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 头部样式 */
.arcade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.8);
  border-bottom: 4px solid var(--neon-blue);
  position: relative;
}

.arcade-logo {
  font-size: 2rem;
  letter-spacing: 2px;
}

.arcade-nav {
  display: flex;
  gap: 1rem;
}

.nav-btn {
  padding: 0.5rem 1rem;
  background-color: var(--arcade-dark);
  color: white;
  text-decoration: none;
  border: 2px solid var(--arcade-light);
  transition: all 0.3s;
}

.nav-btn:hover, .nav-btn.active {
  background-color: var(--arcade-light);
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
}

.coin-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.insert-coin-btn {
  background-color: var(--arcade-dark);
  color: var(--neon-yellow);
  border: 2px solid var(--neon-yellow);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  box-shadow: 0 0 10px var(--neon-yellow);
  transition: all 0.3s;
}

.insert-coin-btn:hover {
  background-color: var(--neon-yellow);
  color: var(--arcade-dark);
}

.coin-counter {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--neon-yellow);
}

/* 主体内容 */
.arcade-hall {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 新的横幅式欢迎区域 */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  border: 4px solid var(--arcade-light);
}

/* 欢迎内容区域 */
.welcome-content {
  flex: 2;
  text-align: left;
  padding-right: 1rem;
}

.welcome-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.welcome-content p {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.insert-coin-text {
  font-size: 1rem;
}

/* 横幅内的广告 */
.banner-ad {
  flex: 1;
  min-height: 120px;
  border-left: 2px solid var(--arcade-light);
  padding-left: 1rem;
}

/* 类别间广告 */
.category-ad {
  margin: 1rem 0;
  padding: 0.5rem;
}

/* 区域标题 */
.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* 游戏类别行 */
.category-row {
  margin-bottom: 2rem;
  padding: 0.8rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  border: 4px solid var(--arcade-light);
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.category-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--neon-blue);
}

/* 街机柜容器 */
.arcade-machines {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  gap: 16px !important;
}

/* 街机柜样式 */
.arcade-cabinet {
  background-color: rgba(18, 18, 18, 0.9) !important;
  border-radius: 10px !important;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
  width: 160px !important;
  height: 280px !important;
  display: flex;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  flex-direction: column;
  border: 4px solid var(--arcade-light) !important;
  box-shadow: 0 0 0 1px #000, 
              0 0 10px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(0, 0, 255, 0.3) !important;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  animation: fadeIn 0.3s ease-in-out;
  box-sizing: border-box !important;
  flex: 0 0 calc((100% - 5 * 16px) / 6) !important;
  height: 280px !important;
  box-sizing: border-box !important;
  max-width: 180px;
}

.arcade-cabinet:hover {
  transform: translateY(-10px);
  box-shadow: 
    0 0 0 1px #000,
    0 0 20px var(--neon-blue),
    0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--neon-blue);
  z-index: 2;
}

.cabinet-screen {
  flex: 1;
  padding: 8px;
  background-color: black;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid #333;
}

.cabinet-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.arcade-cabinet:hover .cabinet-screen img {
  transform: scale(1.1);
}

.cabinet-title {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  background-color: var(--arcade-light);
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.2rem;
  position: relative;
}

.cabinet-title:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  background-color: var(--arcade-dark);
  padding: 0.5rem;
  border: 2px solid var(--neon-blue);
  border-radius: 5px;
  z-index: 10;
  white-space: normal;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.cabinet-controls {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem;
  background-color: var(--arcade-dark);
  border-top: 2px solid #000;
}

.control-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: red;
  border: 2px solid black;
}

.control-btn.blue { background-color: blue; }
.control-btn.green { background-color: green; }
.control-btn.yellow { background-color: yellow; }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--arcade-dark);
  color: white;
  border: 2px solid var(--neon-green);
  padding: 0.5rem 1rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 10px var(--neon-green);
}

.arcade-cabinet:hover .play-btn {
  opacity: 1;
}

/* 查看更多按钮 */
.see-more-btn {
  display: block;
  text-align: center;
  padding: 0.5rem;
  background-color: var(--arcade-dark);
  color: var(--neon-blue);
  text-decoration: none;
  border: 2px solid var(--neon-blue);
  transition: all 0.3s;
  margin-top: 1rem;
}

.see-more-btn:hover {
  background-color: var(--neon-blue);
  color: var(--arcade-dark);
}

/* 关于区域 */
.about-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  border: 4px solid var(--arcade-light);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* 页脚 */
.arcade-footer {
  background-color: var(--arcade-dark);
  padding: 2rem;
  margin-top: 3rem;
  border-top: 4px solid var(--neon-pink);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.copyright {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: #888;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--neon-blue);
}

/* 加载动画 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  grid-column: 1 / -1;
}

.loading-text {
  font-size: 1.5rem;
  color: var(--neon-green);
}

/* 添加响应式设计媒体查询 */
/* 大型设备（桌面，1200px 及以上） */
@media (min-width: 1200px) {
  .arcade-cabinet {
    width: 280px;
    margin: 20px;
  }
  
  .cabinet-screen {
    height: 210px;
  }
  
  .cabinet-title {
    font-size: 1rem;
  }
}

/* 中型设备（平板电脑，768px 到 1199px） */
@media (min-width: 768px) and (max-width: 1199px) {
  .arcade-cabinet {
    width: 220px;
    margin: 15px;
  }
  
  .cabinet-screen {
    height: 165px;
  }
  
  .cabinet-title {
    font-size: 0.85rem;
    padding: 8px 0;
    /* 确保标题不会被截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .play-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .control-btn {
    width: 15px;
    height: 15px;
    margin: 0 5px;
  }
}

/* 小型设备（手机，767px 及以下） */
@media (max-width: 767px) {
  .arcade-cabinet {
    width: 160px;
    margin: 10px;
  }
  
  .cabinet-screen {
    height: 120px;
  }
  
  .cabinet-title {
    font-size: 0.7rem;
    padding: 6px 0;
    /* 确保标题不会被截断 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .play-btn {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
  
  .control-btn {
    width: 12px;
    height: 12px;
    margin: 0 4px;
  }
}

/* 超小型设备（小型手机，480px 及以下） */
@media (max-width: 480px) {
  .arcade-cabinet {
    width: 140px;
    margin: 5px;
  }
  
  .cabinet-screen {
    height: 105px;
  }
  
  .cabinet-title {
    font-size: 0.6rem;
    padding: 5px 0;
  }
  
  .play-btn {
    font-size: 0.6rem;
    padding: 4px 8px;
  }
  
  /* 确保图片正确加载和显示 */
  .cabinet-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* 优化控制按钮布局 */
  .cabinet-controls {
    padding: 5px 0;
  }
  
  .control-btn {
    width: 10px;
    height: 10px;
    margin: 0 3px;
  }
}

/* 确保在极小屏幕上游戏卡片单列显示 */
@media (max-width: 360px) {
  .arcade-cabinet {
    width: 90%;
    margin: 10px auto;
  }
  
  .cabinet-screen {
    height: 180px;
  }
}

.cabinet-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.arcade-cabinet:hover .cabinet-screen img {
  transform: scale(1.1);
}

.cabinet-title {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  background-color: var(--arcade-light);
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.2rem;
  position: relative;
}

.cabinet-title:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  background-color: var(--arcade-dark);
  padding: 0.5rem;
  border: 2px solid var(--neon-blue);
  border-radius: 5px;
  z-index: 10;
  white-space: normal;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.cabinet-controls {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem;
  background-color: var(--arcade-dark);
  border-top: 2px solid #000;
}

.control-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: red;
  border: 2px solid black;
}

.control-btn.blue { background-color: blue; }
.control-btn.green { background-color: green; }
.control-btn.yellow { background-color: yellow; }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--arcade-dark);
  color: white;
  border: 2px solid var(--neon-green);
  padding: 0.5rem 1rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 0 10px var(--neon-green);
}

.arcade-cabinet:hover .play-btn {
  opacity: 1;
}

/* 查看更多按钮 */
.see-more-btn {
  display: block;
  text-align: center;
  padding: 0.5rem;
  background-color: var(--arcade-dark);
  color: var(--neon-blue);
  text-decoration: none;
  border: 2px solid var(--neon-blue);
  transition: all 0.3s;
  margin-top: 1rem;
}

.see-more-btn:hover {
  background-color: var(--neon-blue);
  color: var(--arcade-dark);
}

/* 关于区域 */
.about-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  border: 4px solid var(--arcade-light);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* 页脚 */
.arcade-footer {
  background-color: var(--arcade-dark);
  padding: 2rem;
  margin-top: 3rem;
  border-top: 4px solid var(--neon-pink);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.copyright {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: #888;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--neon-blue);
}

/* 加载动画 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  grid-column: 1 / -1;
}

.loading-text {
  font-size: 1.5rem;
  color: var(--neon-green);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .arcade-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .arcade-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .arcade-machines {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }
  
  .arcade-cabinet {
    height: 280px;
  }
  
  .welcome-banner {
    flex-direction: column;
  }
  
  .welcome-content {
    text-align: center;
    padding-right: 0;
    margin-bottom: 1rem;
  }
  
  .banner-ad {
    width: 100%;
    border-left: none;
    border-top: 2px solid var(--arcade-light);
    padding-left: 0;
    padding-top: 1rem;
  }
}

@media (max-width: 480px) {
  .arcade-machines {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .arcade-cabinet {
    height: 250px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .welcome-content h2 {
    font-size: 1.5rem;
  }
}

/* 广告区域样式 */
.ad-section {
    margin: 20px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    padding: 10px;
    border-radius: 5px;
    max-width: 1200px;
    width: 100%;
    margin: 1rem auto;
}

.ad-container {
    min-height: 90px; /* 根据广告尺寸调整 */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 顶部广告位样式 */
.top-ad {
    margin-bottom: 15px;
}

/* 中部广告位样式 */
.middle-ad {
    margin: 30px 0;
}

/* 游戏详情页广告位样式 */
.game-bottom-ad {
    margin: 30px 0;
}

.sidebar-ad {
    margin-top: 20px;
}

/* 响应式广告容器 */
@media (max-width: 768px) {
    .sidebar-ad {
        display: none; /* 在移动端隐藏侧边栏广告 */
    }
    
    .ad-container {
        min-height: 50px; /* 移动端广告尺寸 */
    }
}

/* 箭头按钮样式 */
.category-navigation {
    position: relative;
    width: 100%;
}

.arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--neon-blue);
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px var(--neon-blue),
        0 0 20px var(--neon-blue);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    padding: 0 10px;
    outline: none;
    transition: all 0.3s;
}

.arrow-btn:hover {
    transform: translateY(-50%) scale(1.2);
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

/* 淡入淡出动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.arcade-cabinet {
    animation: fadeIn 0.3s ease-in-out;
}

/* 针对分类页面特别修正 */
body.category-page .arcade-hall {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* 游戏网格布局在分类页面 */
.games-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 分类页游戏容器样式 */
.category-games {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 20px !important; /* 统一设置间距 */
    width: 100% !important;
    padding: 15px !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #333 !important;
    border-radius: 5px !important;
    margin-bottom: 20px !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 300px !important;
}

/* 分类页游戏卡片样式 - 调整宽度和边距 */
.category-page .arcade-cabinet, 
.games-grid .arcade-cabinet {
    width: 160px !important; /* 三列布局，减去间距 */; 
    margin: 0 !important; /* 移除边距，使用gap控制间距 */
    height: 280px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: 160px !important; /* 确保基础宽度一致 */
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;


}

/* 确保卡片内容比例正确 */
.category-page .cabinet-screen {
    min-height: 130px !important;
    height: 60% !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: black !important;
}

/* 改进分类页图片显示 */
.category-page .cabinet-screen img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保标题区域显示正确 */
.category-page .cabinet-title {
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding: 5px 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: var(--arcade-light) !important;
}

/* 确保控制按钮区域显示正确 */
.category-page .cabinet-controls {
    width: 100% !important;
    display: flex !important;
    justify-content: space-around !important;
    padding: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: var(--arcade-dark) !important;
}

/* 确保播放按钮显示正确 */
.category-page .play-btn {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s !important;
    z-index: 10 !important;
}

.category-page .arcade-cabinet:hover .play-btn {
    opacity: 1 !important;
}

/* 优化分类页面整体布局 */
body.category-page {
    min-height: 100vh !important;
}

body.category-page .arcade-hall {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 2rem !important;
}

/* 修复分类页面游戏网格布局 */
.games-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
    gap: 0 !important; /* 移除间隙，使用margin控制间距 */
}

/* 移除这个规则，因为它会影响布局 */
/* .games-grid::after {
    content: "" !important;
    flex: auto !important;
} */

/* 确保控制按钮显示 */
.category-page .control-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 2px solid black !important;
    display: block !important;
}

/* 添加空白游戏卡片样式 */
.arcade-cabinet.empty .cabinet-screen {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-screen {
    width: 100%;
    height: 100%;
    background-color: #111;
    border: 1px solid #444;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* 修复游戏分类显示区域和热门游戏区域的布局 */
.game-category {
    display: flex;
    justify-content: space-between; /* 确保游戏卡片均匀分布 */
    width: 100%;
    gap: 10px; /* 添加间隙确保卡片之间有适当的间距 */
}

.game-card {
    flex: 1; /* 让每个卡片平均分配可用空间 */
    min-width: 0; /* 允许卡片在必要时缩小 */
    margin: 0; /* 移除可能的外边距 */
}

/* 确保导航按钮位置正确 */
.category-nav-button {
    position: absolute;
    z-index: 10;
}

/* 分页控件样式 */
.pagination-controls {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 20px 0 !important;
  gap: 10px !important;
  width: 100% !important;
}

.pagination-btn {
  background-color: var(--arcade-dark) !important;
  color: var(--neon-blue) !important;
  border: 2px solid var(--neon-blue) !important;
  padding: 8px 15px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-family: 'Press Start 2P', cursive !important;
  font-size: 14px !important;
  transition: all 0.3s !important;
  text-shadow: 0 0 5px var(--neon-blue) !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--neon-blue) !important;
  color: var(--arcade-dark) !important;
  text-shadow: none !important;
  box-shadow: 0 0 15px var(--neon-blue) !important;
}

.pagination-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.pagination-btn.active {
  background-color: var(--neon-blue) !important;
  color: var(--arcade-dark) !important;
  box-shadow: 0 0 15px var(--neon-blue) !important;
}

.page-btn {
  min-width: 40px !important;
}

/* 移动设备上的分页样式 */
@media (max-width: 768px) {
  .pagination-controls {
      flex-wrap: wrap !important;
  }
  
  .pagination-btn {
      font-size: 12px !important;
      padding: 6px 10px !important;
  }
  
  .page-btn {
      min-width: 30px !important;
  }
}

/* Unify homepage arcade cabinet size with category page
   Reason: Ensure the arcade cabinet (game card) size on the homepage matches the size used on category pages for visual consistency. */
.arcade-cabinet {
  width: 160px !important;
  height: 280px !important;
}

/* Ensure arcade-cabinet style always applies, even in .featured */
.arcade-cabinet, .arcade-machines .arcade-cabinet, .featured .arcade-cabinet {
  background-color: rgba(18, 18, 18, 0.9) !important;
  border-radius: 10px !important;
  border: 4px solid var(--arcade-light) !important;
  box-shadow: 0 0 0 1px #000, 0 0 10px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,0,255,0.3) !important;
  /* 其他 arcade-cabinet 样式 */
}