/* ===== 全局重置 & 基础 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7fc;
  color: #222;
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background: #0d1117;
  color: #e6edf3;
}

/* ===== 链接 ===== */
a {
  color: #1e3a5f;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #c9a84c;
}

/* ===== 容器 & 布局 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 毛玻璃效果 ===== */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.dark-mode .glass {
  background: rgba(13, 17, 23, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

/* ===== 渐变背景 ===== */
.gradient-bg {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
}

/* ===== 渐变文字 ===== */
.gradient-text {
  background: linear-gradient(135deg, #c9a84c, #f0d78c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dark-mode .card {
  background: #161b22;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #c9a84c, #f0d78c);
  color: #1a1a2e;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
}

/* ===== 区块 ===== */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: #666;
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1rem;
}

.dark-mode .section-sub {
  color: #8b949e;
}

/* ===== 网格系统 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* ===== 工具类 ===== */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* ===== 滚动动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 头部导航 ===== */
#header {
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#header .logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

#header .logo-area svg {
  flex-shrink: 0;
}

#header .brand-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

#main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

#main-nav a {
  color: #e0e0e0;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

#main-nav a:hover,
#main-nav a.active {
  color: #c9a84c;
}

#dark-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  transition: background 0.3s ease;
}

#dark-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

#mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ===== Hero 区域 ===== */
#hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 70%, #16213e 100%);
  color: #fff;
  overflow: hidden;
}

#hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

#hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

#hero p {
  font-size: 1.15rem;
  color: #b0c4de;
  margin-bottom: 30px;
  max-width: 500px;
}

#hero .cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

#hero .btn-outline {
  padding: 12px 32px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

#hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #c9a84c;
}

#hero .hero-svg {
  position: relative;
  display: flex;
  justify-content: center;
}

#hero .hero-svg svg {
  max-width: 100%;
  height: auto;
}

/* ===== 关于我们 ===== */
#about .glass h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.dark-mode #about .glass h3 {
  color: #e6edf3;
}

#about .glass p {
  color: #444;
}

.dark-mode #about .glass p {
  color: #b0b8c4;
}

/* ===== 热门游戏 ===== */
#products {
  background: #f0f4fa;
}

.dark-mode #products {
  background: #0d1117;
}

#products .card svg {
  margin: 0 auto 16px;
}

#products .card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

#products .card p {
  color: #666;
  font-size: 0.95rem;
}

.dark-mode #products .card p {
  color: #8b949e;
}

/* ===== 我们的优势 ===== */
#advantages .glass svg {
  margin: 0 auto 16px;
}

#advantages .glass h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

#advantages .glass p {
  color: #555;
}

.dark-mode #advantages .glass p {
  color: #b0b8c4;
}

/* ===== 解决方案 ===== */
#solutions {
  background: #f0f4fa;
}

.dark-mode #solutions {
  background: #0d1117;
}

#solutions .card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

#solutions .card p {
  color: #555;
}

.dark-mode #solutions .card p {
  color: #8b949e;
}

/* ===== 服务行业 ===== */
#industries .glass svg {
  margin: 0 auto 12px;
}

#industries .glass h3 {
  font-size: 1.1rem;
}

/* ===== 统计数据 ===== */
#statistics {
  padding: 60px 0;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: #c9a84c;
}

#statistics p {
  color: #b0c4de;
  margin-top: 8px;
}

/* ===== 成功案例 ===== */
#cases .card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

#cases .card p {
  color: #555;
}

.dark-mode #cases .card p {
  color: #8b949e;
}

/* ===== 合作伙伴 ===== */
#partners {
  background: #f0f4fa;
}

.dark-mode #partners {
  background: #0d1117;
}

#partners .glass {
  padding: 20px;
}

/* ===== 玩家心声 ===== */
#testimonials .card p:first-child {
  color: #555;
  font-style: italic;
}

.dark-mode #testimonials .card p:first-child {
  color: #b0b8c4;
}

#testimonials .card p:last-child {
  margin-top: 12px;
  font-weight: 600;
}

/* ===== 最新资讯 ===== */
#news {
  background: #f0f4fa;
}

.dark-mode #news {
  background: #0d1117;
}

#news .card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

#news .card p {
  color: #555;
  margin-bottom: 12px;
}

.dark-mode #news .card p {
  color: #8b949e;
}

#news .card .date {
  color: #999;
  font-size: 0.9rem;
}

#news .glass h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

#news .glass ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

#news .glass ul li a {
  color: #1e3a5f;
}

