/* 新投注门户 · 深空蓝侧轨控制台
   /assets/site.css
   ------------------------------------------------ */

:root {
  --primary: #0B1F3A;
  --accent: #FF6B35;
  --gold: #D4AF37;
  --night: #0A1C4A;
  --steel: #1E3A5F;
  --pale: #E6F0FA;
  --white: #FFFFFF;
  --gray: #8A9BB5;
  --electric: #00D9FF;
  --purple: #8A2BE2;

  --font-display: "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Roboto", "PingFang SC", "Microsoft YaHei", sans-serif;

  --sidebar-w: 280px;
  --header-h: 72px;
  --content-space: clamp(1.5rem, 4vw, 4rem);
  --z-header: 100;
  --z-nav: 101;
  --z-backtop: 500;
  --z-skip: 1000;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--primary);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }

ul, ol { list-style: none; margin: 0; padding: 0; }

a {
  color: var(--pale);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

/* 容器与排版 */
.content-wrap {
  max-width: 760px;
  margin-inline: 0;
  padding-inline: var(--content-space);
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.display-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
}

.sub-heading {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
}

.body-text {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
}

.small-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gray);
}

/* 按钮 */
.btn,
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover,
.site-nav__cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(0, 217, 255, 0.4);
  color: var(--electric);
}

.btn--ghost:hover {
  background: rgba(0, 217, 255, 0.08);
  border-color: var(--electric);
  color: var(--electric);
  transform: translateY(-2px);
  box-shadow: none;
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}

.btn--gold:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* 标签、分隔线、面包屑 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.divider {
  border: 0;
  border-top: 1px solid rgba(138, 155, 181, 0.2);
  margin-block: 2rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray);
}

.breadcrumb a { color: var(--pale); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--gold); margin-inline: 0.3rem; }

/* 图片框 */
.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--steel), var(--night));
  border: 1px solid rgba(138, 155, 181, 0.15);
  isolation: isolate;
}

.img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top left, transparent 55%, rgba(212, 175, 55, 0.14) 100%);
  pointer-events: none;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
  transition: transform 0.5s ease;
}

.img-frame:hover img { transform: scale(1.02); }

.img-frame--portrait { aspect-ratio: 3 / 4; }
.img-frame--wide { aspect-ratio: 21 / 9; }

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* 返回顶部 */
.back-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 53, 0.6);
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, visibility 0.25s;
  z-index: var(--z-backtop);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--night);
}

/* 跳过链接 */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--gold);
  color: var(--night);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s ease;
  z-index: var(--z-skip);
}

.skip-link:focus {
  top: 0;
  color: var(--night);
}

/* 桌面侧轨 */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, var(--night) 0%, var(--primary) 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  z-index: var(--z-header);
}

.site-header__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.25rem 1.5rem 2rem;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--white);
}

.site-brand:hover { color: var(--white); }

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.site-brand__note {
  font-size: 0.6875rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  margin-right: -0.5rem;
}

.nav-toggle:hover { border-color: rgba(138, 155, 181, 0.3); }

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--pale);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: 2rem;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.site-nav__item { margin: 0; }

.site-nav__link {
  position: relative;
  display: block;
  padding: 0.7rem 1rem 0.7rem 1.25rem;
  color: var(--gray);
  border-left: 3px solid transparent;
  font-family: var(--font-display);
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  bottom: 0.35rem;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.site-nav__link:hover {
  color: var(--accent);
  background: rgba(255, 107, 53, 0.06);
  border-left-color: rgba(255, 107, 53, 0.6);
}

.site-nav__link:hover::after { width: 3.5rem; }

.site-nav__link[aria-current="page"] {
  color: var(--white);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.14), transparent 75%);
  font-weight: 600;
}

.site-nav__link[aria-current="page"]::after {
  width: 3.5rem;
  background: var(--gold);
}

.site-nav__cta {
  margin-top: auto;
  width: 100%;
}

.site-header__status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(138, 155, 181, 0.15);
}

.site-header__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.12), 0 0 12px rgba(0, 217, 255, 0.35);
  animation: status-pulse 2.4s ease-out infinite;
}

.site-header__status-text {
  font-size: 0.8125rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(0, 217, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 217, 255, 0); }
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: rgba(138, 155, 181, 0.1);
  z-index: 2;
  pointer-events: none;
}

.scroll-progress__fill {
  display: block;
  width: 100%;
  height: var(--scroll-progress, 0%);
  background: linear-gradient(180deg, var(--accent) 0%, var(--gold) 100%);
  transition: height 0.12s linear;
}

/* 页脚 */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--night) 0%, var(--primary) 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 40px, rgba(255, 255, 255, 0.018) 40px 41px);
  pointer-events: none;
}

.site-footer__container {
  position: relative;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 4vw, 4rem);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(138, 155, 181, 0.14);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.site-footer__tagline {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  margin-bottom: 1rem;
}

.site-footer__brief {
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 24rem;
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.site-footer__list a { color: var(--gray); transition: color 0.2s ease; }
.site-footer__list a:hover { color: var(--accent); }

.site-footer__contact-line {
  margin: 0 0 0.6rem;
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
}

.site-footer__trust {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.site-footer__icp {
  color: var(--gray);
  font-size: 0.8125rem;
  margin: 0;
}

.site-footer__copy {
  color: var(--gray);
  font-size: 0.8125rem;
  margin: 0;
}

/* 移动端 / 平板 */
@media (max-width: 959px) {
  body {
    padding-top: var(--header-h);
  }

  .site-header {
    inset: 0 0 auto;
    width: 100%;
    height: var(--header-h);
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: var(--night);
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.25rem;
  }

  .site-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .site-brand__name { font-size: 1.15rem; }
  .site-brand__note { letter-spacing: 0.18em; font-size: 0.625rem; }

  .nav-toggle { display: flex; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: min(84vw, 380px);
    margin: 0;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--night);
    border-right: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.4);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: var(--z-nav);
    overflow-y: auto;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .site-nav__cta {
    margin-top: 2rem;
    width: 100%;
  }

  .site-header__status { display: none; }

  .scroll-progress {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
  }

  .scroll-progress__fill {
    width: var(--scroll-progress, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .site-footer__meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 639px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand-block {
    max-width: 100%;
  }

  .back-top {
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
  }
}

/* 桌面主体偏移 */
@media (min-width: 960px) {
  body {
    margin-left: var(--sidebar-w);
  }
}

/* 减弱动效 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01s !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .back-top,
  .skip-link,
  .site-nav {
    transition: none;
  }
}
