/* ==========================================================================
   德信体育 · FANWALK — 共享站点样式 /assets/site.css
   夜间球场指挥台：炭黑底 · 墨绿面板 · 荧光青结构线 · 信号橙锚点
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body {
  margin: 0;
}

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

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

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

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩 */
  --ink-void: #080D0B;
  --ink-deep: #0D2119;
  --ink-field: #1D5B3F;
  --aqua: #43F0D0;
  --aqua-soft: rgba(67, 240, 208, 0.32);
  --signal: #FF6A2A;
  --signal-soft: rgba(255, 106, 42, 0.28);
  --stand: #C63E31;
  --paper: #F0E7D4;
  --bone: #F7F3E8;
  --mist: #9EAEA5;
  --night: #041018;

  /* 线框 */
  --line-soft: rgba(158, 174, 165, 0.16);
  --line-mid: rgba(158, 174, 165, 0.28);
  --line-strong: rgba(158, 174, 165, 0.46);

  /* 字体 */
  --font-display: "DIN Condensed", "Barlow Condensed", "Oswald", "Arial Narrow",
    "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "DIN Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "Courier New", monospace;

  /* 节奏 */
  --shell-max: 1240px;
  --radius-sm: 2px;
  --radius-md: 6px;
  --ease: cubic-bezier(0.32, 0.72, 0.28, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-void);
  background-image:
    radial-gradient(120% 88% at 82% -12%, rgba(29, 91, 63, 0.55) 0%, rgba(29, 91, 63, 0) 58%),
    radial-gradient(80% 60% at 2% 2%, rgba(67, 240, 208, 0.09) 0%, rgba(67, 240, 208, 0) 62%),
    linear-gradient(to right, rgba(158, 174, 165, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(158, 174, 165, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--aqua);
  color: #04120E;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- 4. 容器与骨架 ---------- */
.dx-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 720px) {
  .dx-shell { padding-inline: 32px; }
}

@media (min-width: 1200px) {
  .dx-shell { padding-inline: 44px; }
}

.dx-main {
  position: relative;
  padding-block: clamp(30px, 5vw, 66px) clamp(48px, 7vw, 96px);
}

/* ---------- 5. 跳转链接 ---------- */
.dx-skip {
  position: fixed;
  left: 16px;
  top: -96px;
  z-index: 200;
  display: inline-block;
  padding: 12px 22px;
  background: var(--aqua);
  color: #04120E;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px -14px rgba(67, 240, 208, 0.9);
  transition: top 0.2s var(--ease);
}

.dx-skip:focus,
.dx-skip:focus-visible {
  top: 12px;
}

/* ---------- 6. 页头 ---------- */
.dx-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 13, 11, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.dx-header__utility {
  background:
    linear-gradient(90deg, rgba(13, 33, 25, 0.96) 0%, rgba(13, 33, 25, 0.55) 52%, rgba(8, 13, 11, 0) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.dx-header__utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}

.dx-header__tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dx-header__tagline::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 2px;
  background: var(--aqua);
  box-shadow: 6px 0 0 -0.5px var(--signal);
}

.dx-header__utils {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.dx-header__util-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.dx-header__util-link:hover,
.dx-header__util-link:focus-visible {
  color: var(--aqua);
  border-bottom-color: var(--aqua);
}

.dx-header__main-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-block: 11px;
}

/* 品牌 */
.dx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.dx-brand__mark {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  background: conic-gradient(from 208deg, var(--aqua) 0deg, var(--ink-field) 168deg, var(--signal) 320deg, var(--aqua) 360deg);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: transform 0.24s var(--ease);
}

.dx-brand:hover .dx-brand__mark {
  transform: rotate(-18deg);
}

.dx-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.dx-brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--bone);
}

.dx-brand__latin {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--aqua);
}

/* 导航切换按钮 */
.dx-nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-sm);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.dx-nav-toggle:hover,
.dx-nav-toggle:focus-visible {
  border-color: var(--aqua);
  background: rgba(67, 240, 208, 0.08);
}

.dx-nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--aqua);
  transition: background-color 0.2s var(--ease);
}

.dx-nav-toggle__bars::before,
.dx-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--aqua);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.dx-nav-toggle__bars::before { top: -5px; }
.dx-nav-toggle__bars::after  { top: 5px; }

.dx-nav-toggle[aria-expanded="true"] .dx-nav-toggle__bars { background: transparent; }
.dx-nav-toggle[aria-expanded="true"] .dx-nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.dx-nav-toggle[aria-expanded="true"] .dx-nav-toggle__bars::after  { transform: translateY(-5px) rotate(-45deg); }

.dx-nav-toggle__label {
  white-space: nowrap;
}

/* 主导航 */
.dx-nav {
  min-width: 0;
}

.dx-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dx-nav__item {
  flex: 0 0 auto;
}

.dx-nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 12px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--mist);
  transition: color 0.18s var(--ease);
}

.dx-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--aqua);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease), background-color 0.18s var(--ease);
}

.dx-nav__link:hover,
.dx-nav__link:focus-visible {
  color: var(--bone);
}

