body {
  background: #151C3A;   /* 深蓝色背景 */
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #151C3A;   /* 深蓝色 */
  color: #fff;
  padding: 1rem 2rem;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-wrap: wrap;
  min-height: 70px; /* 确保最小高度 */
}

.logo {
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 3px;
  color: #FF6B2D;        /* 橙色LOGO */
}

.subtitle {
  font-size: 1.1rem;
  font-weight: normal;
  margin-left: 2rem;
  color: #E5E5E5;        /* 浅灰色副标题 */
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0; /* 防止被压缩 */
}

.header-right {
  display: flex;
  align-items: center; /* 确保所有子元素垂直居中 */
  gap: 1rem;
  flex-shrink: 1; /* 允许缩小 */
  min-width: 0; /* 允许内容压缩 */
}

/* 主内容卡片 */
.main-card {
  background: #1A2240;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  margin: 2rem auto;
  padding: 0.5rem 2rem;
  max-width: 900px;
  text-align: left;
  color: #FFFFFF;
}

/* 按钮样式 */
button {
  background: #FF6B2D;   /* 橙色按钮 */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.2s;
}

button:hover {
  background: #e55c1a;   /* 深橙色悬停 */
}

/* iframe 容器 */
.iframe-container {
  margin-top: 2rem;
  width: 100%;
  max-width: 800px;
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin-left: auto;
  margin-right: auto;
  background: #1A2240;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  background: #151C3A;
}

@media (max-width: 800px) {
  .iframe-container {
    max-width: 100%;
    height: 400px;
  }
}

/* 页脚样式 */
footer {
  background: #1A2240;
  color: #E5E5E5;
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
  font-size: 1rem;
  border-top: 1px solid #22294a;
  margin-top: 40px;
  flex-shrink: 0;
}

/* 游戏分类样式 */
.game-category {
  margin-top: 2rem;
  text-align: left;
}

.game-category h2 {
  font-size: 1.3rem;
  color: #FF6B2D;        /* 橙色标题 */
  margin-bottom: 0.5rem;
}

.game-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-category li {
  margin-bottom: 0.5rem;
}

.game-category a {
  color: #FF6B2D;        /* 橙色链接 */
  text-decoration: none;
  font-size: 1.08rem;
  transition: color 0.2s;
}

.game-category a:hover {
  color: #FFA366;        /* 浅橙色悬停 */
  text-decoration: underline;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-category-nav {
  display: flex;
  gap: 1rem;
}

@media (max-width: 768px) {
  .game-category-nav {
    display: none;
  }
}

.category-link,
#langBtn {
  color: #fff;
  background: #FF6B2D;   /* 橙色按钮 */
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  line-height: 1.5;
  margin: 0;
}

.category-link:hover,
.category-link:focus,
#langBtn:hover,
#langBtn:focus {
  background: #e55c1a;   /* 深橙色悬停 */
  color: #fff;
}

