:root {
  --brand: #0b6e4f;
  --brand-dark: #084c37;
  --brand-light: #12a374;
  --accent: #e8a317;
  --bg: #f4f7f5;
  --bg-alt: #e8f0ec;
  --text: #1a2421;
  --text-muted: #5a6b64;
  --white: #ffffff;
  --border: #d0ddd6;
  --header-h: 72px;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--brand-light);
}

ul,
ol {
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.35;
  color: var(--brand-dark);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--brand);
  display: inline-block;
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--brand);
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand) 100%);
  box-shadow: 0 2px 12px rgba(8, 76, 55, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
  flex-shrink: 0;
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: var(--white);
  opacity: 0.92;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.7rem;
  font-size: 0.92rem;
  border-radius: 6px;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.main-nav .nav-cta {
  background: var(--accent);
  color: #1a1400;
  font-weight: 600;
  margin-left: 0.35rem;
}

.main-nav .nav-cta:hover {
  background: #f0b42e;
  color: #1a1400;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(120deg, rgba(8, 76, 55, 0.88) 0%, rgba(11, 110, 79, 0.55) 55%, rgba(8, 76, 55, 0.35) 100%),
    url("/images/开云体育首页.jpg") center / cover no-repeat;
  color: var(--white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, transparent 20%, rgba(8, 76, 55, 0.4) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  animation: fadeUp 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  font-weight: 500;
  font-family: var(--font-body);
  max-width: 36em;
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-desc {
  max-width: 34em;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #1a1400;
}

.btn-primary:hover {
  background: #f0b42e;
  color: #1a1400;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-intro {
  color: var(--text-muted);
  max-width: 48em;
  margin-bottom: 1.25rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 0.25rem 0;
}

.feature-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: flex-start;
  margin: 1.5rem 0;
}

.partner-row img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.15);
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.partner-row img:hover {
  opacity: 1;
  transform: scale(1.04);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.game-grid a {
  display: block;
  text-align: center;
  color: var(--text);
}

.game-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  transition: transform 0.3s;
}

.game-grid a:hover img {
  transform: scale(1.03);
}

.game-grid span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-dark);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.promo-grid img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.media-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.75rem;
  align-items: center;
  margin: 1.75rem 0;
}

.media-split.reverse {
  grid-template-columns: 1fr 1.1fr;
}

.media-split.reverse .media-copy {
  order: -1;
}

.media-split img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  max-height: 340px;
}

.shot-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.shot-gallery figure {
  margin: 0;
}

.shot-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.shot-gallery figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0;
}

.club-grid figure {
  margin: 0;
  text-align: center;
}

.club-grid img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem;
  margin-bottom: 0.5rem;
}

.club-grid figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.category-list {
  display: grid;
  gap: 1.75rem;
  margin: 1.5rem 0;
}

.category-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.category-row img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}

.ambassador {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 1.75rem 0;
  padding: 1.25rem;
  background: linear-gradient(135deg, #eef6f2, #f7faf8);
  border-left: 4px solid var(--brand);
}

.ambassador img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  max-height: 320px;
}

.img-full {
  width: 100%;
  border-radius: 6px;
  margin: 1.25rem 0;
  max-height: 420px;
  object-fit: cover;
}

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0 1.75rem;
}

.vendor-grid img {
  width: 100%;
  height: 56px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem;
}

@media (max-width: 860px) {
  .media-split,
  .media-split.reverse,
  .category-row,
  .ambassador {
    grid-template-columns: 1fr;
  }

  .media-split.reverse .media-copy {
    order: 0;
  }

  .shot-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .shot-gallery {
    grid-template-columns: 1fr;
  }
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.steps li {
  position: relative;
  padding: 1rem 0 1rem 3.2rem;
  border-bottom: 1px solid var(--border);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-dark);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--brand);
  font-weight: 700;
}

.faq details[open] summary::before {
  content: "−";
}

.faq details p {
  margin: 0.65rem 0 0.25rem;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.toc {
  background: var(--bg-alt);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--brand);
}

.toc h2 {
  margin-top: 0;
  border: none;
  font-size: 1.1rem;
  padding: 0;
}

.toc ol {
  margin-top: 0.5rem;
}

.toc a {
  font-weight: 500;
}

.breadcrumb {
  padding: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb span {
  margin: 0 0.35rem;
  color: var(--border);
}

/* Auth pages */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 3rem;
}

.auth-form-wrap {
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--border);
}

.auth-form-wrap h1 {
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand-dark);
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
}

.auth-side img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.auth-side h2 {
  margin-top: 0;
}

/* Legal / content pages */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: var(--white);
  padding: 2.5rem 0;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  max-width: 40em;
}

.content-block {
  padding: 2rem 0 3rem;
}

.content-block h2 {
  display: block;
}

.internal-links {
  margin: 2rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.internal-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.internal-links a {
  font-weight: 500;
}

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  max-width: 28em;
  margin: 0 auto 1.5rem;
}

/* Footer */
.site-footer {
  background: #062e22;
  color: rgba(255, 255, 255, 0.82);
  padding: 2.75rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 0.85rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-logos img {
  height: 28px;
  width: auto;
  opacity: 0.7;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeUp 0.7s ease both;
}

/* Mobile */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--brand-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav .nav-cta {
    margin: 0.5rem 0 0;
    text-align: center;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero {
    min-height: 420px;
    align-items: center;
  }

  .hero-content {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .auth-form-wrap {
    padding: 1.35rem;
  }
}

/* Top ads bar */
.ads-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0 0.35rem;
  position: relative;
  z-index: 50;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  background: transparent;
  margin: 0;
  min-height: 0;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
