/* 开云体育 kysports.diy — 全局样式 */
:root {
  --brand: #0b6e4f;
  --brand-dark: #084c37;
  --brand-light: #12a074;
  --accent: #c9a227;
  --bg: #f5f7f6;
  --bg-alt: #eef3f0;
  --surface: #ffffff;
  --text: #1a2421;
  --text-muted: #5a6b64;
  --border: #d5e0db;
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(8, 40, 28, 0.08);
  --max: 1120px;
  --header-h: 72px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  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 ease;
}

a:hover {
  color: var(--brand-light);
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.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(--text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.logo span {
  color: var(--brand-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--brand);
  background: var(--bg-alt);
}

.nav-cta {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}

.btn-accent:hover {
  background: #b8911f;
  color: #1a1a1a;
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(8, 76, 55, 0.88), rgba(11, 110, 79, 0.78)),
    url("/开云体育首页.jpg") center/cover no-repeat;
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(201, 162, 39, 0.25), transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-brand {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
  max-width: 36em;
}

.hero-lead {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 42em;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}

.hero .btn-primary:hover {
  background: #e0b82e;
  color: #1a1a1a;
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.hero .btn-outline:hover {
  background: #fff;
  color: var(--brand-dark);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--brand-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 48em;
}

.prose h2 {
  font-size: 1.55rem;
  color: var(--brand-dark);
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

.prose h3 {
  font-size: 1.2rem;
  color: var(--brand);
  margin: 1.75rem 0 0.75rem;
}

.prose h4 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
}

.prose strong {
  color: var(--brand-dark);
}

/* Cards / grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.feature-block h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--brand-dark);
}

.feature-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.feature-block img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-card .body {
  padding: 1rem 1.1rem 1.25rem;
}

.game-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--brand-dark);
}

.game-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  align-items: center;
}

.partner-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
}

.partner-item img {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.provider-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.provider-item img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

/* TOC */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  border: none;
  padding: 0;
  color: var(--brand-dark);
}

.toc ol {
  margin: 0;
  columns: 2;
  gap: 1.5rem;
}

.toc a {
  font-size: 0.95rem;
}

/* FAQ */
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-dark);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--brand);
  font-weight: 700;
}

.faq-list details[open] summary::before {
  content: "−";
}

.faq-list details p {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

/* Auth pages */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 3rem 0;
}

.auth-form-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-form-box h1 {
  font-size: 1.6rem;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.auth-form-box .sub {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus {
  outline: 2px solid rgba(11, 110, 79, 0.25);
  border-color: var(--brand);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.auth-side h2 {
  font-size: 1.35rem;
  color: var(--brand-dark);
  margin-bottom: 1rem;
}

.auth-side p {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

.auth-side ul {
  margin-bottom: 1.25rem;
}

.auth-side img {
  border-radius: var(--radius);
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* Page header (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 2.5rem 0;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  opacity: 0.92;
  max-width: 40em;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.breadcrumb a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 28em;
  margin-inline: auto;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.cta-band h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.cta-band p {
  opacity: 0.92;
  margin-bottom: 1.5rem;
  max-width: 36em;
  margin-inline: auto;
}

.cta-band .btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}

.cta-band .btn-outline {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0a2e22;
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  color: #fff;
  font-weight: 700;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.footer-about {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.related-links strong {
  color: var(--brand-dark);
  margin-right: 0.25rem;
}

.img-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
  margin-bottom: 1.25rem;
}

.figure {
  margin: 1.5rem 0;
}

.figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  text-align: left;
}

th {
  background: var(--bg-alt);
  color: var(--brand-dark);
}

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 0.85rem 1rem;
  }

  .nav-cta {
    flex-direction: column;
    margin: 0.5rem 0 0;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .auth-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc ol {
    columns: 1;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 顶部广告入口 */
.ads-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0 8px;
  position: relative;
  z-index: 50;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: transparent;
  margin: 0;
  min-height: 0;
}

#ads:empty {
  display: none;
}

#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;
}
.hero-lead a {
  color: #c9a227;
}