.dx-nav__link:hover::after,
.dx-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.dx-nav__link[aria-current="page"] {
  color: var(--bone);
  font-weight: 700;
}

.dx-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--signal);
}

/* 登录锚点 */
.dx-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 17px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0A0F0C;
  background: var(--signal);
  border-radius: var(--radius-sm);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  box-shadow: 0 0 0 1px rgba(255, 106, 42, 0.55), 0 10px 26px -14px rgba(255, 106, 42, 0.95);
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.dx-login:hover,
.dx-login:focus-visible {
  background: #FF8A55;
  transform: translateY(-1px);
}

.dx-login__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0A0F0C;
  box-shadow: 0 0 0 3px rgba(10, 15, 12, 0.18);
}

/* 滚动进度尺 */
.dx-scrollmeter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(158, 174, 165, 0.14);
  overflow: hidden;
  pointer-events: none;
}

.dx-scrollmeter__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--aqua) 0%, var(--aqua) 62%, var(--signal) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* 桌面 / 移动切换 */
@media (max-width: 919px) {
  .dx-header__utility-inner {
    min-height: 34px;
  }

  .dx-header__tagline {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .dx-header__main-inner {
    align-items: center;
  }

  .dx-brand { order: 1; margin-right: auto; }
  .dx-nav-toggle { display: inline-flex; order: 2; }
  .dx-login { order: 3; padding: 9px 13px; font-size: 12.5px; letter-spacing: 0.03em; }

  .dx-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
  }

  .dx-nav[data-open] {
    display: block;
    animation: dx-nav-in 0.22s var(--ease) both;
  }

  .dx-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .dx-nav__link {
    display: block;
    padding: 13px 8px;
    font-size: 15px;
    border-bottom: 1px solid rgba(158, 174, 165, 0.1);
  }

  .dx-nav__link::after {
    left: 8px;
    right: auto;
    bottom: 9px;
    width: 20px;
  }
}

@media (max-width: 519px) {
  .dx-header__tagline::before { display: none; }

  .dx-header__util-link {
    padding: 6px 8px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .dx-brand__name { font-size: 17px; }
  .dx-brand__mark { width: 24px; height: 24px; }
  .dx-login { padding: 9px 11px; font-size: 11.5px; }
}

@media (min-width: 920px) {
  .dx-header__main-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 26px;
    padding-block: 12px;
  }

  .dx-brand { justify-self: start; }
  .dx-nav { justify-self: center; }
  .dx-login { justify-self: end; }
}

@keyframes dx-nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 7. 通用按钮 ---------- */
.dx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.dx-btn--solid {
  background: var(--signal);
  color: #0A0F0C;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

.dx-btn--solid:hover,
.dx-btn--solid:focus-visible {
  background: #FF8A55;
  transform: translateY(-1px);
}

.dx-btn--aqua {
  background: var(--aqua);
  color: #04120E;
}

.dx-btn--aqua:hover,
.dx-btn--aqua:focus-visible {
  background: #7CF5E1;
  transform: translateY(-1px);
}

.dx-btn--ghost {
  background: rgba(158, 174, 165, 0.05);
  border-color: var(--line-mid);
  color: var(--bone);
}

.dx-btn--ghost:hover,
.dx-btn--ghost:focus-visible {
  border-color: var(--aqua);
  color: var(--aqua);
  background: rgba(67, 240, 208, 0.08);
}

/* ---------- 8. 页脚 ---------- */
.dx-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  padding-top: 8px;
  background:
    linear-gradient(180deg, rgba(13, 33, 25, 0.62) 0%, var(--ink-deep) 46%, #060D09 100%);
  border-top: 1px solid var(--line-mid);
  overflow: hidden;
}

.dx-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(67, 240, 208, 0.5) 0 2px, transparent 2px 18px);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 94%);
  mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 94%);
  pointer-events: none;
}

.dx-footer::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 91, 63, 0.55) 0%, rgba(29, 91, 63, 0) 68%);
  pointer-events: none;
}

.dx-footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  padding-block: 52px 40px;
}

.dx-footer__brand {
  min-width: 0;
}

.dx-brand--footer .dx-brand__name {
  font-size: 21px;
}

.dx-footer__summary {
  margin-top: 16px;
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.72;
  color: var(--mist);
}

.dx-footer__cta {
  margin-top: 22px;
}

.dx-footer__col-title {
  margin-bottom: 15px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--aqua);
}

.dx-footer__links {
  display: grid;
  gap: 10px;
}

.dx-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: rgba(247, 243, 232, 0.74);
  transition: color 0.16s var(--ease);
}

.dx-footer__link::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 1px;
  background: var(--mist);
  transition: width 0.2s var(--ease), background-color 0.2s var(--ease);
}

.dx-footer__link:hover,
.dx-footer__link:focus-visible {
  color: var(--aqua);
}

.dx-footer__link:hover::before,
.dx-footer__link:focus-visible::before {
  width: 20px;
  background: var(--aqua);
}

