/* style.css - MK体育应用中心 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --primary: #e94560;
  --primary-hover: #ff6b81;
  --text: #eaeaea;
  --text2: #a0a0b0;
  --border: #2a2a40;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 12px;
  --max-w: 1200px;
  --glass-bg: rgba(26, 26, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-primary: linear-gradient(135deg, #e94560, #ff8a5c);
  --gradient-hero: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
}

[data-theme="light"] {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface2: #f0f2f5;
  --primary: #d6333e;
  --primary-hover: #b02a35;
  --text: #1a1a2e;
  --text2: #555;
  --border: #dee2e6;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --gradient-hero: linear-gradient(135deg, #f0f2f5 0%, #ffffff 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

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

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
}
.skip-link:focus { top: 0; }

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

/* ===== HEADER ===== */
header { 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}

.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 12px 20px; 
  max-width: var(--max-w); 
  margin: 0 auto; 
}

.logo { 
  font-size: 1.5rem; 
  font-weight: 700; 
  color: var(--primary); 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.logo svg { width: 32px; height: 32px; }

nav { 
  display: flex; 
  gap: 24px; 
  align-items: center; 
}

nav a { 
  color: var(--text); 
  font-size: 0.95rem; 
  padding: 6px 0; 
  border-bottom: 2px solid transparent; 
  transition: all 0.3s ease; 
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

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

.theme-toggle { 
  background: none; 
  border: 1px solid var(--border); 
  color: var(--text); 
  padding: 6px 12px; 
  border-radius: 6px; 
  cursor: pointer; 
  font-size: 0.9rem;
  transition: all 0.3s;
}

.theme-toggle:hover { 
  border-color: var(--primary); 
  background: rgba(233, 69, 96, 0.1); 
}

.mobile-menu-btn { 
  display: none; 
  background: none; 
  border: none; 
  color: var(--text); 
  font-size: 1.5rem; 
  cursor: pointer;
  transition: transform 0.3s;
}

.mobile-menu-btn:hover { transform: scale(1.1); }

@media (max-width: 768px) {
  nav { 
    display: none; 
    flex-direction: column; 
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    padding: 20px; 
    gap: 16px; 
    border-bottom: 1px solid var(--glass-border);
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  nav.open { display: flex; }
  .mobile-menu-btn { display: block; }
}

/* ===== HERO ===== */
.hero { 
  padding: 100px 0 70px; 
  background: var(--gradient-hero);
  text-align: center; 
  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.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,138,92,0.06) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite;
}

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

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

.hero h1 { 
  font-size: 3rem; 
  font-weight: 800; 
  margin-bottom: 16px; 
  background: var(--gradient-primary);
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text;
  animation: fadeInUp 0.8s ease;
}

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

.hero .btn { 
  display: inline-block; 
  background: var(--primary); 
  color: #fff; 
  padding: 14px 40px; 
  border-radius: 50px; 
  font-size: 1.1rem; 
  font-weight: 600; 
  transition: all 0.3s ease; 
  box-shadow: 0 8px 24px rgba(233,69,96,0.3);
  animation: fadeInUp 0.8s ease 0.4s both;
  position: relative;
  overflow: hidden;
}

.hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}

.hero .btn:hover::before { left: 100%; }

.hero .btn:hover { 
  background: var(--primary-hover); 
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(233,69,96,0.4);
}

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

/* ===== SECTION ===== */
section { 
  padding: 60px 0; 
  opacity: 0;
  transform: translateY(20px);
  animation: sectionFadeIn 0.6s ease forwards;
}

@keyframes sectionFadeIn {
  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-title { 
  font-size: 2rem; 
  font-weight: 700; 
  margin-bottom: 12px; 
  text-align: center;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub { 
  color: var(--text2); 
  text-align: center; 
  margin-bottom: 40px; 
  font-size: 1.05rem; 
}

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

.card { 
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); 
  padding: 28px; 
  box-shadow: var(--shadow); 
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease; 
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before { transform: scaleX(1); }

.card:hover { 
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

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

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

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

.card .read-more { 
  display: inline-block; 
  margin-top: 12px; 
  font-weight: 600;
  position: relative;
}

.card .read-more::after {
  content: '→';
  margin-left: 4px;
  transition: margin-left 0.3s;
}

.card .read-more:hover::after { margin-left: 8px; }

/* ===== FAQ ===== */
.faq-item { 
  border-bottom: 1px solid var(--border); 
  padding: 18px 0; 
  cursor: pointer; 
  transition: all 0.3s;
}

.faq-item:hover { padding-left: 8px; }

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

.faq-question::after { 
  content: '+'; 
  font-size: 1.4rem; 
  transition: all 0.3s ease; 
  color: var(--primary);
}

.faq-item.open .faq-question::after { 
  content: '−'; 
  transform: rotate(180deg);
}

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

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

/* ===== HOWTO ===== */
.howto-step { 
  display: flex; 
  gap: 16px; 
  margin-bottom: 20px; 
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-20px);
  animation: stepIn 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; }

@keyframes stepIn {
  to { opacity: 1; transform: translateX(0); }
}

.howto-step .step-num { 
  background: var(--gradient-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;
  box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}

.howto-step p { margin-top: 4px; color: var(--text2); }

/* ===== TESTIMONIALS ===== */
.testimonial { 
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius); 
  padding: 28px; 
  border: 1px solid var(--glass-border);
  transition: all 0.3s;
}

.testimonial:hover { 
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.testimonial p { 
  font-style: italic; 
  line-height: 1.7;
}

.testimonial .author { 
  margin-top: 12px; 
  font-weight: 600; 
  color: var(--primary); 
}

/* ===== FOOTER ===== */
footer { 
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border); 
  padding: 40px 0 20px; 
}

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

.footer-grid h4 { 
  margin-bottom: 12px; 
  font-size: 1rem; 
  color: var(--text);
}

.footer-grid a { 
  display: block; 
  color: var(--text2); 
  font-size: 0.9rem; 
  margin-bottom: 6px; 
  transition: all 0.2s;
  padding: 2px 0;
}

.footer-grid a:hover { 
  color: var(--primary); 
  padding-left: 4px; 
}

.footer-bottom { 
  border-top: 1px solid var(--border); 
  padding-top: 20px; 
  text-align: center; 
  font-size: 0.85rem; 
  color: var(--text2); 
}

/* ===== BACK TO TOP ===== */
#back-to-top { 
  position: fixed; 
  bottom: 30px; 
  right: 30px; 
  background: var(--gradient-primary); 
  color: #fff; 
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1.4rem; 
  cursor: pointer; 
  border: none; 
  box-shadow: 0 8px 24px rgba(233,69,96,0.3); 
  opacity: 0; 
  visibility: hidden; 
  transition: all 0.3s ease; 
  z-index: 99;
}

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

#back-to-top:hover { 
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(233,69,96,0.4);
}

/* ===== CAROUSEL ===== */
.carousel { 
  position: relative; 
  overflow: hidden; 
  border-radius: var(--radius); 
  margin-bottom: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.carousel-inner { 
  display: flex; 
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.carousel-item { 
  min-width: 100%; 
  padding: 50px 40px; 
  background: transparent;
  text-align: center; 
}

.carousel-item h2 { 
  font-size: 1.8rem; 
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.carousel-item p { 
  color: var(--text2); 
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.carousel-controls { 
  position: absolute; 
  top: 50%; 
  width: 100%; 
  display: flex; 
  justify-content: space-between; 
  transform: translateY(-50%); 
  pointer-events: none; 
  padding: 0 16px; 
}

.carousel-controls button { 
  pointer-events: auto; 
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border); 
  color: var(--text); 
  width: 44px; 
  height: 44px; 
  border-radius: 50%; 
  cursor: pointer; 
  font-size: 1.2rem;
  transition: all 0.3s;
}

.carousel-controls button:hover { 
  background: var(--primary); 
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.1);
}

/* ===== STATS ===== */
.stats-grid { 
  display: flex; 
  justify-content: space-around; 
  flex-wrap: wrap; 
  gap: 24px; 
  text-align: center; 
  padding: 40px 0; 
}

.stat-item { 
  flex: 1;
  min-width: 120px;
  padding: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  transition: all 0.3s;
}

.stat-item:hover { 
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-item .num { 
  font-size: 2.5rem; 
  font-weight: 800; 
  color: var(--primary);
  line-height: 1.2;
}

.stat-item .label { 
  color: var(--text2); 
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { padding: 80px 0 50px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .section-title { font-size: 1.6rem; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-grid { flex-direction: column; align-items: center; }
  .stat-item { min-width: 200px; }
  .carousel-item { padding: 30px 20px; }
  .carousel-item h2 { font-size: 1.4rem; }
  #back-to-top { width: 40px; height: 40px; font-size: 1.2rem; bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.4rem; }
  .header-inner { padding: 10px 16px; }
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .testimonial { padding: 20px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
  background: var(--border); 
  border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

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

/* ===== FOCUS ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}