/* === 米兰体育 全局样式表 === */
/* 暗色主题 · 渐变 · 毛玻璃 · 圆角卡片 · 响应式 */
/* 所有样式已内联，无需外部资源 */

/* === 基础重置与变量 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #e94560;
  --primary-dark: #c73a52;
  --primary-light: #ff6b81;
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --text: #f0f0f0;
  --text2: #b0b0c0;
  --card-bg: #1e1e36;
  --card-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(15, 15, 26, 0.85);
  --glass-blur: 16px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* === 链接与图片 === */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === 容器 === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === 渐变英雄区 === */
.hero-section {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.10) 0%, transparent 60%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); opacity: 0.6; }
  100% { transform: translate(5%, 5%); opacity: 1; }
}

/* === 毛玻璃 Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--card-border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo span {
  font-weight: 300;
  color: var(--text2);
  -webkit-text-fill-color: var(--text2);
}

/* === 导航 === */
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  color: var(--text2);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a.active::after,
.nav a.active-section::after {
  width: 100%;
}

.nav a:hover,
.nav a.active,
.nav a.active-section {
  color: var(--text);
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: 30px;
  border-bottom: none !important;
  font-weight: 600;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

.nav-cta::after {
  display: none;
}

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 1001;
}

.menu-toggle span {
  width: 26px;
  height: 2.5px;
  background: var(--text);
  border-radius: 4px;
  transition: all var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero 内容 === */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text2);
  max-width: 700px;
  margin: 0 auto 36px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(233, 69, 96, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(233, 69, 96, 0.05);
}

/* === 通用区块 === */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 1.05rem;
}

/* === 卡片 === */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(233, 69, 96, 0.15);
  background: #22223d;
}

/* === 网格 === */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* === 关于 / 故事 === */
.about-content,
.story-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p,
.story-content p {
  margin-bottom: 18px;
  color: var(--text2);
}

/* === 产品服务图标 === */
.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(233, 69, 96, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: background var(--transition), transform var(--transition);
}

.card:hover .icon-box {
  background: rgba(233, 69, 96, 0.25);
  transform: scale(1.05);
}

.icon-box svg {
  width: 26px;
  height: 26px;
  fill: var(--primary);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text2);
  font-size: 0.95rem;
}

/* === 优势统计 === */
.advantage-item {
  text-align: center;
  padding: 28px 16px;
}

.advantage-item .num {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}

.advantage-item p {
  font-size: 0.95rem;
}

/* === 用户评价 === */
.testimonial-card {
  padding: 28px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.15;
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: serif;
  line-height: 1;
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--text);
}

.testimonial-role {
  color: var(--text2);
  font-size: 0.85rem;
}

/* === 案例 === */
.case-card {
  padding: 24px;
}

.case-card .tag {
  display: inline-block;
  background: rgba(233, 69, 96, 0.15);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  font-weight: 500;
}

/* === 文章 === */
.article-card {
  padding: 24px;
}

.article-card .date {
  color: var(--text2);
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

.article-card h4 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text2);
}

.read-more {
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  transition: gap var(--transition);
}

.read-more:hover {
  gap: 8px;
  color: var(--primary-light);
}

/* === FAQ 手风琴 === */
.faq-item {
  border-bottom: 1px solid var(--card-border);
  padding: 18px 0;
  cursor: pointer;
  transition: background var(--transition);
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  user-select: none;
}

.faq-question .icon {
  transition: transform 0.4s ease;
  font-size: 1.3rem;
  color: var(--primary);
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding-top: 0;
  color: var(--text2);
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 14px;
}

/* === HowTo 步骤 === */
.howto-steps {
  counter-reset: step;
  max-width: 700px;
  margin: 0 auto;
}

.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-20px);
  animation: fadeInLeft 0.5s ease forwards;
}

.howto-step:nth-child(1) { animation-delay: 0.1s; }
.howto-step:nth-child(2) { animation-delay: 0.2s; }
.howto-step:nth-child(3) { animation-delay: 0.3s; }
.howto-step:nth-child(4) { animation-delay: 0.4s; }
.howto-step:nth-child(5) { animation-delay: 0.5s; }

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.howto-step h4 {
  margin-bottom: 6px;
}

.howto-step p {
  color: var(--text2);
}

/* === 联系方式 === */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.contact-item {
  padding: 24px;
  text-align: center;
}

.contact-item svg {
  width: 28px;
  height: 28px;
  fill: var(--primary);
  margin-bottom: 12px;
  transition: transform var(--transition);
}

.contact-item:hover svg {
  transform: scale(1.15);
}

.contact-item h4 {
  margin-bottom: 8px;
}

.contact-item p {
  color: var(--text2);
  font-size: 0.9rem;
  word-break: break-all;
}

/* === 底部 === */
.footer {
  background: var(--bg2);
  padding: 60px 0 30px;
  border-top: 1px solid var(--card-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text);
}

.footer p,
.footer a {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 2;
}

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

.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text2);
}

.footer-bottom a {
  color: var(--text2);
  margin-left: 18px;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* === 返回顶部 === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
  font-size: 1.4rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

/* === 轮播点 === */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dots button.active {
  background: var(--primary);
  transform: scale(1.2);
}

.banner-item {
  display: none;
  animation: fadeIn 0.5s ease;
}

.banner-item.active {
  display: block;
}

/* === 搜索框 === */
.search-box {
  display: flex;
  max-width: 400px;
  margin: 0 auto 40px;
}

.search-box input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 30px 0 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg2);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  padding: 12px 22px;
  border-radius: 0 30px 30px 0;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}

.search-box button:hover {
  background: var(--primary-dark);
}

/* === 辅助 === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === 动画 === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 滚动入场动画（通用） */
section .card,
section .grid-2 > *,
section .grid-3 > *,
section .grid-4 > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

section:nth-child(odd) .card,
section:nth-child(odd) .grid-2 > *,
section:nth-child(odd) .grid-3 > *,
section:nth-child(odd) .grid-4 > * {
  animation-delay: 0.1s;
}

section:nth-child(even) .card,
section:nth-child(even) .grid-2 > *,
section:nth-child(even) .grid-3 > *,
section:nth-child(even) .grid-4 > * {
  animation-delay: 0.2s;
}

/* 确保首屏无延迟 */
.hero-section .card {
  animation: none;
  opacity: 1;
  transform: none;
}

/* === 响应式 === */

/* 平板 */
@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 2.8rem;
  }
}

/* 手机 */
@media (max-width: 700px) {
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(var(--glass-blur));
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--card-border);
    z-index: 999;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 60px 0 50px;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom a {
    margin: 0 8px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .card {
    padding: 24px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .howto-step {
    flex-direction: column;
    gap: 12px;
  }

  .howto-step::before {
    margin-bottom: 4px;
  }

  .nav-cta {
    text-align: center;
  }
}

/* 小手机 */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* === 暗色模式增强（原生） === */
::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bg2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 打印样式 */
@media print {
  .header,
  .back-to-top,
  .carousel-dots {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}