/* ============================================
   style.css - 九游会(J9)集团官方网站
   风格: 未来科技 · 渐变Banner · 毛玻璃 · 暗色
   ============================================ */

/* ---------- 全局重置与基础 ---------- */
:root {
  --primary: #6c63ff;
  --primary-dark: #5a52e0;
  --secondary: #e94560;
  --accent: #0f3460;
  --bg-dark: #1a1a2e;
  --bg-light: #16213e;
  --text-light: #e0e0ff;
  --text-dark: #1a1a2e;
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.12);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --radius: 16px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- 工具类 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #6c63ff, #e94560);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: #aaa;
  font-size: 1.1rem;
  margin-bottom: 50px;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-text {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.btn-text:hover {
  color: var(--secondary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26,26,46,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition);
}

.site-header.scrolled {
  background: rgba(26,26,46,0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}

.logo-link {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle .bar {
  display: block;
  width: 28px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: transform var(--transition);
}

.mobile-menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px,6px);
}
.mobile-menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px,-6px);
}

@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26,26,46,0.98);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-list.open {
    display: flex;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

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

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

.slide.active {
  opacity: 1;
}

.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, #6c63ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #e0e0ff;
}

.hero-desc {
  font-size: 1.2rem;
  color: #bbb;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.slider-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 3;
}

.slider-prev,
.slider-next {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
  background: rgba(255,255,255,0.2);
}

.slider-dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.3rem;
  }
  .hero-desc {
    font-size: 1rem;
  }
  .slider-controls {
    bottom: 20px;
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

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

.about-icon {
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #fff;
}

.card-text {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

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

.product-icon {
  margin-bottom: 20px;
}

.product-name {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #fff;
}

.product-desc {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

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

.service-icon {
  margin-bottom: 16px;
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #fff;
}

.service-text {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.news-card {
  overflow: hidden;
}

.news-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.news-content {
  padding: 0;
}

.news-date {
  font-size: 0.85rem;
  color: #888;
}

.news-title {
  font-size: 1.3rem;
  margin: 8px 0;
  color: #fff;
}

.news-excerpt {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.news-related {
  margin-top: 50px;
  padding: 30px;
  background: var(--glass-bg);
  border-radius: var(--radius);
}

.related-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #fff;
}

.related-list {
  list-style: none;
}

.related-list li {
  margin-bottom: 10px;
}

.related-list a {
  color: #6c63ff;
  text-decoration: none;
  transition: color var(--transition);
}

.related-list a:hover {
  color: #e94560;
}

/* ---------- Cases ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.case-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.case-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #fff;
}

.case-text {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.testimonials {
  margin-top: 50px;
}

.testimonial-card {
  margin-bottom: 20px;
}

.testimonial-text {
  font-style: italic;
  color: #ddd;
  margin-bottom: 10px;
}

.testimonial-author {
  color: #aaa;
  font-weight: 600;
}

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

.faq-item {
  margin-bottom: 16px;
  cursor: pointer;
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  padding: 16px 20px;
  list-style: none;
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  transition: transform var(--transition);
}

details[open] .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
  padding: 0 20px 20px;
  color: #ccc;
  line-height: 1.8;
}

/* ---------- HowTo ---------- */
.howto-content {
  max-width: 800px;
  margin: 0 auto;
}

.howto-step-title {
  font-size: 1.3rem;
  margin: 30px 0 12px;
  color: #fff;
}

.howto-steps {
  padding-left: 20px;
  color: #ccc;
  line-height: 2;
}

.howto-steps li {
  margin-bottom: 8px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

.contact-info p {
  margin-bottom: 10px;
  color: #ccc;
}

.contact-info-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #fff;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(0,0,0,0.4);
  padding: 60px 20px 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #6c63ff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin-bottom: 8px;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}

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

.back-to-top:hover {
  background: var(--primary-dark);
}

/* ---------- Search Modal ---------- */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.search-modal.open {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  width: 90%;
  max-width: 600px;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input {
  flex: 1;
  padding: 16px 24px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.1rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-form input:focus {
  border-color: var(--primary);
}

.search-form input::placeholder {
  color: #888;
}

.search-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 12px;
}

/* ---------- Animations ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .section-title {
    font-size: 1.8rem;
  }
  .about-grid,
  .products-grid,
  .news-grid,
  .cases-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* ---------- Light Mode ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg-dark: #f5f5ff;
    --bg-light: #e8e8ff;
    --text-light: #1a1a2e;
    --text-dark: #1a1a2e;
    --glass-bg: rgba(108,99,255,0.08);
    --glass-border: rgba(108,99,255,0.15);
    --shadow: 0 8px 32px rgba(0,0,0,0.1);
  }

  .nav-link {
    color: #555;
  }
  .nav-link:hover,
  .nav-link.active {
    color: #1a1a2e;
  }

  .site-header {
    background: rgba(245,245,255,0.85);
  }
  .site-header.scrolled {
    background: rgba(245,245,255,0.95);
  }

  .hero-desc {
    color: #555;
  }

  .slide-content .hero-title {
    -webkit-text-fill-color: #1a1a2e;
    background: none;
  }

  .section-title {
    -webkit-text-fill-color: #1a1a2e;
    background: none;
  }

  .card-text,
  .product-desc,
  .service-text,
  .news-excerpt,
  .case-text,
  .faq-answer,
  .howto-steps,
  .contact-info p {
    color: #444;
  }

  .testimonial-text {
    color: #333;
  }

  .footer-links a {
    color: #666;
  }

  .footer-bottom {
    color: #666;
  }
}