/* ============================================
   Game Platform - Fantasy Dragon Gaming
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #1a1a3e;
  --bg-card-hover: #222260;
  --bg-nav: rgba(10, 10, 26, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #b0b0cc;
  --text-muted: #7777aa;
  --accent-gold: #ffd700;
  --accent-orange: #ff8c00;
  --accent-red: #ff3b3b;
  --accent-blue: #4d9fff;
  --accent-purple: #8b5cf6;
  --gradient-gold: linear-gradient(135deg, #ffd700, #ff8c00);
  --gradient-fire: linear-gradient(135deg, #ff3b3b, #ff8c00);
  --gradient-hero: linear-gradient(180deg, #0a0a1a 0%, #1a1a3e 100%);
  --border-color: rgba(255, 215, 0, 0.15);
  --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --font-main: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 26, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-logo-text {
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

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

.nav-link {
  position: relative;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: none;
}

.nav-mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   Hero Banner
   ============================================ */
.hero-banner {
  position: relative;
  margin-top: 70px;
  height: 480px;
  overflow: hidden;
}

.banner-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  padding: 0 24px;
}

.banner-content h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  line-height: 1.2;
}

.banner-content h1 .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-content p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: var(--gradient-gold);
  color: #0a0a1a;
  font-size: 16px;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

.banner-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dot.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.banner-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

.banner-arrow {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.3s ease;
}

.banner-arrow:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--accent-gold);
}

/* ============================================
   Section Common
   ============================================ */
.section {
  padding: 60px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
}

.section-title-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.section-more {
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

.section-more:hover {
  color: var(--accent-gold);
}

/* ============================================
   Tab Switch
   ============================================ */
.tab-container {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 30px;
  width: fit-content;
}

.tab-btn {
  padding: 10px 24px;
  font-size: 14px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ============================================
   Recommend Games
   ============================================ */
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.recommend-card {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.recommend-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.recommend-img {
  width: 200px;
  min-height: 130px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}

.recommend-img .game-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 10px;
  background: var(--gradient-fire);
  border-radius: 20px;
  font-size: 11px;
  color: white;
  font-weight: 600;
}

.recommend-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recommend-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.recommend-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.recommend-tag {
  padding: 2px 10px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  border-radius: 20px;
  font-size: 12px;
}

.recommend-size {
  color: var(--text-muted);
  font-size: 12px;
}

.recommend-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.recommend-actions {
  display: flex;
  gap: 10px;
}

.btn-play {
  padding: 8px 24px;
  background: var(--gradient-gold);
  color: #0a0a1a;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.btn-play:hover {
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

.btn-gift {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  font-size: 13px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.btn-gift:hover {
  background: rgba(255, 140, 0, 0.1);
}

/* ============================================
   All Games Grid
   ============================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.game-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
}

.game-icon .hot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  padding: 2px 8px;
  background: var(--accent-red);
  border-radius: 0 0 0 10px;
  font-size: 10px;
  color: white;
  font-weight: 600;
}

.game-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card .game-type {
  color: var(--accent-purple);
  font-size: 12px;
  margin-bottom: 4px;
}

.game-card .game-size {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.game-card .btn-play {
  width: 100%;
  padding: 8px;
  font-size: 13px;
}

/* Game filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ============================================
   Customer Service Page
   ============================================ */
.service-hero {
  margin-top: 70px;
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
}

.service-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
}

.service-hero h1 .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-hero p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.service-contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.contact-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.contact-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.contact-card .contact-value {
  color: var(--accent-gold);
  font-size: 20px;
  font-weight: 700;
  margin-top: 12px;
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(255, 215, 0, 0.3);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--accent-gold);
}

.faq-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

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

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-link-group h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-link-group a {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.footer-link-group a:hover {
  color: var(--accent-gold);
}

.footer-warning {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 20px;
}

.footer-warning p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

.footer-bottom a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: var(--accent-gold);
}

.footer-icp {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   Page Header (for sub pages)
   ============================================ */
.page-header {
  margin-top: 70px;
  padding: 60px 24px 40px;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-header h1 .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ============================================
   Game Stats Bar
   ============================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   Gift Card (for tab content)
   ============================================ */
.gift-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gift-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.gift-item:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: var(--bg-card-hover);
}

.gift-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 140, 0, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.gift-info {
  flex: 1;
}

.gift-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.gift-info p {
  color: var(--text-muted);
  font-size: 12px;
}

.gift-btn {
  padding: 8px 20px;
  background: var(--gradient-fire);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.gift-btn:hover {
  box-shadow: 0 4px 15px rgba(255, 59, 59, 0.3);
  transform: translateY(-1px);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .service-contacts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero-banner {
    height: 360px;
  }

  .banner-content h1 {
    font-size: 28px;
  }

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

  .recommend-img {
    width: 100%;
    min-height: 160px;
  }

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

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

  .service-contacts {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-links {
    gap: 30px;
  }

  .section-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .game-card {
    padding: 14px;
  }

  .game-icon {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }

  .hero-banner {
    height: 300px;
  }

  .banner-content h1 {
    font-size: 22px;
  }

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

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.15);
  }
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
}
