/* style.css - 沙巴体育官方APP */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f6fa;
  --bg-card: rgba(255,255,255,0.85);
  --text: #1a1a2e;
  --text-muted: #5a5a7a;
  --accent: #1a1a2e;
  --accent2: #ffd700;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.06);
  --radius: 20px;
  --glass-bg: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.3);
  --hero-start: #0f0c29;
  --hero-mid: #302b63;
  --hero-end: #24243e;
  --nav-bg: rgba(255,255,255,0.7);
  --nav-blur: 12px;
  --footer-bg: #0f0c29;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d1a;
    --bg-card: rgba(30,30,50,0.85);
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --glass-bg: rgba(20,20,40,0.6);
    --glass-border: rgba(255,255,255,0.1);
    --nav-bg: rgba(13,13,26,0.7);
    --hero-start: #0a0a1a;
    --hero-mid: #1a1a3e;
    --hero-end: #0d0d20;
  }
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }
img, svg { max-width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Navigation */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur));
  -webkit-backdrop-filter: blur(var(--nav-blur));
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
nav .logo { font-weight: 800; font-size: 1.4rem; color: var(--accent2); letter-spacing: -0.5px; }
nav ul { display: flex; gap: 28px; list-style: none; }
nav ul li a { font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color var(--transition), color var(--transition); position: relative; }
nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent2); transition: width var(--transition); }
nav ul li a:hover::after { width: 100%; }
nav ul li a:hover { color: var(--accent2); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--text); }
@media (max-width: 768px) {
  nav ul { display: none; flex-direction: column; background: var(--nav-bg); backdrop-filter: blur(16px); position: absolute; top: 100%; left: 0; right: 0; padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--border); }
  nav ul.open { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-mid), var(--hero-end));
  color: #fff; padding: 100px 0 80px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,215,0,0.08), transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0,0) scale(1); opacity: 0.6; }
  100% { transform: translate(10%,10%) scale(1.2); opacity: 1; }
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; margin-bottom: 16px; font-weight: 900; letter-spacing: -1px; line-height: 1.2; }
.hero h1 span { font-size: 1.2rem; display: block; margin-top: 8px; font-weight: 400; opacity: 0.85; }
.hero p { font-size: 1.15rem; max-width: 680px; margin: 0 auto 36px; opacity: 0.9; line-height: 1.8; }
.hero .btn-group { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero .btn {
  display: inline-block; padding: 16px 40px; border-radius: 60px; font-weight: 700; font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer; border: none;
}
.hero .btn-primary { background: var(--accent2); color: #1a1a2e; }
.hero .btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); backdrop-filter: blur(4px); }
.hero .btn:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
.hero .btn-primary:hover { background: #ffe44d; }

/* Sections */
section { padding: 80px 0; opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section h2 { font-size: 2.2rem; margin-bottom: 32px; text-align: center; font-weight: 800; letter-spacing: -0.5px; }
section h3 { font-size: 1.3rem; margin-bottom: 12px; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.card ol { margin: 16px 0 0 20px; line-height: 2.2; }
.card ol li strong { color: var(--accent2); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; cursor: pointer; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.05rem;
  transition: color var(--transition);
}
.faq-question::after { content: '+'; font-size: 1.6rem; font-weight: 300; transition: transform 0.4s ease, color var(--transition); }
.faq-item.open .faq-question::after { transform: rotate(45deg); color: var(--accent2); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding var(--transition); padding-top: 0; color: var(--text-muted); }
.faq-item.open .faq-answer { max-height: 400px; padding-top: 14px; }

/* Carousel */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); }
.carousel-inner { display: flex; transition: transform 0.5s ease; }
.carousel-item { min-width: 100%; padding: 48px 40px; text-align: center; }
.carousel-item h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--accent2); }
.carousel-controls { display: flex; justify-content: center; gap: 14px; margin-top: 20px; padding-bottom: 24px; }
.carousel-btn {
  background: var(--accent); color: #fff; border: none; padding: 10px 24px; border-radius: 40px; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; transition: background var(--transition), transform var(--transition);
}
.carousel-btn:hover { background: var(--accent2); color: #1a1a2e; transform: scale(1.05); }

/* Footer */
footer { background: var(--footer-bg); color: #b0b0c8; padding: 60px 0 0; }
footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
footer h4 { color: #fff; margin-bottom: 16px; font-size: 1.1rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer ul li a { color: #8888aa; transition: color var(--transition); }
footer ul li a:hover { color: var(--accent2); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 40px; padding: 24px 24px; text-align: center; font-size: 0.82rem; color: #6666aa; }

/* Back to top */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; background: var(--accent2); color: #1a1a2e; border: none;
  border-radius: 50%; width: 52px; height: 52px; font-size: 1.6rem; cursor: pointer; display: none;
  align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(255,215,0,0.3); z-index: 99;
  transition: transform var(--transition), box-shadow var(--transition);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(255,215,0,0.5); }

/* Misc */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.badge { display: inline-block; background: var(--accent2); color: #1a1a2e; padding: 6px 16px; border-radius: 30px; font-size: 0.85rem; font-weight: 700; }
hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  section { padding: 50px 0; }
  section h2 { font-size: 1.6rem; }
  .card { padding: 20px; }
  .carousel-item { padding: 32px 20px; }
  footer .container { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .hero .btn { padding: 14px 28px; font-size: 0.9rem; }
  footer .container { grid-template-columns: 1fr; }
}