/* 开云体育 kysports.xin — 站点样式 */
:root {
  --brand: #0b6e4f;
  --brand-dark: #08543c;
  --brand-light: #12a974;
  --ink: #122018;
  --muted: #4a5c52;
  --line: #d7e3dc;
  --bg: #f3f7f4;
  --bg-soft: #e8f2ec;
  --surface: #ffffff;
  --accent: #c9a227;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(11, 110, 79, 0.08);
  --max: 1120px;
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(18, 169, 116, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(201, 162, 39, 0.1), transparent 55%),
    linear-gradient(180deg, #f7fbf8 0%, var(--bg) 40%, #eef5f1 100%);
  line-height: 1.75;
  font-size: 16px;
}

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-dark);
}

.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.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text {
  font-family: var(--font-display);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.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);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--brand-dark);
  background: var(--bg-soft);
}

.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.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(11, 110, 79, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.btn-outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand) !important;
}

.btn-outline:hover {
  background: var(--bg-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #0a2e22;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 40, 30, 0.35) 0%, rgba(8, 40, 30, 0.72) 55%, rgba(8, 40, 30, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 40, 30, 0.7) 0%, rgba(8, 40, 30, 0.25) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
  max-width: 720px;
  animation: fadeUp 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.hero p {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 720px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin: 0 0 0.75rem;
  line-height: 1.3;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid,
.category-grid,
.partner-grid,
.promo-grid {
  display: grid;
  gap: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.category-grid {
  grid-template-columns: repeat(4, 1fr);
}

.partner-grid {
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
}

.promo-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-item,
.article-block,
.form-panel,
.legal-content,
.error-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.feature-item h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
}

.feature-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.category-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 180px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
}

.category-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-item:hover img {
  transform: scale(1.06);
}

.category-item span {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  font-weight: 700;
  font-size: 1.1rem;
}

.partner-grid img {
  max-height: 52px;
  width: auto;
  margin: 0 auto;
  filter: grayscale(0.15);
  opacity: 0.92;
}

.promo-item img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.85rem;
}

.promo-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.promo-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* SEO article */
.seo-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
}

.seo-article h2,
.seo-article h3 {
  font-family: var(--font-display);
  scroll-margin-top: 90px;
}

.seo-article h2 {
  font-size: 1.55rem;
  margin: 2rem 0 0.85rem;
}

.seo-article h2:first-child {
  margin-top: 0;
}

.seo-article h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.65rem;
}

.seo-article p,
.seo-article li {
  color: #2a3a32;
}

.seo-article ul,
.seo-article ol {
  padding-left: 1.25rem;
}

.seo-article .toc {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.seo-article .toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.seo-article .toc ol {
  margin: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  opacity: 0.5;
}

/* Auth pages */
.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
  padding: 3rem 0 4rem;
}

.auth-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 1rem;
  line-height: 1.35;
}

.auth-copy p {
  color: var(--muted);
}

.form-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fbfdfc;
}

.form-group input:focus {
  outline: 2px solid rgba(11, 110, 79, 0.25);
  border-color: var(--brand);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-actions .btn {
  width: 100%;
}

/* Legal / about */
.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42em;
}

.legal-content {
  margin-bottom: 3.5rem;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 1.75rem 0 0.65rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: #2a3a32;
}

/* Error pages */
.error-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 3rem 0;
}

.error-panel {
  text-align: center;
  max-width: 560px;
  width: 100%;
}

.error-panel .code {
  font-family: var(--font-display);
  font-size: 4.5rem;
  color: var(--brand);
  line-height: 1;
  margin: 0 0 0.5rem;
}

.error-panel h1 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.error-panel p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* Footer */
.site-footer {
  background: #0d241b;
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 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: #fff;
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.footer-brand strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
  font-size: 0.95rem;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(18, 169, 116, 0.1), rgba(201, 162, 39, 0.08));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.cta-banner {
  background: linear-gradient(135deg, #0b6e4f, #0a3d2d);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2rem 0;
}

.cta-banner h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.cta-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2000;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

@media (max-width: 960px) {
  .feature-grid,
  .promo-grid,
  .auth-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .partner-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.85rem 1rem;
    border-radius: 10px;
  }

  .nav-cta {
    margin: 0.5rem 0 0;
    flex-direction: column;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .feature-grid,
  .promo-grid,
  .auth-layout,
  .footer-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 4rem 0 3rem;
  }
}

/* Top ads strip */
.ads-bar {
  position: sticky;
  top: 72px;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0 0.35rem;
  box-shadow: 0 6px 18px rgba(11, 110, 79, 0.06);
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  background: transparent;
  margin: 0;
  min-height: 0;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
}

#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;
}
