/* ============================================ */
/* 球友会官网(QYH) - 官方体育社区平台 完整样式  */
/* 作者：资深UI设计师/前端工程师                   */
/* 风格：现代体育社区 · 毛玻璃 · 渐变 · 暗色支持   */
/* ============================================ */

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

:root {
  --primary: #1a73e8;
  --primary-light: #4a9eff;
  --primary-dark: #0d47a1;
  --secondary: #ff6f00;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1a1a2e;
  --text-light: #555555;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.3s ease;
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --max-width: 1200px;
}

body.dark {
  --bg: #0f0f1a;
  --bg-alt: #1a1a2e;
  --text: #e0e0e0;
  --text-light: #aaaaaa;
  --border: #2a2a3e;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(0, 0, 0, 0.3);
  --glass-border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ---------- 容器 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 115, 232, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary-light);
  color: #fff;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg-alt);
  color: var(--text-light);
  margin: 3px;
}

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

/* ---------- 网格系统 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* ---------- 滚动动画 ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 固定按钮 ---------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 1000;
}

.scroll-top.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-dark);
}

.dark-toggle {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.dark-toggle:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- 移动端菜单按钮 ---------- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .section {
    padding: 50px 0;
  }

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

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

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

  .grid-2,
  .grid-3,
  .grid-4 {
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
  }

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

  .sitemap {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .contact-info p {
    font-size: 0.95rem;
  }
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

body.dark header {
  background: rgba(15, 15, 26, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

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

/* ---------- Hero ---------- */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 50%, #4a9eff 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 700px;
  color: #fff;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero .btn {
  margin-right: 15px;
  margin-top: 10px;
}

.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.hero-shapes span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 20s infinite;
}

.hero-shapes span:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -60px;
  right: -60px;
  animation-delay: 0s;
}

.hero-shapes span:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: 40px;
  left: -40px;
  animation-delay: -5s;
}

.hero-shapes span:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 30%;
  right: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.05);
  }
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb span::after {
  content: '/';
  margin-left: 8px;
  color: var(--text-light);
}

.breadcrumb span:last-child::after {
  content: '';
}

/* ---------- Banner 轮播 ---------- */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-top: 30px;
}

.banner-slide {
  display: none;
  padding: 40px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  min-height: 200px;
  border-radius: var(--radius);
}

.banner-slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

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

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 5px 0;
}

.faq-question span {
  transition: var(--transition);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  color: var(--text-light);
  padding-top: 0;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 15px;
}

.faq-item.open .faq-question span {
  transform: rotate(180deg);
}

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

.search-box input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border);
  border-radius: 30px 0 0 30px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

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

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

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

/* ---------- 统计数字 ---------- */
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ---------- 评价卡片 ---------- */
.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 15px;
  color: var(--primary-light);
  opacity: 0.2;
  font-family: serif;
}

/* ---------- 合作伙伴 ---------- */
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 80px;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
}

.partner-logo:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- How-to 步骤 ---------- */
.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.howto-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- 新闻卡片 ---------- */
.news-card .date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

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

/* ---------- 案例卡片 ---------- */
.case-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.case-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

.case-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- 团队卡片 ---------- */
.team-card {
  text-align: center;
}

.team-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  font-weight: 700;
}

.team-card h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.team-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ---------- 价值观卡片 ---------- */
.value-card {
  text-align: center;
  padding: 30px 20px;
}

.value-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* ---------- 网站地图 ---------- */
.sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  padding: 20px 0;
}

.sitemap a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

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

/* ---------- 友情链接 ---------- */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 15px 0;
}

.friend-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

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

/* ---------- 联系信息 ---------- */
.contact-info p {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info svg {
  flex-shrink: 0;
}