/* ============================================================
   红蓝电竞 · 99棋牌中心  共享样式 /assets/site.css
   深夜战术室 + 赛场回放室
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption,
dl, dt, dd, blockquote { margin: 0; padding: 0; }

ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }

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

button { font: inherit; color: inherit; background: none; border: 0; }

#main-content { scroll-margin-top: 6rem; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #0A1022;
  --ink-800: #111C33;
  --line: #1E2C48;
  --line-strong: #2C3F73;
  --red: #E5323B;
  --red-deep: #8C1F27;
  --cyan: #38E0D8;
  --paper: #EEF2F8;
  --steel: #7C8AA5;
  --white: #FFFFFF;
  --body-tint: #C6D0E2;

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Roboto Mono', monospace;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shell-max: 1320px;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink-900);
  background-image:
    linear-gradient(rgba(30, 44, 72, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 44, 72, .22) 1px, transparent 1px);
  background-size: 88px 88px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

p { max-width: 42ch; }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: .5rem;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: .6rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #04211F;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .16s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

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

/* ---------- 4. 布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .7rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--white);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--white);
  text-transform: uppercase;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  color: var(--paper);
  max-width: 38ch;
}

.title-rule {
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 1rem;
  border-radius: 2px;
  background: var(--red);
}

.title-rule--cyan { background: var(--cyan); }

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
}

.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ---------- 5. 通用组件 ---------- */
.card {
  position: relative;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  background: var(--ink-800);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}

.card:hover {
  border-color: var(--red);
  background: #152340;
  transform: translateY(-2px);
}

.card--flat { background: transparent; }
.card--cyan:hover { border-color: var(--cyan); }

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--white);
}

.card__meta {
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--steel);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .55rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: rgba(30, 44, 72, .5);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .05em;
  color: var(--steel);
}

.tag--red {
  color: #FFB7BB;
  border-color: rgba(229, 50, 59, .45);
  background: rgba(229, 50, 59, .12);
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(56, 224, 216, .35);
  background: rgba(56, 224, 216, .08);
}

.data-num {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--white);
}

.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--white);
}

.stat__label {
  display: block;
  margin-top: .6rem;
  font-size: .76rem;
  letter-spacing: .14em;
  color: var(--steel);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .58rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .16s var(--ease);
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--sm {
  padding: .42rem .8rem;
  font-size: .78rem;
}

/* ---------- 7. 媒体容器（供页面阶段放置图位） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  aspect-ratio: 16 / 10;
  background-color: var(--ink-800);
  background-image:
    repeating-linear-gradient(135deg, rgba(30, 44, 72, .55) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 80% 16%, rgba(56, 224, 216, .12), transparent 46%),
    linear-gradient(180deg, #111C33 0%, #0A1022 100%);
  transition: border-color .18s var(--ease);
}

.media-frame:hover { border-color: var(--red); }

.media-frame img,
.media-frame svg,
.media-frame__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--tablet { aspect-ratio: 4 / 3; }
.media-frame--flat { aspect-ratio: auto; }

.media-frame__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .7rem .9rem;
  background: rgba(10, 16, 34, .86);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--body-tint);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb { padding-block: .9rem; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--steel);
}

.breadcrumb li { display: inline-flex; align-items: center; }

.breadcrumb li + li::before {
  content: "/";
  margin-right: .45rem;
  color: var(--line-strong);
}

.breadcrumb a { color: var(--body-tint); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- 9. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   10. 页头
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: .7rem clamp(.75rem, 2.6vw, 1.6rem);
  background: rgba(10, 16, 34, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: padding .2s var(--ease);
}

.site-header[data-scrolled="true"] {
  padding-top: .38rem;
  padding-bottom: .38rem;
}

.header-shell {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

/* 品牌浮岛 */
.brand-island {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
  padding: .38rem .95rem .38rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}

.brand-island:hover {
  border-color: var(--red);
  background: #16233D;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.brand-mark svg { display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--white);
  white-space: nowrap;
}

.brand-line {
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--steel);
  white-space: nowrap;
}

/* 导航胶囊岛 */
.nav-island {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: .2rem;
  padding: .26rem .4rem .26rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(17, 28, 51, .72);
  transition: background .16s var(--ease), border-color .16s var(--ease);
}

.nav-island::before {
  content: "";
  position: absolute;
  left: .42rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: var(--red);
  transform: translateY(-50%);
  transition: height .2s var(--ease);
}

.site-header[data-scrolled="true"] .nav-island::before { height: 1.4rem; }

.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
}

.nav-link {
  display: block;
  padding: .45rem .78rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--body-tint);
  white-space: nowrap;
  transition: color .14s var(--ease), background .14s var(--ease);
}

.nav-link:hover {
  color: var(--white);
  background: rgba(56, 224, 216, .1);
}

