/* ===== CSS Variables & Reset ===== */
:root {
  --primary: #0a0a23;
  --secondary: #f0c040;
  --accent: #d4a830;
  --bg-light: #f5f7fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-light: #1a1a2e;
  --text-muted: #555;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient-banner: linear-gradient(135deg, #0a0a23 0%, #1a1a4e 40%, #2a2a6e 100%);
  --gradient-gold: linear-gradient(135deg, #f0c040, #d4a830, #b8860b);
  --nav-height: 70px;
}

body.dark-mode {
  --bg-light: #0a0a23;
  --bg-card: rgba(26, 26, 62, 0.9);
  --text-light: #e0e0e0;
  --text-muted: #aaa;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(26, 26, 62, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-banner: linear-gradient(135deg, #050510 0%, #0f0f30 40%, #1a1a50 100%);
}

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

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

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

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

section {
  animation: fadeInUp 0.7s ease-out both;
}

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:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }

/* ===== Header & Navigation ===== */
header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 10, 35, 0.92);
  border-bottom: 1px solid rgba(240, 192, 64, 0.15);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

body.dark-mode header {
  background: rgba(5, 5, 16, 0.95);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  height: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav ul li {
  position: relative;
}

nav ul a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
  display: block;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform var(--transition);
}

nav ul a:hover {
  color: var(--secondary);
  background: rgba(240, 192, 64, 0.08);
}

nav ul a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

nav ul a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ===== Dark Mode Toggle ===== */
#darkModeToggle {
  background: rgba(240, 192, 64, 0.1);
  border: 1px solid rgba(240, 192, 64, 0.3);
  color: var(--secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

#darkModeToggle:hover {
  background: rgba(240, 192, 64, 0.2);
  transform: rotate(15deg) scale(1.05);
  border-color: var(--secondary);
}

/* ===== Mobile Menu Button ===== */
nav > button[aria-label="菜单"] {
  display: none;
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
  transition: transform var(--transition);
}

nav > button[aria-label="菜单"]:hover {
  transform: scale(1.1);
}

/* ===== Main Content ===== */
main {
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

section {
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
}

section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

body.dark-mode section:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Hero Section (Banner) ===== */
#home {
  background: var(--gradient-banner);
  color: #fff;
  padding: 4rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: none;
}

#home::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(240, 192, 64, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
}

#home:hover::before {
  animation-duration: 4s;
}

#home h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

#home p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

#home > div > div {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ===== Button Styles ===== */
[role="button"] {
  display: inline-block;
  background: var(--gradient-gold);
  color: var(--primary);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(240, 192, 64, 0.3);
  position: relative;
  overflow: hidden;
}

[role="button"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

[role="button"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(240, 192, 64, 0.4);
  background: linear-gradient(135deg, #d4a830, #b8860b);
}

[role="button"]:hover::before {
  left: 100%;
}

[role="button"]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

#home [role="button"]:last-child {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  box-shadow: none;
}

#home [role="button"]:last-child:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-3px);
}

/* ===== Headings ===== */
h1 {
  font-size: 2.5rem;
  color: var(--primary);
  line-height: 1.2;
}

body.dark-mode h1 {
  color: var(--secondary);
}

h2 {
  font-size: 1.8rem;
  color: var(--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-gold);
  border-radius: 4px;
  transition: width var(--transition);
}

h2:hover::after {
  width: 100px;
}

body.dark-mode h2 {
  color: var(--secondary);
}

/* ===== Lists ===== */
section ul, section ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

section li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

section ul li strong {
  color: var(--secondary);
}

body.dark-mode section ul li strong {
  color: #f0c040;
}

/* ===== Details / FAQ ===== */
details {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(240, 192, 64, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(240, 192, 64, 0.1);
  transition: all var(--transition);
  cursor: pointer;
}

details:hover {
  background: rgba(240, 192, 64, 0.08);
  border-color: rgba(240, 192, 64, 0.2);
}

body.dark-mode details {
  background: rgba(240, 192, 64, 0.03);
  border-color: rgba(240, 192, 64, 0.08);
}

body.dark-mode details:hover {
  background: rgba(240, 192, 64, 0.06);
}

summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: 1.05rem;
  color: var(--text-light);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

summary::marker {
  color: var(--secondary);
  font-size: 1.2rem;
}

details[open] summary {
  color: var(--secondary);
}

details p {
  margin-top: 0.75rem;
  padding-left: 0.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Address / Contact ===== */
address {
  font-style: normal;
  background: rgba(240, 192, 64, 0.03);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--secondary);
  margin-top: 0.5rem;
}

address p {
  margin-bottom: 0.4rem;
}

/* ===== Links ===== */
a {
  color: #1a5a8a;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

body.dark-mode a {
  color: #8ab4f8;
}

body.dark-mode a:hover {
  color: var(--secondary);
}

/* ===== Footer ===== */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(240, 192, 64, 0.1);
}

footer > div {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

footer ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

footer a {
  color: var(--secondary);
  font-size: 0.9rem;
  transition: opacity var(--transition);
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== Back to Top ===== */
#backToTop {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gradient-gold);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(240, 192, 64, 0.3);
  z-index: 1000;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
}

#backToTop.show {
  opacity: 1;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 30px rgba(240, 192, 64, 0.4);
  background: linear-gradient(135deg, #d4a830, #b8860b);
}

#backToTop:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ===== Accessibility ===== */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  section {
    padding: 1.75rem 1.5rem;
  }
  
  #home {
    padding: 3rem 1.5rem;
  }
  
  #home h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  nav {
    padding: 0 1rem;
  }
  
  nav > button[aria-label="菜单"] {
    display: block;
  }
  
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 35, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(240, 192, 64, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    gap: 0;
    z-index: 999;
  }
  
  nav ul.open {
    display: flex;
  }
  
  nav ul a {
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }
  
  nav ul a::after {
    display: none;
  }
  
  nav ul a:hover {
    background: rgba(240, 192, 64, 0.1);
  }
  
  main {
    padding: 0 1rem;
    margin: 1.5rem auto;
  }
  
  section {
    padding: 1.25rem 1.25rem;
    border-radius: 12px;
  }
  
  #home {
    padding: 2.5rem 1.25rem;
  }
  
  #home h1 {
    font-size: 1.8rem;
  }
  
  #home p {
    font-size: 1rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  #home > div > div {
    flex-direction: column;
    align-items: center;
  }
  
  [role="button"] {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  footer ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  #backToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  section {
    padding: 1rem;
  }
  
  #home h1 {
    font-size: 1.6rem;
  }
  
  #home p {
    font-size: 0.95rem;
  }
  
  h2 {
    font-size: 1.35rem;
  }
  
  details {
    padding: 0.6rem 0.8rem;
  }
  
  address {
    padding: 1rem;
  }
}

/* ===== Print Styles ===== */
@media print {
  header, footer, #backToTop, #darkModeToggle, nav > button {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}