/* ========================================
   9Sword Game Studio - Official Website
   style.css
   ======================================== */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #1a1a25;
  --bg-nav: rgba(10, 10, 15, 0.9);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #4ecdc4;
  --accent-hover: #6ee0d8;
  --accent-secondary: #ffb86c;
  --border: #2a2a3a;
  --nav-height: 90px;
  --max-width: 1200px;
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---- Utility ---- */
.section {
  padding: 100px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  height: var(--nav-height);
  transition: transform 0.3s ease;
}

.header.hidden {
  transform: translateY(-100%);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 6px;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .logo-text {
    font-size: 1rem;
  }
}

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(78, 205, 196, 0.1);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(78, 205, 196, 0.15);
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-mobile.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-link-mobile {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 24px;
  transition: color 0.3s ease;
}

.nav-link-mobile:hover,
.nav-link-mobile.active {
  color: var(--accent);
}

.nav-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 184, 108, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 50%);
}
.hero-bg::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 48px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent), #3dbdb5);
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.3);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(78, 205, 196, 0.4);
}

/* ========================================
   GAMES CAROUSEL
   ======================================== */
.games-section {
  padding-top: 40px;
  padding-bottom: 100px;
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.carousel-track-wrapper {
  overflow: hidden;
  flex: 1;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card {
  min-width: 100%;
  padding: 0 8px;
}

.game-card-inner {
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.game-banner {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.game-banner-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.15), transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
}

.game-banner-content {
  position: relative;
  text-align: center;
  z-index: 1;
  background: rgba(10,10,15,0.55);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

.game-name {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.game-name-en {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
}

.game-info {
  padding: 20px 24px;
  position: relative;
  z-index: 2;
}

.game-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.game-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.2);
  border-radius: 20px;
  font-weight: 500;
}

/* Carousel Buttons */
.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  width: 28px;
  border-radius: 5px;
}

/* ========================================
   NEWS SECTION
   ======================================== */
.news-section {
  background: var(--bg-secondary);
  max-width: 100%;
  padding: 100px 24px;
}

.news-section .section-header {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.news-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-item:hover {
  border-color: rgba(78, 205, 196, 0.3);
  transform: translateX(4px);
}

.news-date {
  text-align: center;
  flex-shrink: 0;
  min-width: 70px;
}

.news-day {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.news-month {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.news-content {
  flex: 1;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.news-item:hover .news-title {
  color: var(--accent);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-content {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.about-text {
  flex: 1;
}

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

.about-info {
  flex-shrink: 0;
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.info-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.info-value {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.info-link {
  color: var(--accent);
  transition: color 0.3s ease;
}

.info-link:hover {
  color: var(--accent-hover);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

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

.contact-card:hover {
  border-color: rgba(78, 205, 196, 0.3);
  transform: translateY(-4px);
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.contact-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-link {
  color: var(--accent);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--accent-hover);
}

.contact-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-info {
  margin-bottom: 20px;
}

.footer-dev,
.footer-addr,
.footer-email {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.footer-email a {
  color: var(--accent);
}

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

.footer-legal {
  margin-bottom: 16px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

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

.footer-sep {
  color: var(--border);
  margin: 0 12px;
}

.footer-icp {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-icp a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.footer-icp-sep {
  color: var(--border);
  font-size: 0.8rem;
}

.beian-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 3px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.footer-note {
  color: rgba(255,255,255,0.15);
  font-size: 0.75rem;
  line-height: 1.8;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

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

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  .about-content {
    flex-direction: column;
  }

  .about-info {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-mobile {
    display: flex;
  }

  .logo-img {
    height: 38px;
  }

  .section {
    padding: 60px 20px;
  }

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

  .game-banner {
    height: 240px;
  }

  .game-name {
    font-size: 1.6rem;
  }

  .carousel-container {
    gap: 8px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .news-item {
    flex-direction: column;
    gap: 12px;
  }

  .news-date {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .hero {
    min-height: 90vh;
    padding-top: 100px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .game-banner {
    height: 200px;
  }

  .game-name {
    font-size: 1.3rem;
  }

  .hero-btn {
    padding: 12px 36px;
    font-size: 0.9rem;
  }
}