/* iframe 操作按钮 */
.iframe-actions {
  margin: 1.2rem auto 0 auto;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.iframe-actions button {
  background: #FF6B2D;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.iframe-actions button:hover,
.iframe-actions button:focus {
  background: #e55c1a;
}

/* 容器样式 */
.container {
  max-width: 800px;
  margin: 40px auto 0 auto;
  padding: 32px 20px;
  background: #1A2240;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  flex: 1 0 auto;
}

/* 标题样式 */
h1, h2 {
  color: #FF6B2D;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  margin-top: 0;
  font-size: 1.6rem;
}

ul {
  margin-left: 1.5em;
}

/* 页脚链接样式 */
.footer-links {
  margin-bottom: 1rem;
  text-align: left;
}

.footer-links a {
  color: #FF6B2D;
  text-decoration: none;
  margin: 0 1.2em;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* 新标签样式 */
.new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff3b3b;
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  z-index: 2;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.dle-card {
  position: relative;
}

/* 汉堡包按钮 */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none !important;
  border: none !important;
  box-shadow: none;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  z-index: 1003;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 3px 0;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* 汉堡按钮激活状态 */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(9px, 9px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(9px, -9px);
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 侧边栏菜单 */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #1A2240;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #FF6B2D;
  letter-spacing: 2px;
}

.sidebar-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
  margin: 0;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 侧边栏内容 */
.sidebar-content {
  flex: 1;
  padding: 1rem 0;
}

.mobile-menu .category-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: #fff;
  text-decoration: none;
  background: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 0;
  transition: background 0.2s, padding-left 0.2s;
  width: 100%;
  text-align: left;
}

.mobile-menu .category-link:hover {
  background: rgba(255, 107, 45, 0.1);
  padding-left: 2rem;
}

.mobile-menu .category-link .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* 侧边栏页脚（可选） */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* 导航栏搜索框 */
.nav-search-box {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 1;
  min-width: 0;
  height: 40px;
}

.nav-search-input {
  padding: 0.5rem 0.8rem 0.5rem 2.5rem; /* 左侧留空给图标 */
  font-size: 0.9rem;
  border: none;
  border-radius: 20px; /* 圆角胶囊形状 */
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  outline: none;
  width: 200px;
  transition: all 0.3s ease;
  min-width: 120px;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-search-input:focus {
  background: #fff;
  width: 280px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-search-input::placeholder {
  color: #999;
  font-weight: 400;
}

/* 搜索图标 */
.nav-search-btn {
  position: absolute;
  left: 0.6rem;
  padding: 0;
  background: transparent;
  color: #666;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  pointer-events: none; /* 让点击穿透到输入框 */
}

.nav-search-input:focus + .nav-search-btn,
.nav-search-input:hover + .nav-search-btn {
  color: #333;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .nav-search-box {
    height: 36px;
  }
  
  .nav-search-input {
    width: 160px;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem 0.4rem 2.2rem;
  }
  
  .nav-search-input:focus {
    width: 200px;
  }
  
  .nav-search-btn {
    font-size: 1rem;
    left: 0.5rem;
  }
}

@media (max-width: 600px) {
  .nav-search-box {
    height: 32px;
  }
  
  .nav-search-input {
    width: 140px;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem 0.3rem 2rem;
    border-radius: 16px;
  }
  
  .nav-search-input:focus {
    width: 160px;
  }
  
  .nav-search-btn {
    font-size: 0.9rem;
    left: 0.4rem;
  }
}

@media (max-width: 800px) {
  header {
    padding: 0.8rem 1rem;
    min-height: 60px;
  }
  
  .header-left {
    flex: 0 0 auto;
  }
  
  .subtitle {
    margin-left: 1rem;
    font-size: 0.9rem;
  }
  
  .game-category-nav {
    display: none;
  }
  
  .header-right {
    gap: 0.6rem;
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  
  .nav-search-box {
    flex: 1 1 auto;
    max-width: 250px;
    height: 36px; /* 移动端稍微小一点 */
  }
  
  .nav-search-input {
    width: 100%;
    max-width: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
  
  .nav-search-input:focus {
    width: 100%;
  }
  
  .nav-search-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
  
  .hamburger {
    width: 36px;
    height: 36px;
  }
  
  .hamburger span {
    width: 24px;
    height: 3px;
  }
}

@media (max-width: 600px) {
  header {
    padding: 0.6rem 0.8rem;
    min-height: 50px;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .subtitle {
    display: none;
  }
  
  .nav-search-box {
    max-width: 180px;
    height: 32px;
  }
  
  .nav-search-input {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  
  .nav-search-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .hamburger {
    width: 32px;
    height: 32px;
  }
  
  .hamburger span {
    width: 22px;
    height: 3px;
    margin: 2.5px 0;
  }
}

/* 面包屑导航 */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #d0d0d0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb a {
  color: #4da6ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #80c0ff;
  text-decoration: underline;
}

.breadcrumb .separator {
  margin: 0 0.5rem;
  color: #666;
  user-select: none;
}

.breadcrumb [aria-current="page"] {
  color: #fff;
  font-weight: 500;
}

@media (max-width: 600px) {
  .breadcrumb {
    font-size: 0.8rem;
  }
  
  .breadcrumb .separator {
    margin: 0 0.3rem;
  }
}

/* Game action bar */
.game-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(90deg, rgba(138,87,219,0.08), rgba(163,115,255,0.06));
  padding: 0.7rem 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(72,47,117,0.06);
  margin-top: 0.8rem;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.game-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.game-title {
  font-size: 1.05rem;
  color: #eae6ff;
  font-weight: 600;
  letter-spacing: 0.6px;
  margin: 0 !important;
  line-height: 1.3;
}

.action-buttons {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex: 0 0 auto;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(152, 101, 255, 0.12);
  color: #fff;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform .12s ease, background .12s ease;
  box-shadow: 0 4px 12px rgba(86,63,134,0.08);
  min-width: 48px;
  height: 44px;
  margin: 0 !important;
}

.action-btn:hover {
  transform: translateY(-3px);
  background: rgba(163,115,255,0.18);
}

.action-btn .icon {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn .label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
  line-height: 1;
}

.action-btn.fav.active {
  background: rgba(255,105,135,0.22);
  color: #ff6b9d;
}

.action-btn.fav.active .icon {
  animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 游戏操作栏响应式 */
@media (max-width: 920px) {
  .game-actions {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .game-meta {
    flex: 1 1 100%;
    width: 100%;
  }
  
  .action-buttons {
    flex: 1 1 100%;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .game-title {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .game-actions {
    padding: 0.6rem;
    gap: 0.6rem;
  }
  
  .game-meta {
    gap: 0.6rem;
  }
  
  .game-thumb {
    width: 40px;
    height: 40px;
  }
  
  .game-title {
    font-size: 0.95rem;
  }
  
  .action-buttons {
    gap: 0.4rem;
  }
  
  .action-btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    min-width: 44px;
    height: 40px;
  }
  
  .action-btn .icon {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .game-actions {
    padding: 0.5rem;
  }
  
  .game-thumb {
    width: 36px;
    height: 36px;
  }
  
  .game-title {
    font-size: 0.9rem;
  }
  
  .action-btn {
    padding: 0.45rem 0.6rem;
    min-width: 40px;
    height: 36px;
  }
  
  .action-btn .label {
    display: none; /* 小屏幕只显示图标 */
  }
  
  .action-btn .icon {
    font-size: 1.1rem;
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #FF6B2D;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 45, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  margin: 0 !important;
}

.back-to-top.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #e55c1a;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 107, 45, 0.6);
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }
}