/* ============================================================
   style.css - 必威官网 (xyn-betway.com)
   风格: 现代渐变 + 毛玻璃 + 暗色/亮色模式
   生成: 资深UI/前端/SEO/EEAT
   ============================================================ */

/* ---------- Reset & Variables ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f0f1a;
  --card-bg: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.15);
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --accent: #ff6b35;
  --accent2: #ff8c5a;
  --gradient: linear-gradient(135deg, #ff6b35, #ff4d4d);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --nav-h: 70px;
}

.light-mode {
  --bg: #f5f5fa;
  --card-bg: rgba(255, 255, 255, 0.8);
  --glass: rgba(255, 255, 255, 0.6);
  --border: rgba(0, 0, 0, 0.1);
  --text: #1a1a2e;
  --text-muted: #555;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ---------- Base ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header & Navigation ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.logo svg {
  width: 40px;
  height: 40px;
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  transition: color 0.3s;
}

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

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

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

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

.theme-toggle,
.search-toggle,
.menu-toggle {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.3s;
}

.theme-toggle:hover,
.search-toggle:hover,
.menu-toggle:hover {
  background: var(--card-bg);
}

.menu-toggle {
  display: none;
}

/* ---------- Search Overlay ---------- */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 90%;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-results {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results div {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.search-results div:hover {
  color: var(--accent);
}

.search-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* ---------- Hero Banner ---------- */
.hero {
  margin-top: var(--nav-h);
  position: relative;
  height: 90vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btn {
  display: inline-block;
  padding: 16px 40px;
  background: var(--gradient);
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6);
}

.hero-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.hero-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}

.hero-indicators button.active {
  background: var(--accent);
}

/* ---------- General Sections ---------- */
section {
  padding: 80px 0;
}

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

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 50px;
  font-size: 1.1rem;
}

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

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(30px);
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.card-icon svg {
  width: 50px;
  height: 50px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 30px;
  opacity: 0;
  transform: translateX(-20px);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.6s;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
}

.timeline-item h3 {
  font-size: 1.2rem;
}

.timeline-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.team-card {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  transition: transform 0.3s;
}

.team-card:hover {
  transform: translateY(-5px);
}

.team-avatar svg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.team-card h4 {
  font-size: 1.1rem;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.3s;
}

.faq-question:hover {
  background: rgba(255, 107, 53, 0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s;
  padding: 0 24px;
  color: var(--text-muted);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}

/* ---------- HowTo ---------- */
.howto-steps {
  counter-reset: step;
}

.howto-step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px 20px 60px;
  margin-bottom: 16px;
  position: relative;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 20px;
  width: 30px;
  height: 30px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.howto-step h4 {
  margin-bottom: 6px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info p {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

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

.footer-col h4 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

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

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

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* ---------- Back to Top ---------- */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.3s;
}

.back-top:hover {
  transform: scale(1.1);
}

.back-top.show {
  display: flex;
}

/* ---------- Mobile Navigation ---------- */
.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  display: none;
  flex-direction: column;
  padding: 30px 20px;
  overflow-y: auto;
}

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

.mobile-nav a {
  padding: 14px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  nav ul {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 70vh;
    min-height: 400px;
  }

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

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

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-btn {
    padding: 12px 28px;
    font-size: 1rem;
  }

  section {
    padding: 50px 0;
  }
}

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

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.count-up {
  display: inline-block;
}

/* ---------- Misc ---------- */
.badge {
  display: inline-block;
  background: var(--gradient);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.article-card h3 {
  margin-bottom: 8px;
}

.article-card .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.article-card p {
  color: var(--text-muted);
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent);
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

.partner-logos svg {
  width: 100px;
  height: 50px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.partner-logos svg:hover {
  opacity: 1;
}

.map-placeholder {
  width: 100%;
  height: 300px;
  background: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
}