/* style.css - 米兰体育官方网站 */
:root {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --accent: #c00;
  --accent-hover: #a00;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.3);
  --gradient: linear-gradient(135deg, #1a1a2e 0%, #c00 50%, #1a1a2e 100%);
  --radius: 16px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.85);
  --text-primary: #e0e0f0;
  --text-secondary: #a0a0c0;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(26, 26, 46, 0.4);
  --glass-border: rgba(255, 255, 255, 0.15);
  --gradient: linear-gradient(135deg, #0f0f1a 0%, #700 50%, #0f0f1a 100%);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

/* 头部导航 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

nav a[aria-label="米兰体育首页"] {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
}

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

nav ul li a:hover::after,
nav ul li a:focus-visible::after {
  width: 60%;
}

nav ul li a:hover {
  color: var(--accent);
}

#darkModeToggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

#darkModeToggle:hover {
  transform: scale(1.1);
  background: var(--accent);
  border-color: var(--accent);
}

/* 主内容 */
main {
  padding-top: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* 通用section */
section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  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: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; }
section:nth-child(10) { animation-delay: 0.9s; }
section:nth-child(11) { animation-delay: 1.0s; }
section:nth-child(12) { animation-delay: 1.1s; }
section:nth-child(13) { animation-delay: 1.2s; }
section:nth-child(14) { animation-delay: 1.3s; }

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

/* Hero 区域 - 渐变Banner */
#hero {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
  border: none;
  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(255,255,255,0.1) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite;
}

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

#hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition);
  margin: 0.5rem;
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255,255,255,0.3);
  background: var(--accent);
  color: #fff;
  border-color: #fff;
}

.button.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.button.secondary:hover {
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}

/* 标题样式 */
h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--text-primary);
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.4rem;
  margin: 1rem 0 0.5rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* 产品卡片 */
#products article {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: all var(--transition);
}

#products article:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border-color: var(--accent);
}

/* 列表样式 */
ul, ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

/* FAQ 定义列表 */
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

dt {
  font-weight: 600;
  color: var(--accent);
  padding: 0.5rem;
  background: var(--glass-bg);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

dt:hover {
  background: var(--accent);
  color: #fff;
}

dd {
  padding: 0.5rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

/* 资源导航 */
#resources nav ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

#resources nav ul li a {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  font-weight: 500;
}

#resources nav ul li a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(5px);
}

/* 联系地址 */
address p {
  margin-bottom: 0.5rem;
  font-style: normal;
}

/* 页脚 */
footer {
  background: var(--bg-secondary);
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

footer nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0;
  margin-bottom: 1rem;
}

footer nav ul li a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color var(--transition);
}

footer nav ul li a:hover {
  color: var(--accent);
}

footer p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  background: var(--accent-hover);
}

/* 响应式设计 */
@media (max-width: 768px) {
  nav {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
  }

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

  nav ul li a {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }

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

  #hero p {
    font-size: 1rem;
  }

  section {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  h2 {
    font-size: 1.6rem;
  }

  dl {
    grid-template-columns: 1fr;
  }

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

  footer nav ul {
    flex-direction: column;
    gap: 0.8rem;
  }

  #backToTop {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 480px) {
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #hero {
    padding: 3rem 1rem;
  }

  .button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* 暗色模式适配 */
[data-theme="dark"] .button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

[data-theme="dark"] .button:hover {
  background: #fff;
  color: var(--accent);
}

[data-theme="dark"] .button.secondary {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

[data-theme="dark"] .button.secondary:hover {
  background: #fff;
  color: var(--accent);
}

/* 滚动动画增强 */
@media (prefers-reduced-motion: reduce) {
  section {
    animation: none;
    opacity: 1;
    transform: none;
  }
}