/* ==========================================================================
   MANBET 登录入口 — 全站共享样式 /assets/site.css
   设计概念：塔克拉玛干轨道 — 侧边导轨 + 框景首屏 + 绿洲页脚
   ========================================================================== */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-dark);
  background-color: var(--c-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: 100%;
}

ul,
ol {
  list-style: none;
}

/* ---------- CSS Variables ---------- */
:root {
  --c-primary: #0A1F44;
  --c-primary-2: #142B5C;
  --c-primary-3: #1E3A8A;
  --c-gold: #D4A53A;
  --c-gold-soft: rgba(212, 165, 58, 0.3);
  --c-desert: #C87941;
  --c-oasis: #2E8B57;
  --c-light: #F3F4F6;
  --c-dark: #1F2937;
  --c-white: #FFFFFF;

  --f-head: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --f-body: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;

  --rail-w: 272px;
  --header-h: 64px;
  --container: 1200px;
  --gutter: 32px;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 300ms;
}

/* ---------- Layout ---------- */
.container,
.content-wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: 80px;
  padding-bottom: 80px;
}

#main-content {
  margin-left: var(--rail-w);
  min-height: 60vh;
  outline: none;
  scroll-margin-top: var(--header-h);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-head);
  font-weight: 800;
  line-height: 1.25;
  color: var(--c-primary);
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.375rem, 1.8vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 12px 24px;
  background: var(--c-gold);
  color: var(--c-primary);
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: top 0.3s var(--ease);
}

.skip-link:focus-visible {
  top: 0;
  outline: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--f-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--gold {
  background: linear-gradient(135deg, var(--c-gold), #B8860B);
  color: var(--c-primary);
  box-shadow: 0 4px 20px rgba(212, 165, 58, 0.35);
}

.btn--gold:hover {
  box-shadow: 0 10px 32px rgba(212, 165, 58, 0.45);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(212, 165, 58, 0.5);
  color: var(--c-gold);
}

.btn--ghost:hover {
  border-color: var(--c-gold);
  background: rgba(212, 165, 58, 0.1);
}

/* ---------- Header / Side Rail ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 200;
  display: flex;
  background: linear-gradient(180deg, var(--c-primary) 0%, #081832 100%);
  border-right: 1px solid rgba(212, 165, 58, 0.12);
  overflow: hidden;
}

.brand-rail {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 32px 22px 28px;
  overflow-y: auto;
}

.brand-rail::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 58, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.brand-rail::after {
  content: '';
  position: absolute;
  bottom: -48px;
  left: -56px;
  width: 150px;
  height: 150px;
  border-radius: 42% 58% 60% 40% / 45% 55% 45% 55%;
  background: rgba(200, 121, 65, 0.07);
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 0;
}

.brand-anchor {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--c-white);
  font-family: var(--f-head);
  transition: background var(--speed) var(--ease);
}

.brand-anchor:hover {
  background: rgba(255, 255, 255, 0.04);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--c-gold), #B8860B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--c-primary);
  box-shadow: 0 4px 16px rgba(212, 165, 58, 0.4);
  flex-shrink: 0;
  line-height: 1;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name strong {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--c-white);
}

.brand-name small {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.22em;
  margin-top: 2px;
}

/* Track Navigation */
.track-nav {
  position: relative;
  z-index: 1;
  margin-top: 44px;
}

.track-nav__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 4px;
}

.track-nav__list::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(212, 165, 58, 0.35), rgba(212, 165, 58, 0.04));
}

.track-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-family: var(--f-head);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.track-nav__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  flex-shrink: 0;
  margin-left: 8px;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.track-nav__label {
  position: relative;
}

.track-nav__label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--c-gold);
  transition: width 0.3s var(--ease);
}

.track-nav__link:hover {
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.04);
}

.track-nav__link:hover .track-nav__dot {
  border-color: var(--c-gold);
}

.track-nav__link:hover .track-nav__label::after {
  width: 100%;
}

.track-nav__link[aria-current="page"] {
  color: var(--c-gold);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(212, 165, 58, 0.14), rgba(212, 165, 58, 0.02));
}

.track-nav__link[aria-current="page"] .track-nav__dot {
  background: var(--c-gold);
  border-color: var(--c-gold);
  box-shadow: 0 0 12px rgba(212, 165, 58, 0.5);
}

.track-nav__link[aria-current="page"] .track-nav__label::after {
  width: 100%;
}

.track-nav__link.is-spied {
  color: var(--c-gold);
}

.track-nav__link.is-spied .track-nav__dot {
  border-color: var(--c-gold);
  background: rgba(212, 165, 58, 0.4);
}

/* Rail Footer */
.rail-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  padding-top: 32px;
}

.rail-footer .btn {
  width: 100%;
}

.rail-update {
  text-align: center;
  font-family: var(--f-head);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 14px;
}

/* Mobile Bar */
.mobile-bar {
  display: none;
}

.nav-toggle {
  display: none;
}

/* Progress Rail */
.progress-rail {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 4px;
  z-index: 250;
  background: rgba(212, 165, 58, 0.08);
  pointer-events: none;
}

.progress-rail__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-gold), #F0D88A);
  border-radius: 0 999px 999px 0;
  box-shadow: 0 0 8px rgba(212, 165, 58, 0.5);
  transition: width 0.08s linear;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-left: var(--rail-w);
  background: linear-gradient(180deg, var(--c-primary) 0%, #060F26 100%);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--f-body);
  font-size: 15px;
}

