/* 布局调整 */
.w-wrap {
  display: flex;
  gap: 20px;
}

.w-section {
  flex: 0 0 50%;
  order: 1;
}

.w-article {
  flex: 0 0 50%;
  float: none !important;
  clear: none !important;
  display: block !important;
  order: 2;
}

/* 标签栏样式 */
.game-tabs {
  display: flex;
  background: #f5f5f5;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

.game-tab {
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.game-tab:hover {
  background: #eee;
}

.game-tab.active {
  background: #fff;
  border-bottom: 2px solid #ff6600;
  font-weight: bold;
}

/* 游戏内容区域 */
.game-content {
  border: 1px solid #ddd;
  border-top: none;
  background: #fff;
  min-height: 200px;
}

.game-list {
  display: none;
  padding: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.game-list.active {
  display: flex;
}

/* 游戏项目样式 */
.game-item {
  width: 120px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.game-img {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.game-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.game-title {
  text-align: center;
  margin-top: 8px;
}

.game-title a {
  color: #333;
  text-decoration: none;
  font-size: 12px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-title a:hover {
  color: #ff6600;
}

/* 弹出框样式 - 美化版 */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.close-modal:hover {
  background: rgba(255, 102, 0, 0.1);
  color: #ff6600;
  transform: rotate(90deg);
}

.modal-body {
  padding: 25px;
}

/* 上半部分：图标和CDK */
.modal-top {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.modal-img {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.modal-cdk-section {
  flex: 1;
  background: linear-gradient(135deg, #fff5f0 0%, #fff 100%);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.1);
  border: 1px solid rgba(255, 102, 0, 0.2);
}

.cdk-label {
  color: #ff6600;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cdk-label::before {
  content: "🎁";
  font-size: 16px;
}

.cdk-value {
  color: #333;
  font-size: 15px;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.5;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  font-family: 'Courier New', monospace;
}

/* 游戏简介区域 */
.modal-desc-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.desc-label {
  color: #495057;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desc-label::before {
  content: "📖";
  font-size: 16px;
}

.modal-desc {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* 底部下载按钮 */
.modal-footer {
  text-align: center;
  padding-top: 10px;
}

.download-btn {
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: "⬇";
  margin-right: 8px;
  font-size: 14px;
}

.download-btn:hover {
  background: linear-gradient(135deg, #e55a00 0%, #ff6600 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 102, 0, 0.4);
}

.download-btn:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-body {
    flex-direction: column;
    padding: 15px;
  }
  
  .modal-left {
    flex: none;
    width: 100%;
  }
  
  .game-list {
    justify-content: center;
  }
}