.dx-footer__meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding-block: 24px 38px;
  border-top: 1px solid var(--line-soft);
}

.dx-footer__contact {
  min-width: 0;
}

.dx-footer__contact-line {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  line-height: 1.8;
  color: rgba(247, 243, 232, 0.82);
  word-break: break-word;
}

.dx-footer__note {
  margin-top: 10px;
  max-width: 76ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(158, 174, 165, 0.8);
}

.dx-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(158, 174, 165, 0.72);
}

.dx-footer__legal-sep {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--line-mid);
}

@media (min-width: 760px) {
  .dx-footer__grid {
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

@media (min-width: 880px) {
  .dx-footer__meta {
    grid-template-columns: minmax(0, 1.6fr) auto;
    align-items: start;
    gap: 32px;
  }

  .dx-footer__legal {
    justify-content: flex-end;
    text-align: right;
  }
}

/* ---------- 9. 面包屑 ---------- */
.dx-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(20px, 3vw, 32px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.dx-breadcrumb a {
  color: var(--mist);
  transition: color 0.16s var(--ease);
}

.dx-breadcrumb a:hover,
.dx-breadcrumb a:focus-visible {
  color: var(--aqua);
}

.dx-breadcrumb__sep {
  color: rgba(158, 174, 165, 0.45);
}

.dx-breadcrumb [aria-current="page"] {
  color: var(--bone);
}

/* ---------- 10. 通用标题组件 ---------- */
.dx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--aqua);
}

.dx-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--aqua);
}

.dx-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--bone);
}

.dx-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--bone);
}

.dx-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.22;
  color: var(--bone);
}

.dx-lead {
  max-width: 62ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: rgba(247, 243, 232, 0.8);
}

/* ---------- 11. 栅格 ---------- */
.dx-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 2.4vw, 28px);
}

@media (min-width: 640px) {
  .dx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 920px) {
  .dx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 12. 面板与阅读面 ---------- */
.dx-panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  background: rgba(13, 33, 25, 0.62);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(247, 243, 232, 0.86);
}

.dx-paper {
  padding: clamp(20px, 3.4vw, 34px);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 10% 0%, rgba(198, 62, 49, 0.09), transparent 58%);
  color: #16261E;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.95);
}

.dx-prose {
  max-width: 72ch;
}

.dx-prose p {
  margin-bottom: 1.05em;
  color: rgba(247, 243, 232, 0.82);
  line-height: 1.72;
}

.dx-prose h2,
.dx-prose h3 {
  margin-block: 1.4em 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--bone);
}

.dx-prose h2 { font-size: clamp(22px, 2.8vw, 30px); }
.dx-prose h3 { font-size: clamp(18px, 2vw, 22px); }

.dx-prose ul,
.dx-prose ol {
  margin-bottom: 1.1em;
  padding-left: 1.15em;
  list-style: disc;
  color: rgba(247, 243, 232, 0.82);
}

.dx-prose li {
  margin-bottom: 0.45em;
  line-height: 1.7;
}

.dx-prose a {
  color: var(--aqua);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dx-prose--paper {
  max-width: 74ch;
  padding: clamp(22px, 3.6vw, 38px);
  background: var(--paper);
  color: #16261E;
  border-radius: var(--radius-md);
}

.dx-prose--paper p,
.dx-prose--paper li {
  color: #23382D;
}

.dx-prose--paper h2,
.dx-prose--paper h3 {
  color: #10201A;
}

.dx-prose--paper a {
  color: #0F5A44;
}

/* ---------- 13. 图片容器 ---------- */
.dx-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background-color: var(--night);
  background-image:
    repeating-linear-gradient(135deg, rgba(67, 240, 208, 0.07) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--ink-deep) 0%, var(--night) 100%);
}

.dx-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(1.04);
}

.dx-media--wide   { aspect-ratio: 21 / 9; }
.dx-media--tall   { aspect-ratio: 3 / 4; }
.dx-media--square { aspect-ratio: 1 / 1; }

.dx-media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

@media (max-width: 519px) {
  .dx-media { aspect-ratio: 4 / 3; }
  .dx-media--wide { aspect-ratio: 16 / 9; }
}

/* ---------- 14. 回到顶部（由 JS 注入） ---------- */
.dx-totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px 11px 12px;
  background: rgba(13, 33, 25, 0.94);
  border: 1px solid var(--aqua-soft);
  border-radius: var(--radius-sm);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
    visibility 0.22s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.dx-totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dx-totop:hover,
.dx-totop:focus-visible {
  border-color: var(--aqua);
  color: var(--aqua);
}

.dx-totop__arrow {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid var(--aqua);
}

.dx-totop__text {
  white-space: nowrap;
}

@media (max-width: 519px) {
  .dx-totop {
    right: 12px;
    bottom: 12px;
    padding: 10px;
  }
  .dx-totop__text {
    display: none;
  }
}

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

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

  .dx-skip,
  .dx-totop,
  .dx-login,
  .dx-brand__mark {
    transition: none !important;
    transform: none !important;
  }
}
