/* ===== 中超买球官方网站 style.css ===== */
/* 版本: 1.0 | 更新: 2025-06-20 */

/* 自定义属性 (主题) */
:root {
  --primary: #1a1a2e;
  --secondary: #e94560;
  --accent: #0f3460;
  --bg: #f5f5f5;
  --text: #333;
  --card-bg: #fff;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
  --gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --glass: rgba(255,255,255,0.15);
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

[data-theme="dark"] {
  --primary: #0d0d1a;
  --secondary: #ff6b6b;
  --accent: #1a3a5c;
  --bg: #121212;
  --text: #e0e0e0;
  --card-bg: #1e1e2e;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --glass: rgba(255,255,255,0.05);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
}

/* ===== 工具类 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 毛玻璃通用 ===== */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== Header & Nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
  height: var(--header-height);
}

header.scrolled {
  background: var(--primary);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

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

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
  color: var(--text);
}

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

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

.nav-links a:hover {
  color: var(--secondary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 5px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.dark-toggle {
  background: none;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}

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

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 120px 20px 80px;
  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(-30px,30px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn {
  display: inline-block;
  padding: 16px 48px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(233,69,96,0.4);
}

.hero .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(233,69,96,0.6);
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
}

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

.section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  color: #666;
  font-size: 1.05rem;
}

[data-theme="dark"] .section-sub {
  color: #aaa;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.card-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

[data-theme="dark"] .card p {
  color: #bbb;
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--card-bg);
  border-radius: 16px;
  margin-bottom: 15px;
  padding: 20px 25px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
}

.faq-item:hover {
  transform: translateX(4px);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  user-select: none;
}

.faq-question span {
  transition: var(--transition);
  font-size: 0.9rem;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding-top: 0;
  color: #666;
  line-height: 1.7;
}

[data-theme="dark"] .faq-answer {
  color: #bbb;
}

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

/* ===== Footer ===== */
footer {
  background: var(--primary);
  color: #ccc;
  padding: 60px 20px 30px;
  margin-top: 40px;
}

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

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--secondary);
}

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

.footer-col ul li a {
  transition: var(--transition);
  color: #ccc;
}

.footer-col ul li a:hover {
  color: var(--secondary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
}

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

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

.back-to-top:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(233,69,96,0.6);
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.count-up {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  display: inline-block;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 30px;
  display: inline-flex;
  gap: 8px;
  margin-bottom: 30px;
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}

.breadcrumb a:hover {
  color: var(--secondary);
}

.breadcrumb span {
  opacity: 0.7;
}

/* ===== Search ===== */
.search-box {
  display: flex;
  max-width: 500px;
  margin: 20px auto;
  background: var(--card-bg);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.1);
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: #999;
}

[data-theme="dark"] .search-box input::placeholder {
  color: #777;
}

.search-box button {
  padding: 14px 30px;
  background: var(--secondary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.search-box button:hover {
  background: #d63850;
}

/* ===== SVG icon ===== */
.svg-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Partner Grid ===== */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.partner-item {
  width: 120px;
  height: 60px;
  opacity: 0.6;
  transition: var(--transition);
}

.partner-item:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ===== HowTo Steps ===== */
.step-list {
  counter-reset: step;
}

.step-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  padding-left: 70px;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
}

.step-item:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 25px;
  width: 36px;
  height: 36px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-item h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.step-item p {
  color: #666;
  line-height: 1.6;
}

[data-theme="dark"] .step-item p {
  color: #bbb;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--primary);
    padding: 30px;
    gap: 20px;
    transform: translateY(-120%);
    transition: var(--transition);
    opacity: 0;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .menu-toggle {
    display: flex;
  }

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

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

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

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

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

  .step-item {
    padding-left: 60px;
  }

  .step-item::before {
    left: 15px;
    top: 20px;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 100px 15px 60px;
  }

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

  .hero .btn {
    padding: 14px 36px;
    font-size: 1rem;
  }

  section {
    padding: 50px 0;
  }

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

  .card {
    padding: 20px;
  }

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

  .breadcrumb {
    font-size: 0.8rem;
    padding: 10px 16px;
  }

  .search-box {
    flex-direction: column;
    border-radius: 16px;
  }

  .search-box input {
    border-radius: 16px 16px 0 0;
    padding: 12px 16px;
  }

  .search-box button {
    border-radius: 0 0 16px 16px;
    padding: 12px;
  }

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

  .step-item {
    padding-left: 50px;
    padding-right: 15px;
  }

  .step-item::before {
    left: 12px;
    top: 18px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

/* ===== Dark mode specific ===== */
[data-theme="dark"] .card {
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .faq-item {
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .step-item {
  border-color: rgba(255,255,255,0.08);
}

/* ===== Print ===== */
@media print {
  header, .back-to-top, .search-box, .dark-toggle, .menu-toggle {
    display: none !important;
  }

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

  .hero {
    min-height: auto;
    padding: 40px 20px;
    background: #1a1a2e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .card, .faq-item, .step-item {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Focus visible ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* ===== Selection ===== */
::selection {
  background: var(--secondary);
  color: #fff;
}