.dark-mode #news .glass ul li a {
  color: #e6edf3;
}

/* ===== FAQ ===== */
#faq .faq-item {
  margin-bottom: 16px;
  cursor: pointer;
}

#faq .faq-item .faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
}

#faq .faq-item .faq-question span:last-child {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

#faq .faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding-top 0.4s ease;
  padding-top: 0;
}

#faq .faq-item .faq-answer p {
  color: #555;
  margin-top: 12px;
}

.dark-mode #faq .faq-item .faq-answer p {
  color: #b0b8c4;
}

/* ===== 如何开始 ===== */
#howto {
  background: #f0f4fa;
}

.dark-mode #howto {
  background: #0d1117;
}

#howto .card svg {
  margin: 0 auto 16px;
}

#howto .card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

#howto .card p {
  color: #555;
}

.dark-mode #howto .card p {
  color: #8b949e;
}

/* ===== 联系我们 ===== */
#contact .glass h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

#contact .glass p {
  margin-bottom: 8px;
}

#contact .glass form input,
#contact .glass form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.3s ease;
}

.dark-mode #contact .glass form input,
.dark-mode #contact .glass form textarea {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}

#contact .glass form input:focus,
#contact .glass form textarea:focus {
  outline: none;
  border-color: #c9a84c;
}

#contact .glass form textarea {
  resize: vertical;
}

/* ===== 页脚 ===== */
footer {
  padding: 60px 0 30px;
}

footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

footer ul {
  list-style: none;
  color: #b0c4de;
  font-size: 0.9rem;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: #b0c4de;
  transition: color 0.3s ease;
}

footer ul li a:hover {
  color: #c9a84c;
}

footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: #b0c4de;
  font-size: 0.85rem;
}

/* ===== 返回顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #f0d78c);
  color: #1a1a2e;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  z-index: 999;
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.6);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 搜索模态框 ===== */
#search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

#search-modal .glass {
  width: 90%;
  max-width: 500px;
  padding: 30px;
}

#search-modal h3 {
  margin-bottom: 16px;
}

#search-modal input {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.dark-mode #search-modal input {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}

#search-modal input:focus {
  outline: none;
  border-color: #c9a84c;
}

#search-modal .modal-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}

#search-modal .btn-cancel {
  padding: 12px 24px;
  border-radius: 50px;
  background: #eee;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.dark-mode #search-modal .btn-cancel {
  background: #30363d;
  color: #e6edf3;
}

#search-modal .btn-cancel:hover {
  background: #ddd;
}

.dark-mode #search-modal .btn-cancel:hover {
  background: #444;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  #hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #hero p {
    margin-left: auto;
    margin-right: auto;
  }

  #hero .cta-group {
    justify-content: center;
  }

  #hero .hero-svg {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .glass {
    padding: 25px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  #header .brand-name {
    font-size: 1.3rem;
  }

  #main-nav {
    display: none;
  }

  #main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #1a1a2e;
    padding: 20px;
    gap: 16px;
    z-index: 999;
  }

  #mobile-menu-btn {
    display: block;
  }

  #hero {
    padding: 80px 0 60px;
  }

  #hero h1 {
    font-size: 2.2rem;
  }

  #hero p {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  #hero h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .glass {
    padding: 20px;
  }

  #header .brand-name {
    font-size: 1.1rem;
  }

  #header .logo-area svg {
    width: 36px;
    height: 36px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  #news .glass ul {
    grid-template-columns: 1fr;
  }
}

/* ===== 暗色模式额外调整 ===== */
.dark-mode body {
  background: #0d1117;
}

.dark-mode #hero {
  background: linear-gradient(135deg, #0a0e1a 0%, #111827 70%, #0d1117 100%);
}

.dark-mode #products,
.dark-mode #solutions,
.dark-mode #partners,
.dark-mode #news,
.dark-mode #howto {
  background: #0d1117;
}

.dark-mode .card {
  background: #161b22;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.dark-mode .glass {
  background: rgba(22, 27, 34, 0.8);
  border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode input,
.dark-mode textarea {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
  color: #8b949e;
}

/* ===== 导航高亮 ===== */
#main-nav a.active {
  color: #c9a84c;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dark-mode ::-webkit-scrollbar-track {
  background: #0d1117;
}

::-webkit-scrollbar-thumb {
  background: #c9a84c;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8963a;
}

/* ===== 选择文本 ===== */
::selection {
  background: #c9a84c;
  color: #1a1a2e;
}

.dark-mode ::selection {
  background: #c9a84c;
  color: #0d1117;
}