/* ============================================
   style.css - 皇冠体育中国官网
   完整CSS文件，包含所有样式与动画
   ============================================ */

/* ----- 全局重置与基础变量 ----- */
:root {
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #0f3460;
  --color-highlight: #e94560;
  --color-bg-light: #f4f7fc;
  --color-bg-white: #ffffff;
  --color-bg-card: #f1f5f9;
  --color-bg-alt: #f8fafc;
  --color-text: #1e293b;
  --color-text-muted: #475569;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --color-footer-bg: #1a1a2e;
  --color-footer-text: #cbd5e1;
  --color-footer-divider: #334155;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-speed: 0.3s;
  --border-radius: 12px;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-header: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-backtop: 0 4px 12px rgba(0,0,0,0.2);
  --max-width: 1200px;
  --content-width: 1100px;
  --narrow-width: 800px;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-light: #0f172a;
    --color-bg-white: #1e293b;
    --color-bg-card: #334155;
    --color-bg-alt: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-border: #475569;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.3);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--color-bg-light);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ----- 头部导航 ----- */
#header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-header);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#header > div {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

#header .logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#header .logo-area svg {
  width: 36px;
  height: 36px;
}

#header .logo-area span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

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

#nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-speed);
}

#nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-highlight);
  transition: width var(--transition-speed);
}

#nav a:hover::after,
#nav a:focus::after {
  width: 100%;
}

#nav a:hover {
  color: var(--color-highlight);
}

#mobileMenuBtn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: transform 0.2s;
}

#mobileMenuBtn:hover {
  transform: scale(1.1);
}

/* ----- Hero 区域 ----- */
#hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
  color: #fff;
  padding: 5rem 1rem 4rem;
  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% 50%, rgba(233,69,96,0.15) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(10%, 10%); }
}

#hero > div {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

#hero h1 {
  font-size: 2.8rem;
  margin: 0 0 0.8rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#hero p {
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

#hero .subtitle {
  font-size: 1.3rem;
}

#hero .description {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.8;
}

#hero .cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#hero .cta-group a {
  padding: 0.8rem 2rem;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

#hero .cta-primary {
  background: var(--color-highlight);
  color: #fff;
  box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}

#hero .cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,69,96,0.6);
}

#hero .cta-secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

#hero .cta-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* ----- 通用区域样式 ----- */
section {
  padding: 4rem 1rem;
}

section > div {
  max-width: var(--content-width);
  margin: 0 auto;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-highlight);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

section .section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ----- About 区域 ----- */
#about {
  background: var(--color-bg-white);
}

#about .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

#about .info-card {
  background: var(--color-bg-card);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

#about .info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

#about .info-card h3 {
  margin-top: 0;
}

#about .info-card ul {
  list-style: none;
  padding: 0;
}

#about .info-card li {
  margin-bottom: 0.8rem;
}

/* ----- Company 区域 ----- */
#company {
  background: var(--color-bg-alt);
}

#company .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

#company .timeline-card {
  background: var(--color-bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  position: relative;
  overflow: hidden;
}

#company .timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--color-highlight), var(--color-accent));
  border-radius: 2px;
}

#company .timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

/* ----- Services 区域 ----- */
#services {
  background: var(--color-bg-white);
}

#services .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

#services .service-card {
  background: var(--color-bg-card);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: all var(--transition-speed);
  position: relative;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid transparent;
}

#services .service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  border-color: var(--color-highlight);
  background: rgba(241,245,249,0.9);
}

@media (prefers-color-scheme: dark) {
  #services .service-card:hover {
    background: rgba(51,65,85,0.9);
  }
}

/* ----- Advantages 区域 ----- */
#advantages {
  background: var(--color-bg-alt);
}

#advantages .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

#advantages .advantage-card {
  text-align: center;
  background: var(--color-bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-speed);
  opacity: 0;
  transform: translateY(20px);
}

#advantages .advantage-card.visible {
  opacity: 1;
  transform: translateY(0);
}

#advantages .advantage-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

#advantages .advantage-card .icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ----- Testimonials 区域 ----- */
#testimonials {
  background: var(--color-bg-white);
}

#testimonials .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

#testimonials .testimonial-card {
  background: var(--color-bg-card);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  font-style: italic;
  transition: all var(--transition-speed);
  position: relative;
}

#testimonials .testimonial-card::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-highlight);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}

#testimonials .testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

#testimonials .testimonial-card p:last-child {
  font-weight: 600;
  margin-top: 0.5rem;
  font-style: normal;
}

/* ----- Insights 区域 ----- */
#insights {
  background: var(--color-bg-alt);
}

#insights .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

#insights article {
  background: var(--color-bg-white);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

#insights article::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--color-highlight), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-speed);
}

