/* ============================================================
   皇冠体育 - 皇冠网登入 | 官方体育平台
   style.css — 完整内联样式表
   响应式布局 · 暗色模式 · 毛玻璃效果 · 滚动动画 · hover动画
   ============================================================ */

/* ---------- 全局重置 & 基础 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f4f6fc;
  color: #1a1a2e;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

/* ---------- 暗色模式 ---------- */
body.dark {
  background: #0d1117;
  color: #e6edf3;
}

body.dark header,
body.dark footer {
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
}

body.dark .card,
body.dark article,
body.dark section > div > article,
body.dark details {
  background: rgba(30, 35, 48, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e6edf3;
}

body.dark a {
  color: #58a6ff;
}

body.dark button,
body.dark [role="button"],
body.dark .btn {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
}

body.dark #darkModeToggle svg {
  stroke: #f0c040;
}

/* ---------- 滚动动画 (通用) ---------- */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

section {
  animation: fadeInUp 0.6s ease both;
}

/* ---------- 渐变Banner ---------- */
#hero {
  background: linear-gradient(135deg, #0f3460 0%, #16213e 40%, #e94560 100%);
  color: #fff;
  padding: 4rem 2rem;
  border-radius: 0 0 3rem 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

#hero > div:first-child {
  flex: 1 1 45%;
}

#hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

#hero p {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  opacity: 0.9;
  margin-bottom: 2rem;
}

#hero [role="button"] {
  display: inline-block;
  padding: 0.75rem 2rem;
  margin-right: 1rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  background: #fff;
  color: #0f3460;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

#hero [role="button"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

#hero svg {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

/* ---------- 圆角卡片 / 毛玻璃 ---------- */
.card, article, section > div > article, details {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.3);
}

.card:hover, article:hover, details:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ---------- 头部导航 ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.3s;
}

nav[aria-label="主导航"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 1.2rem;
}

nav ul li a {
  text-decoration: none;
  color: #1a1a2e;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #e94560;
  transition: width 0.25s;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a:hover {
  color: #e94560;
}

nav div {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

nav button, nav [role="button"] {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 30px;
  transition: all 0.2s;
}

nav [role="button"] {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  padding: 0.45rem 1.2rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

nav [role="button"]:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}

/* ---------- 通用section ---------- */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3.5rem 0;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #e94560, #0f3460);
  border-radius: 4px;
  margin-top: 0.3rem;
}

/* ---------- about ---------- */
#about p {
  max-width: 800px;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* ---------- products / services ---------- */
#products > div, #services > div, #resources > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

#products article, #services article, #resources article {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 1.8rem;
  transition: all 0.3s;
}

#products h3, #services h3, #resources h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  color: #e94560;
}

#resources article a {
  display: inline-block;
  margin-top: 0.8rem;
  color: #0f3460;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

#resources article a:hover {
  border-bottom-color: #e94560;
}

/* ---------- features ---------- */
#features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

#features li {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.2rem 1.5rem;
  border-radius: 20px;
  font-size: 1rem;
  transition: all 0.25s;
  border: 1px solid rgba(255,255,255,0.4);
}

#features li:hover {
  background: rgba(233,69,96,0.08);
  transform: scale(1.02);
}

#features li strong {
  color: #e94560;
}

/* ---------- howto ---------- */
#howto ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#howto li {
  font-size: 1.02rem;
}

/* ---------- faq ---------- */
#faq div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

details {
  padding: 1.2rem 1.5rem;
}

details summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

details summary::marker {
  display: none;
}

details summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 0;
  transition: transform 0.2s;
  color: #e94560;
}

details[open] summary::after {
  transform: rotate(180deg);
}

details p {
  margin-top: 0.8rem;
  opacity: 0.9;
}

/* ---------- contact ---------- */
#contact address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.8rem;
  border-radius: 24px;
  max-width: 500px;
}

#contact a {
  color: #e94560;
  text-decoration: none;
  font-weight: 500;
}

/* ---------- footer ---------- */
footer {
  background: rgba(15, 52, 96, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  transition: background 0.3s;
}

footer > div {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

footer nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

footer nav a {
  text-decoration: none;
  color: #1a1a2e;
  font-size: 0.9rem;
  transition: color 0.2s;
}

footer nav a:hover {
  color: #e94560;
}

footer p {
  font-size: 0.85rem;
  opacity: 0.8;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  nav[aria-label="主导航"] {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
  }

  nav ul {
    justify-content: center;
    gap: 0.8rem;
  }

  nav ul li a {
    font-size: 0.85rem;
  }

  #hero {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.2rem;
  }

  #hero > div:first-child {
    flex: 1 1 100%;
  }

  #hero [role="button"] {
    margin: 0.3rem;
  }

  #products > div, #services > div, #resources > div {
    grid-template-columns: 1fr;
  }

  #features ul {
    grid-template-columns: 1fr;
  }

  footer > div {
    flex-direction: column;
    text-align: center;
  }

  footer nav {
    justify-content: center;
  }

  section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  nav ul {
    gap: 0.5rem;
  }

  nav [role="button"] {
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
  }

  #hero h1 {
    font-size: 1.6rem;
  }
}

/* ---------- 暗色下细节微调 ---------- */
body.dark #hero [role="button"] {
  background: #e94560;
  color: #fff;
}

body.dark #features li {
  background: rgba(30,35,48,0.6);
  border-color: rgba(255,255,255,0.08);
}

body.dark #contact address {
  background: rgba(30,35,48,0.6);
}

body.dark footer {
  background: rgba(13,17,23,0.8);
  border-top-color: rgba(255,255,255,0.05);
}

body.dark footer nav a {
  color: #8b949e;
}

body.dark footer nav a:hover {
  color: #58a6ff;
}

/* ---------- 辅助动画 ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

#hero svg {
  animation: float 4s ease-in-out infinite;
}

/* ---------- 按钮通用hover ---------- */
[role="button"], button, .btn {
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[role="button"]:active, button:active {
  transform: scale(0.96);
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 10px;
}

body.dark ::-webkit-scrollbar-track {
  background: #161b22;
}

body.dark ::-webkit-scrollbar-thumb {
  background: #e94560;
}

/* ---------- 暗色模式切换按钮 ---------- */
#darkModeToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  transition: background 0.2s;
}

#darkModeToggle:hover {
  background: rgba(233,69,96,0.1);
}

body.dark #darkModeToggle {
  background: rgba(255,255,255,0.08);
}

body.dark #darkModeToggle:hover {
  background: rgba(233,69,96,0.2);
}