/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --bg-dark: #0f0f1e;
  --bg-darker: #0a0a14;
  --bg-card: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b8a;
  --border-color: #2a2a3e;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: 'Inter', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #0f0f1e 100%);
  overflow: hidden;
}

#particleCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1000;
  background: rgba(15, 15, 30, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-sizing: border-box;
  overflow-x: hidden;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-1);
  border-radius: 10px;
  position: relative;
  box-shadow: var(--shadow-glow);
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s ease;
}

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

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-btn {
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: white;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

.mobile-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
}

.mobile-lang-switcher {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Hero Section */
.hero-section {
  padding: 120px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-text {
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

/* Hero Carousel */
.hero-carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  box-sizing: border-box;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.carousel-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

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

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

/* Section Styles */
section {
  padding: 80px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Screenshots Section */
.screenshots-section {
  background: rgba(26, 26, 46, 0.5);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.screenshot-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.screenshot-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.3);
  border-color: var(--primary-color);
}

.screenshot-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-darker);
  position: relative;
}

.screenshot-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.screenshot-card:hover .screenshot-image img {
  transform: scale(1.1);
}

.screenshot-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.screenshot-card:hover .screenshot-image::after {
  opacity: 1;
}

/* Story Section */
.story-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.story-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.story-image img {
  width: 100%;
  height: auto;
  display: block;
}

.story-text {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.8;
}

.story-text p {
  margin-bottom: 1.5rem;
}

/* Features Section */
.features-section {
  background: rgba(26, 26, 46, 0.5);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

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

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

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

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-desc {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.review-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.review-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-1);
}

.review-name {
  font-weight: 600;
  color: var(--text-primary);
}

.review-time {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.review-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.review-rating {
  color: #fbbf24;
  font-size: 1.125rem;
}

/* Download Section */
.download-section {
  background: rgba(26, 26, 46, 0.5);
}

.download-content {
  max-width: 800px;
  margin: 0 auto;
}

.download-platforms {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.download-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  min-width: 150px;
}

.download-btn:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.platform-icon {
  font-size: 3rem;
}

.platform-name {
  font-weight: 600;
  font-size: 1.125rem;
}

.system-requirements {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.req-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.req-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.req-item {
  color: var(--text-secondary);
  padding: 0.5rem 0;
}

.req-item strong {
  color: var(--text-primary);
}

/* Footer */
.main-footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info {
  color: var(--text-muted);
}

.footer-info a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 968px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .story-content {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .section-title {
    font-size: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

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

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

  .hero-title {
    font-size: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero-subtitle {
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .screenshots-grid,
  .features-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .download-platforms {
    flex-direction: column;
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    width: 100%;
  }

  .nav-wrapper {
    padding: 1rem 15px;
  }

  .main-header {
    padding: 0;
  }
}