#insights article:hover::after {
  transform: scaleX(1);
}

#insights article:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

#insights article h3 {
  margin-top: 0;
}

#insights article .date {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

#insights article a {
  color: var(--color-highlight);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-speed);
}

#insights article a:hover {
  color: #d63851;
}

/* ----- FAQ 区域 ----- */
#faq {
  background: var(--color-bg-white);
}

#faq > div {
  max-width: var(--narrow-width);
}

#faq .faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

#faq .faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--color-text);
  transition: color var(--transition-speed);
}

#faq .faq-question:hover {
  color: var(--color-highlight);
}

#faq .faq-question .icon {
  font-size: 1.5rem;
  transition: transform var(--transition-speed);
}

#faq .faq-question[aria-expanded="true"] .icon {
  transform: rotate(45deg);
}

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

#faq .faq-answer.open {
  max-height: 300px;
  padding: 0.5rem 0.5rem;
}

/* ----- HowTo 区域 ----- */
#howto {
  background: var(--color-bg-alt);
}

#howto > div {
  max-width: var(--narrow-width);
}

#howto ol {
  list-style: decimal;
  padding-left: 1.5rem;
  line-height: 2;
}

#howto li {
  margin-bottom: 0.5rem;
}

/* ----- Contact 区域 ----- */
#contact {
  background: var(--color-bg-white);
}

#contact > div {
  max-width: var(--narrow-width);
}

#contact .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

#contact .info p {
  margin-bottom: 0.8rem;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact label {
  font-weight: 600;
}

#contact input,
#contact textarea {
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-light);
  color: var(--color-text);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(233,69,96,0.2);
}

#contact button[type="submit"] {
  background: var(--color-highlight);
  color: #fff;
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

#contact button[type="submit"]:hover {
  background: #d63851;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233,69,96,0.4);
}

/* ----- 页脚 ----- */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2rem 1rem 1rem;
}

footer > div:first-child {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  color: #fff;
  margin-bottom: 0.8rem;
}

footer ul {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
}

footer ul li {
  margin-bottom: 0.4rem;
}

footer a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color var(--transition-speed);
}

footer a:hover {
  color: var(--color-highlight);
}

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

/* ----- Back to Top 按钮 ----- */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-highlight);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-backtop);
  z-index: 999;
  display: none;
  transition: all var(--transition-speed);
  opacity: 0;
  transform: translateY(20px);
}

#backToTop.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#backToTop:hover {
  background: #d63851;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(233,69,96,0.5);
}

/* ----- 滚动动画 (IntersectionObserver 配合) ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ----- 响应式布局 ----- */
@media (max-width: 1024px) {
  #hero h1 {
    font-size: 2.2rem;
  }
  
  #hero .subtitle {
    font-size: 1.1rem;
  }
  
  section h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  #header > div {
    flex-wrap: wrap;
  }
  
  #nav {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
  }
  
  #nav ul {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }
  
  #nav a {
    display: block;
    padding: 0.5rem 0;
  }
  
  #mobileMenuBtn {
    display: block;
  }
  
  #hero {
    padding: 3.5rem 1rem 3rem;
  }
  
  #hero h1 {
    font-size: 1.8rem;
  }
  
  #hero .subtitle {
    font-size: 1rem;
  }
  
  #hero .cta-group a {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
  
  #about .grid {
    grid-template-columns: 1fr;
  }
  
  #contact .grid {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 3rem 1rem;
  }
  
  section h2 {
    font-size: 1.6rem;
  }
  
  #backToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.5rem;
  }
  
  #hero .subtitle {
    font-size: 0.9rem;
  }
  
  #hero .description {
    font-size: 0.85rem;
  }
  
  #hero .cta-group {
    flex-direction: column;
    align-items: center;
  }
  
  #hero .cta-group a {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
  
  #company .grid,
  #services .grid,
  #advantages .grid,
  #testimonials .grid,
  #insights .grid {
    grid-template-columns: 1fr;
  }
  
  footer > div:first-child {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ----- 暗色模式额外调整 ----- */
@media (prefers-color-scheme: dark) {
  #hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  }
  
  #about .info-card {
    background: #1e293b;
  }
  
  #services .service-card {
    background: #1e293b;
  }
  
  #testimonials .testimonial-card {
    background: #1e293b;
  }
  
  #insights article {
    background: #1e293b;
  }
  
  #contact input,
  #contact textarea {
    background: #0f172a;
    color: #e2e8f0;
  }
  
  #company .timeline-card {
    background: #1e293b;
  }
  
  #advantages .advantage-card {
    background: #1e293b;
  }
}

/* ----- 打印样式 ----- */
@media print {
  #header,
  #backToTop,
  #mobileMenuBtn {
    display: none;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
}