.footer-upper {
  border-bottom: 1px solid rgba(212, 165, 58, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 48px;
}

.footer-brand .brand-anchor {
  padding-left: 0;
  padding-right: 0;
}

.footer-trust {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
  max-width: 360px;
}

.footer-heading {
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.25s var(--ease);
}

.footer-list a:hover {
  color: var(--c-gold);
}

.footer-mid {
  border-bottom: 1px solid rgba(212, 165, 58, 0.08);
}

.footer-mid__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  flex-wrap: wrap;
}

.footer-contact__item {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.7;
}

.footer-icp p {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid rgba(212, 165, 58, 0.2);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-family: var(--f-head);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(212, 165, 58, 0.04);
}

.footer-lower__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.25s var(--ease);
}

.footer-legal a:hover {
  color: var(--c-gold);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 28px 0 8px;
  font-family: var(--f-head);
  font-size: 13px;
  color: rgba(31, 41, 55, 0.5);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  color: rgba(31, 41, 55, 0.3);
}

.breadcrumb a {
  color: var(--c-primary-3);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--c-gold);
  text-decoration: underline;
}

/* ---------- Framed Hero ---------- */
.framed-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 88% 12%, rgba(212, 165, 58, 0.12), transparent 48%),
    linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-2) 100%);
  color: var(--c-white);
  overflow: hidden;
  isolation: isolate;
}

.framed-hero::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  left: 16px;
  border: 1px solid rgba(212, 165, 58, 0.35);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  z-index: 1;
}

.framed-hero::after {
  content: '';
  position: absolute;
  bottom: -70px;
  right: -70px;
  width: 280px;
  height: 280px;
  transform: rotate(-18deg);
  border-radius: 38% 62% 64% 36% / 42% 36% 64% 58%;
  background: rgba(200, 121, 65, 0.14);
  pointer-events: none;
  z-index: 0;
}

.framed-hero > * {
  position: relative;
  z-index: 2;
}

.frame-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: var(--c-gold);
  border-style: solid;
  pointer-events: none;
  z-index: 3;
}

.frame-corner--tl {
  top: 6px;
  left: 6px;
  border-width: 3px 0 0 3px;
  border-radius: 14px 0 0 0;
}

.frame-corner--tr {
  top: 6px;
  right: 6px;
  border-width: 3px 3px 0 0;
  border-radius: 0 14px 0 0;
}

.frame-corner--bl {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 14px;
}

.frame-corner--br {
  bottom: 6px;
  right: 6px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 14px 0;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 32px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--12 {
  grid-template-columns: repeat(12, 1fr);
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

/* Tablet & Mobile */
@media (max-width: 1023px) {
  #main-content,
  .site-footer {
    margin-left: 0;
  }

  #main-content {
    padding-top: var(--header-h);
  }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--header-h);
    border-right: none;
    border-bottom: 1px solid rgba(212, 165, 58, 0.14);
    background: rgba(10, 31, 68, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: block;
    overflow: visible;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 16px;
  }

  .mobile-bar .brand-anchor {
    padding: 4px 8px;
  }

  .mobile-bar .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 17px;
    box-shadow: 0 3px 10px rgba(212, 165, 58, 0.35);
  }

  .mobile-bar .brand-name strong {
    font-size: 17px;
  }

  .mobile-bar .brand-name small {
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(212, 165, 58, 0.25);
    border-radius: var(--radius-pill);
    background: rgba(212, 165, 58, 0.06);
    color: var(--c-gold);
    font-family: var(--f-head);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  }

  .nav-toggle:hover {
    background: rgba(212, 165, 58, 0.12);
    border-color: rgba(212, 165, 58, 0.4);
  }

  .nav-toggle__lines {
    position: relative;
    width: 18px;
    height: 14px;
    display: block;
  }

  .nav-toggle__line {
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
  }

  .nav-toggle__line:nth-child(1) { top: 0; }
  .nav-toggle__line:nth-child(2) { top: 6px; }
  .nav-toggle__line:nth-child(3) { top: 12px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
    top: 6px;
    transform: 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) {
    top: 6px;
    transform: rotate(-45deg);
  }

  .nav-toggle__text {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .brand-rail {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    width: min(340px, 88vw);
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 24px 20px 28px;
    transform: translateX(-110%);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--c-primary) 0%, #081832 100%);
    box-shadow: none;
  }

  .brand-rail[data-open] {
    transform: translateX(0);
    box-shadow: 28px 0 64px rgba(0, 0, 0, 0.35);
  }

  .brand-rail .brand-anchor {
    margin-bottom: 8px;
  }

  .track-nav {
    margin-top: 28px;
  }

  .rail-footer {
    margin-top: 32px;
  }

  body.nav-locked {
    overflow: hidden;
  }

  .progress-rail {
    left: 0;
    top: var(--header-h);
    height: 3px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 44px;
    padding-bottom: 36px;
  }

  .footer-mid__row {
    flex-direction: column;
    gap: 20px;
  }

  .footer-lower__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .framed-hero {
    min-height: 360px;
    padding: 48px 32px;
  }
}

/* Small Mobile */
@media (max-width: 767px) {
  :root {
    --gutter: 20px;
  }

  .framed-hero {
    min-height: 300px;
    padding: 40px 24px;
    border-radius: 22px;
  }

  .framed-hero::before {
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .frame-corner {
    width: 24px;
    height: 24px;
  }

  .canvas-area {
    min-height: 240px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .skip-link {
    transition: none;
  }
}
