/* 全局变量 - 品牌化配色 */
:root {
  --main-color: #2563eb; /* 主色-深海蓝 */
  --accent-color: #ec4899; /* 强调色-玫瑰粉 */
  --dark-color: #1e293b; /* 深色文本 */
  --light-color: #f8fafc; /* 浅背景 */
  --gray-color: #64748b; /* 灰色文本 */
  --card-bg: #ffffff; /* 卡片背景 */
  --shadow-sm: 0 2px 10px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 5px 20px rgba(37, 99, 235, 0.12);
  --shadow-lg: 0 8px 30px rgba(37, 99, 235, 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.35s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "SF Pro Display", "Inter", "PingFang SC", sans-serif;
  color: var(--dark-color);
  background-color: var(--light-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* 通用组件样式 */
.section {
  padding: 100px 0;
  position: relative;
}

/* 统一左右分栏布局容器 */
.layout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 反向布局（图左文右 ↔ 文左图右） */
.layout-row.reverse {
  grid-template-columns: 1fr 1fr;
  direction: rtl; /* 快速实现反向布局，子元素需重置 */
}
.layout-row.reverse > * {
  direction: ltr; /* 重置子元素文字方向 */
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
  color: var(--dark-color);
}

.section-heading h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, var(--main-color), var(--accent-color));
  border-radius: 2px;
}

.section-heading p {
  color: var(--gray-color);
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.8;
}

.btn {
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--main-color), #3b82f6);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #1d4ed8, var(--main-color));
}

.btn-secondary {
  background: transparent;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  margin-left: 15px;
}

.btn-secondary:hover {
  background: var(--main-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* 导航栏样式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  z-index: 9999;
  padding: 15px 0;
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--main-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  color: var(--dark-color);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--main-color), var(--accent-color));
  border-radius: 2px;
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--dark-color);
}

/* 英雄区样式 - 左右布局 */
.hero {
  padding: 180px 0 120px;
  background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  /* background: url(https://picsum.photos/id/119/1200/800) no-repeat center
          center; */
  background-size: cover;
  opacity: 0.07;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 25px;
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--main-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--gray-color);
  margin-bottom: 40px;
  line-height: 1.8;
  max-width: 550px;
}

.hero-img img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* 钻石充值模块 - 左右布局 */
.recharge {
  background-color: var(--card-bg);
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.recharge-card {
  background-color: var(--light-color);
  border-radius: var(--radius-md);
  padding: 25px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid #e2e8f0;
  position: relative;
  text-align: center;
}

.recharge-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--main-color);
}

.recharge-card.popular {
  border-color: var(--main-color);
  background: linear-gradient(180deg, #f0f7ff, white);
  transform: scale(1.03);
}

.recharge-card.popular::before {
  content: "热门推荐";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--main-color), var(--accent-color));
  color: white;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.recharge-diamond {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.recharge-amount {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.recharge-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--main-color);
  margin-bottom: 20px;
}

.recharge-note {
  text-align: left;
  color: var(--gray-color);
  font-size: 0.95rem;
  margin-top: 30px;
  line-height: 1.7;
}

/* 充值福利模块 - 左右布局 */
.benefits {
  background: linear-gradient(135deg, #f8fafc 0%, #fdf2f8 100%);
}

.benefits-list {
  margin-top: 20px;
}

.benefit-item {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 20px;
}

.benefit-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon i {
  font-size: 1.8rem;
  color: white;
}

.benefit-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.benefit-content p {
  color: var(--gray-color);
  margin: 0;
  line-height: 1.7;
}

.benefits-img img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* 钻石优势模块 - 左右布局 */
.advantages {
  background-color: var(--card-bg);
}

.advantage-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.advantage-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.advantage-item i {
  font-size: 1.5rem;
  color: var(--main-color);
  margin-top: 5px;
  flex-shrink: 0;
}

.advantage-text h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.advantage-text p {
  color: var(--gray-color);
  margin: 0;
  line-height: 1.7;
}

.advantages-img img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* 功能模拟模块 - 左右布局（核心新增） */
.simulation {
  background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
}

.simulation-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  transition: var(--transition);
}

.simulation-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.simulation-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--main-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulation-card h3 i {
  color: var(--accent-color);
}

.simulation-content {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 20px;
  background-color: var(--light-color);
  margin-top: 15px;
}

.simulation-btn {
  padding: 10px 20px;
  background-color: var(--main-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.simulation-btn:hover {
  background-color: #1d4ed8;
}

.simulation-result {
  margin-top: 15px;
  padding: 15px;
  border-radius: var(--radius-sm);
  background-color: #ecfdf5;
  color: #065f46;
  display: none;
}

.simulation-result.show {
  display: block;
}

.simulation-img img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* 页脚样式 */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding: 80px 0 40px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.footer-desc {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 25px;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94a3b8;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 8px;
}

.copyright {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 响应式设计 - 移动端堆叠布局 */
@media (max-width: 992px) {
  .layout-row,
  .layout-row.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .section-heading {
    margin: 0 auto;
    text-align: center;
  }

  .section-heading p {
    margin: 0 auto;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .recharge-grid {
    grid-template-columns: 1fr;
  }

  .recharge-card.popular {
    transform: scale(1);
  }

  .btn {
    margin: 10px 5px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .section {
    padding: 70px 0;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 120px 0 60px;
  }

  .benefit-item {
    flex-wrap: wrap;
    text-align: center;
  }

  .benefit-icon {
    margin: 0 auto;
  }

  .simulation-card {
    padding: 20px;
  }
}

.game-editor {
  background-color: var(--white);
  padding: 80px 0;
}

.editor-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: linear-gradient(135deg, #f9faff, #edf2ff);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.game-editor-box {
  position: relative;
  width: 1200px;
  height: 570px;
  background-image: url(../imgs/bj-01.png);
  background-size: cover;
  border-radius: 8px;
}

.rating {
  position: absolute;
  top: 127px;
  left: 195px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #d4cdae;
}

.usernames-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  cursor: text;
  /* 保持与原div相同的样式 */
  display: inline-block;
}

.usernames {
  position: absolute;
  top: 104px;
  left: 266px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 15px;
  color: #d4cdae;
  font-family: "PingFang SC-Regular";
}

.record {
  position: absolute;
  top: 104px;
  left: 392px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 15px;
  color: #ffffff;
  font-family: "PingFang SC-Regular";
  display: flex;
}

.amounts {
  position: absolute;
  top: 104px;
  left: 484px;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 15px;
  color: #fce195;
  font-family: "PingFang SC-Regular";
}

/* 登录注册弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: auto;
}

.modal-content {
  background-color: var(--white);
  margin: 10% auto;
  padding: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  animation: modalSlideIn 0.3s ease-in-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 20px 30px;
  background: linear-gradient(135deg, var(--primary), #5874f5);
  color: var(--white);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
}

/* 成功提示弹窗样式 */
.success-modal .modal-body {
  padding: 40px;
}

.success-icon {
  font-size: 4rem;
  color: #4caf50;
  margin-bottom: 20px;
}

/* 导航栏登录注册按钮样式 */
.auth-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .auth-buttons {
    display: none;
  }
}