.nav-link[aria-current="page"] {
  color: var(--white);
  background: var(--red);
}

.nav-link[aria-current="page"]:hover { background: var(--red-deep); }

/* 状态与行动岛 */
.action-island {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .32rem .68rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--steel);
  white-space: nowrap;
}

.chip--status {
  color: #FFD9DB;
  border-color: rgba(229, 50, 59, .5);
  background: rgba(229, 50, 59, .14);
}

.chip--status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  animation: chip-pulse 2.4s ease-in-out infinite;
}

@keyframes chip-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.chip--service {
  color: var(--cyan);
  border-color: rgba(56, 224, 216, .38);
  background: rgba(56, 224, 216, .09);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 42px;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}

.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(30, 44, 72, .85);
  overflow: hidden;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
}

/* ============================================================
   11. 页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 7rem);
  background: var(--ink-900);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(24%, 360px);
  height: 3px;
  background: var(--red);
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: min(24%, 360px);
  width: 96px;
  height: 3px;
  background: var(--cyan);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr 1.35fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.footer-brand,
.footer-nav-col,
.footer-contact { min-width: 0; }

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--white);
}

.footer-brand-line {
  margin-top: .35rem;
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--cyan);
}

.footer-brand-desc {
  margin-top: .9rem;
  max-width: 30ch;
  font-size: .88rem;
  line-height: 1.8;
  color: var(--steel);
}

.footer-col-title {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--steel);
}

.footer-nav li + li { margin-top: .1rem; }

.footer-link {
  display: inline-block;
  padding: .28rem 0;
  font-size: .9rem;
  color: var(--body-tint);
  transition: color .14s var(--ease), box-shadow .14s var(--ease);
}

.footer-link:hover {
  color: var(--white);
  box-shadow: inset 0 -2px 0 var(--red);
}

.contact-list li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: .6rem;
  align-items: start;
  padding: .5rem 0;
  border-bottom: 1px dashed rgba(30, 44, 72, .95);
  font-size: .86rem;
}

.contact-label {
  padding-top: .15rem;
  font-size: .76rem;
  letter-spacing: .1em;
  color: var(--steel);
}

.contact-value {
  color: var(--paper);
  overflow-wrap: anywhere;
}

.contact-value--mono {
  font-family: var(--font-mono);
  letter-spacing: .02em;
  color: var(--white);
}

.contact-note {
  margin-top: 1rem;
  max-width: 34ch;
  font-size: .78rem;
  line-height: 1.8;
  color: var(--steel);
}

.service-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(17, 28, 51, .6);
}

.service-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: .85rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
}

.service-area {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--cyan);
}

.service-area::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

.icp { color: var(--steel); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: 1.25rem clamp(1.5rem, 3vw, 2rem);
}

.footer-closing {
  max-width: 60ch;
  font-size: .82rem;
  color: var(--steel);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--steel);
}

/* ============================================================
   12. 响应式
   ============================================================ */
@media (max-width: 1180px) {
  .chip--service { display: none; }
  .nav-link { padding: .45rem .6rem; font-size: .78rem; }
}

@media (max-width: 1023px) {
  .header-shell { flex-wrap: wrap; }

  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: auto;
  }

  .action-island { order: 4; }

  .nav-island {
    order: 5;
    flex: 1 1 100%;
    display: block;
    margin: 0;
    padding: .5rem;
    border-radius: var(--r-lg);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height .22s var(--ease), opacity .18s var(--ease),
                visibility 0s linear .22s;
  }

  .site-header[data-open] .nav-island {
    max-height: 30rem;
    margin-top: .5rem;
    opacity: 1;
    visibility: visible;
    transition: max-height .22s var(--ease), opacity .18s var(--ease);
  }

  .nav-island::before { display: none; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
  }

  .nav-link {
    padding: .7rem .9rem;
    border-radius: var(--r-md);
    font-size: .9rem;
  }

  .nav-link[aria-current="page"] {
    background: rgba(229, 50, 59, .18);
    box-shadow: inset 3px 0 0 var(--red);
    color: var(--white);
  }

  .btn--primary { padding: .5rem .85rem; font-size: .78rem; }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4 { grid-column: span 6; }
  .col-5, .col-7, .col-8, .col-9 { grid-column: span 6; }
  .col-6 { grid-column: span 6; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 760px) {
  .chip { display: none; }
  .nav-toggle__label { display: none; }
  .media-frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-12 { grid-column: span 1; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: span 1; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .brand-line { display: none; }
  .btn--primary { padding: .46rem .7rem; font-size: .74rem; }
  .service-strip__inner { font-size: .72rem; }
}

/* ============================================================
   13. 降低动效
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .chip--status::before { animation: none; }

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