/* ========================================
   成都荣诚神域科技有限公司 - 官网样式
   极简 · 现代 · 时尚
   ======================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --accent: #8b5cf6;
  --accent-light: #c4b5fd;
  --bg-dark: #0f0e17;
  --bg-card: #1a1932;
  --bg-section: #f8f7ff;
  --text-light: #fffffe;
  --text-muted: #94a3b8;
  --text-dark: #1e1b4b;
  --text-gray: #64748b;
  --border-subtle: rgba(99, 102, 241, 0.15);
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-warm: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(99, 102, 241, 0.15);
  --shadow-lg: 0 10px 50px rgba(99, 102, 241, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(15, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 1px 0 var(--border-subtle);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo-img {
  height: 42px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  position: relative;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* 移动端菜单切换 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ---------- 英雄区 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
}

.hero-text {
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 3D 方块动画 */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 800px;
}

.hero-cube {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 12s infinite ease-in-out;
}

.cube-face {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.06);
  backdrop-filter: blur(4px);
}

.cube-face.front  { transform: translateZ(70px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(70px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(70px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(70px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(70px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(70px); }

@keyframes cubeRotate {
  0%, 20%   { transform: rotateX(-15deg) rotateY(0deg); }
  40%, 60%  { transform: rotateX(-15deg) rotateY(120deg); }
  80%, 100% { transform: rotateX(-15deg) rotateY(240deg); }
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: fadeInUp 2s ease 1s both;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 0.4; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- 通用章节 ---------- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- 游戏卡片 ---------- */
.games {
  padding: 100px 0;
  background: var(--bg-section);
  color: var(--text-dark);
}

.game-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
  padding: 48px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(40px);
}

.game-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.game-card:hover {
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

.game-card:last-child {
  margin-bottom: 0;
}

.game-card-right .game-images {
  order: 2;
}

.game-card-right .game-info {
  order: 1;
}

/* 图片网格 */
.game-img-grid {
  display: grid;
  gap: 12px;
}

.grid-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}

.grid-3 .img-wrapper:nth-child(1) {
  grid-column: 1 / -1;
}

.img-wrapper {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  aspect-ratio: 16/10;
}

.img-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.img-wrapper:hover img {
  transform: scale(1.05);
}

/* 游戏信息 */
.game-badge {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge-status,
.badge-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-status {
  background: #fef3c7;
  color: #92400e;
}

.badge-type {
  background: #ede9fe;
  color: var(--primary-dark);
}

.game-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.game-subtitle {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.game-desc p {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.game-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-section);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
}

.feature-icon {
  font-size: 1rem;
}

/* 进度条 */
.game-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.status-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-gray);
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 3px;
  transition: width 1.5s ease;
}

.progress-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- 关于我们 ---------- */
.about {
  padding: 100px 0;
  background: var(--bg-dark);
}

.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 32px 16px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.stat-item:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

.stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- 页脚 ---------- */
.footer {
  background: #0c0b14;
  padding: 60px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
}

.footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 12px;
}

.footer-slogan {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .game-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }

  .game-card-right .game-images {
    order: 0;
  }

  .game-card-right .game-info {
    order: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-visual {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: rgba(15, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    padding: 40px;
    transition: var(--transition);
    gap: 28px;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .game-card {
    padding: 24px;
  }

  .game-features {
    flex-direction: column;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-item {
    padding: 20px 12px;
  }

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

  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-title {
    font-size: 2rem;
  }
}

/* ---------- 选择文本 ---------- */
::selection {
  background: var(--primary);
  color: white;
}
