/* kysports.my — 开云体育官网入口 */
:root {
  --brand: #c8102e;
  --brand-dark: #9a0c22;
  --brand-soft: #fff0f2;
  --ink: #1a1d23;
  --ink-soft: #3d4450;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --accent: #0b6e4f;
  --accent-soft: #e8f5f0;
  --gold: #c9a227;
  --radius: 10px;
  --shadow: 0 8px 28px rgba(26, 29, 35, 0.08);
  --max: 1120px;
  --header-h: 72px;
  --font-display: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "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: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Top ads bar */
.ads-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 6px;
  position: relative;
  z-index: 20;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  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;
}

/* 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(--line);
  height: var(--header-h);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  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[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  gap: 8px;
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #085c42;
  color: #fff;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: #1a1d23;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(26, 29, 35, 0.88) 0%, rgba(200, 16, 46, 0.55) 55%, rgba(26, 29, 35, 0.75) 100%),
    url("/开云体育首页.jpg") center / cover no-repeat;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 64px 0 72px;
  max-width: 720px;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.45;
}

.hero-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 28px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--surface);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 10px;
  line-height: 1.3;
}

.section-desc {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 720px;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--brand-soft);
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.6rem;
  color: var(--ink);
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: var(--ink);
}

/* Quick entry */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--ink);
}

.quick-item strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--brand);
}

.quick-item span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow);
}

.cat-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-card:hover img {
  transform: scale(1.06);
}

.cat-card:hover {
  text-decoration: none;
  color: #fff;
}

.cat-card .cat-label {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-weight: 800;
  font-size: 1.15rem;
}

/* Feature / promo */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-item .feature-body {
  padding: 18px 20px 22px;
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Partners */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.partner-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
}

.partner-item img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.provider-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.provider-item img {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  margin-bottom: 12px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.faq-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* TOC / related links */
.toc {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin: 0 0 28px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc ul {
  margin: 0;
  padding-left: 1.1rem;
}

.toc li {
  margin-bottom: 4px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.related-links a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.related-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Page hero (inner) */
.page-hero {
  background:
    linear-gradient(120deg, #1a1d23 0%, #9a0c22 100%);
  color: #fff;
  padding: 48px 0 40px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  opacity: 0.9;
  max-width: 640px;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 12px;
  opacity: 0.85;
}

.breadcrumb a {
  color: #fff;
  text-decoration: underline;
}

/* Auth forms */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.auth-card .auth-note {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus {
  outline: 2px solid rgba(200, 16, 46, 0.25);
  border-color: var(--brand);
}

.form-actions {
  margin-top: 8px;
}

.form-actions .btn {
  width: 100%;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-content h2 {
  margin-top: 0;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.error-page .error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  margin: 0 0 12px;
}

.error-page h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}

.error-page p {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 480px;
  margin-inline: auto;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: #1a1d23;
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
  text-decoration: none;
}

.footer-brand:hover {
  color: #fff;
  text-decoration: none;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* Utilities */
.cta-band {
  background: linear-gradient(105deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.cta-band p {
  margin: 0 0 20px;
  opacity: 0.92;
}

.cta-band .btn-outline {
  color: #fff;
  border-color: #fff;
}

.cta-band .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 960px) {
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid,
  .auth-layout,
  .steps {
    grid-template-columns: 1fr;
  }

  .partner-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .provider-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .nav-cta {
    margin: 8px 0 0;
    flex-direction: column;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 48px 0 56px;
  }

  .section {
    padding: 48px 0;
  }

  .partner-grid,
  .provider-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quick-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }
}
