/* 开云体育 kai-yun.lol 全局样式 */
:root {
  --primary: #1a7a3a;
  --primary-dark: #0f5c2a;
  --primary-light: #2ecc71;
  --accent: #f5a623;
  --bg: #f8faf9;
  --bg-dark: #0d1f14;
  --text: #1a1a1a;
  --text-muted: #5a6b5f;
  --border: #dde8e0;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --radius: 12px;
  --header-h: 72px;
  --max-w: 1200px;
  --transition: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-link img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.logo-text span { display: block; font-size: .72rem; font-weight: 400; color: var(--text-muted); }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active { background: #e8f5ec; color: var(--primary-dark); }

.nav-cta { display: flex; gap: 8px; margin-left: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }

.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-accent { background: var(--accent); color: #1a1a1a; }
.btn-accent:hover { background: #e09000; color: #1a1a1a; }

.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a4d2e 60%, var(--primary) 100%);
  color: var(--white);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/开云体育首页.jpg") center/cover no-repeat;
  opacity: .15;
}

.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero-lead {
  font-size: 1.1rem;
  opacity: .92;
  margin-bottom: 28px;
  line-height: 1.8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; }

.badge {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .85rem;
}

.hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Sections */
section { padding: 64px 0; }

.section-header { text-align: center; margin-bottom: 48px; }

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-header p { color: var(--text-muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }

.feature-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 1.15rem; color: var(--primary-dark); margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: .95rem; }

/* Content article */
.content-section { background: var(--white); }

.article-content { max-width: 900px; margin: 0 auto; }

.article-content h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8f5ec;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin: 28px 0 12px;
}

.article-content p { margin-bottom: 16px; color: var(--text); }

.article-content ul, .article-content ol {
  margin: 0 0 16px 24px;
  color: var(--text);
}

.article-content li { margin-bottom: 8px; }

.article-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.quick-link {
  background: #e8f5ec;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  color: var(--primary-dark);
  transition: background var(--transition);
}

.quick-link:hover { background: #d0edd8; color: var(--primary-dark); }

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  align-items: center;
}

.partner-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  transition: box-shadow var(--transition);
}

.partner-item:hover { box-shadow: var(--shadow); }

.partner-item img { max-height: 60px; width: auto; object-fit: contain; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary-dark);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); }

.faq-item[open] summary::after { content: "−"; }

.faq-item .faq-body { padding: 0 24px 18px; color: var(--text-muted); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}

.cta-banner h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta-banner p { opacity: .9; margin-bottom: 24px; font-size: 1.05rem; }

/* Page hero (subpages) */
.page-hero {
  background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}

.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }

.breadcrumb {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .9rem;
  opacity: .85;
}

.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { opacity: .6; }

/* Forms */
.form-page { padding: 48px 0 72px; }

.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-card h2 { font-size: 1.4rem; color: var(--primary-dark); margin-bottom: 8px; }
.form-card .form-desc { color: var(--text-muted); margin-bottom: 24px; font-size: .95rem; }

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .9rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,122,58,.15);
}

.form-side {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
}

.form-side img { border-radius: var(--radius); margin-bottom: 20px; width: 100%; }

.form-side h3 { color: var(--primary-dark); margin-bottom: 12px; }
.form-side p { color: var(--text-muted); margin-bottom: 12px; font-size: .95rem; }

.form-footer { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--text-muted); }

/* Legal pages */
.legal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h2 { font-size: 1.3rem; color: var(--primary-dark); margin: 32px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text); margin-bottom: 12px; }
.legal-content ul, .legal-content ol { margin: 0 0 16px 24px; }

/* Error pages */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.error-code { font-size: 6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.error-page h1 { font-size: 1.6rem; margin: 16px 0 12px; color: var(--primary-dark); }
.error-page p { color: var(--text-muted); margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.75);
  padding: 56px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img { width: 48px; border-radius: 8px; margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; }

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
}

/* TOC */
.toc {
  background: #f0f7f2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.toc h3 { font-size: 1rem; color: var(--primary-dark); margin-bottom: 12px; }
.toc ol { margin-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { font-size: .95rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .form-layout, .footer-grid { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
  .footer-grid { gap: 28px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .main-nav a { padding: 12px 16px; }
  .nav-cta { margin-left: 0; margin-top: 8px; flex-direction: column; }
  .nav-cta .btn { width: 100%; }

  section { padding: 48px 0; }
  .form-card { padding: 24px; }
  .legal-content { padding: 24px; }

  #ads > div { width: 64px; }
  #ads img { width: 58px; height: 58px; }
}

/* 顶部广告栏 */
.ads-bar {
  background: linear-gradient(180deg, #fff 0%, #f4faf6 100%);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: var(--header-h);
  z-index: 900;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
  background: transparent;
  min-height: 88px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ads img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: 2px solid #fff;
  background: #fff;
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 16px;
  cursor: pointer;
}

#ads a:hover img,
#ads a:focus img {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 22px rgba(26, 122, 58, 0.22);
}

#ads .caption {
  margin-top: 6px;
  height: 16px;
  line-height: 16px;
  font-size: 11px;
  color: #555;
  text-align: center;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
