/* Kaiyun Game Zone — Shared Styles */
:root {
  --bg: #0a1628;
  --bg-soft: #0f2138;
  --bg-card: #132a45;
  --surface: #163052;
  --text: #e8eef6;
  --text-muted: #9bb0c9;
  --brand: #1db954;
  --brand-dark: #149443;
  --brand-glow: rgba(29, 185, 84, 0.35);
  --accent: #f0c14b;
  --line: rgba(255, 255, 255, 0.08);
  --danger: #e85d5d;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --font-display: "Oswald", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(29, 185, 84, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(240, 193, 75, 0.12), transparent 50%),
    linear-gradient(180deg, #07101c 0%, var(--bg) 40%, #081525 100%);
  background-attachment: fixed;
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); color: #fff; }
h3 { font-size: 1.25rem; color: #f3f7fb; }

p { margin: 0 0 1rem; color: var(--text-muted); }
ul, ol { color: var(--text-muted); padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(7, 16, 28, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  background: linear-gradient(90deg, #fff, var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  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: #fff;
  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);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  color: var(--text-muted);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: rgba(29, 185, 84, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #12a045);
  color: #04140a;
  box-shadow: 0 8px 24px var(--brand-glow);
}

.btn-primary:hover { color: #04140a; box-shadow: 0 12px 28px var(--brand-glow); }

.btn-outline {
  background: transparent;
  border-color: rgba(29, 185, 84, 0.45);
  color: var(--brand);
}

.btn-outline:hover {
  background: rgba(29, 185, 84, 0.1);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #f0c14b, #d4a017);
  color: #1a1200;
}

.btn-accent:hover { color: #1a1200; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg, rgba(7, 16, 28, 0.92) 0%, rgba(7, 16, 28, 0.72) 45%, rgba(7, 16, 28, 0.45) 100%),
    url("/开云体育首页.jpg") center / cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}

.hero-content {
  padding: 4rem 0 5rem;
  max-width: 720px;
  animation: fadeUp 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff 20%, var(--brand) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin-bottom: 1rem;
  color: #fff;
}

.hero-lead {
  font-size: 1.08rem;
  color: #c5d4e6;
  margin-bottom: 1.75rem;
  max-width: 34em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sections */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 48rem;
}

.section-head p {
  font-size: 1.02rem;
}

.section-label {
  display: inline-block;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* 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,
.content-block,
.partner-item,
.faq-item,
.auth-panel,
.legal-card {
  background: linear-gradient(160deg, rgba(19, 42, 69, 0.9), rgba(15, 33, 56, 0.85));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.feature-block:hover,
.partner-item:hover {
  border-color: rgba(29, 185, 84, 0.35);
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.12);
}

.feature-block h3,
.content-block h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-block img.icon,
.game-card img.cover {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 0.9rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 185, 84, 0.4);
  animation: floatSoft 2.4s ease-in-out infinite;
}

.game-card .body {
  padding: 1rem 1.1rem 1.2rem;
}

.game-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.game-card p { font-size: 0.92rem; margin-bottom: 0; }

.partner-item {
  text-align: center;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.partner-item img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(1.05);
}

.partner-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.download-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.download-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.download-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.steps li {
  position: relative;
  padding: 0.9rem 0 0.9rem 3.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid rgba(29, 185, 84, 0.4);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
}

.faq-item + .faq-item { margin-top: 0.85rem; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.faq-item p { margin-bottom: 0; }

.prose {
  max-width: 52rem;
}

.prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
}

.prose h3 { margin-top: 1.5rem; }

.prose a { border-bottom: 1px dashed rgba(29, 185, 84, 0.45); }

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 0;
}

.inline-links a {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.inline-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Auth pages */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 3rem 0 4rem;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: #d5e2f0;
  font-size: 0.92rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.auth-side img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.auth-note {
  margin-top: 1rem;
  font-size: 0.92rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 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;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #060e18;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  display: block;
  color: var(--text-muted);
  padding: 0.25rem 0;
  font-size: 0.92rem;
}

.site-footer a:hover { color: var(--brand); }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.breadcrumb {
  padding: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { color: #fff; }

.page-hero {
  padding: 2rem 0 1rem;
}

.page-hero h1 { margin-bottom: 0.65rem; }

.toc {
  background: rgba(19, 42, 69, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

.toc strong {
  display: block;
  color: #fff;
  margin-bottom: 0.5rem;
}

.toc a {
  display: inline-block;
  margin: 0.25rem 0.75rem 0.25rem 0;
  font-size: 0.92rem;
}

/* Mobile */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .download-panel,
  .auth-layout,
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(7, 16, 28, 0.97);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
  }
  .header-actions .btn { padding: 0.55rem 0.9rem; font-size: 0.88rem; }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-content { padding: 2.5rem 0 3rem; }
  .header-actions .btn-outline { display: none; }
  .footer-bottom { flex-direction: column; }
}

/* Top ads strip */
.ads-wrap {
  padding: 0.65rem 0 0.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 28, 0.55);
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  background: transparent;
  margin: 8px 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(0, 0, 0, 0.35);
  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(29, 185, 84, 0.28);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
