/* ===== 凤凰竞界 全站共享样式 ===== */

/* ---------- Reset 与基础变量 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --phx-red: #E63946;
  --phx-blue: #0B1D3A;
  --phx-paper: #FDF6EC;
  --phx-ink: #1A1A2E;
  --phx-mist: #F0F4F8;
  --phx-orange: #FF6B35;
  --phx-green: #2D6A4F;
  --phx-gold: #FFB347;
  --grad-gold: linear-gradient(135deg, #FFB347, #FF6B35);
  --grad-fire: linear-gradient(135deg, #E63946, #FF6B35);
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
  --container: 1280px;
  --gutter: 28px;
  --header-z: 80;
  --shadow-modal: 0 20px 48px rgba(11, 29, 58, 0.18);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--phx-ink);
  background: var(--phx-paper);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--phx-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--phx-orange);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ---------- 可访问性工具 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 120;
  background: var(--phx-red);
  color: #FDF6EC;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
  color: #FDF6EC;
}

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

/* ---------- 容器与段落 ---------- */
.page-container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page-section {
  padding: 96px 0;
}

.page-section--tight {
  padding: 64px 0;
}

/* ---------- 通用栅格 ---------- */
.phx-grid {
  display: grid;
  gap: 28px;
}

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

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

@media (max-width: 1024px) {
  .phx-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .phx-grid--2,
  .phx-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 按钮 ---------- */
.phx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.phx-btn--primary {
  background: var(--grad-fire);
  color: #FDF6EC;
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.32);
}

.phx-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(230, 57, 70, 0.4);
  color: #FDF6EC;
}

.phx-btn--dark {
  background: var(--phx-blue);
  color: #FDF6EC;
}

.phx-btn--dark:hover {
  background: #12294f;
  transform: translateY(-2px);
  color: #FDF6EC;
}

.phx-btn--ghost {
  background: transparent;
  color: var(--phx-red);
  box-shadow: inset 0 0 0 2px var(--phx-red);
}

.phx-btn--ghost:hover {
  background: rgba(230, 57, 70, 0.08);
  color: var(--phx-red);
}

/* ---------- 面板 ---------- */
.phx-panel {
  background: var(--phx-paper);
  border: 1px solid rgba(26, 26, 46, 0.08);
  border-left: 4px solid var(--phx-red);
  border-radius: 6px;
  padding: 32px;
  box-shadow: 0 8px 28px rgba(11, 29, 58, 0.08);
}

.phx-panel--dark {
  background: var(--phx-blue);
  border-left-color: var(--phx-red);
  color: rgba(253, 246, 236, 0.9);
}

.phx-panel--dark h1,
.phx-panel--dark h2,
.phx-panel--dark h3 {
  color: #FDF6EC;
}

.phx-panel--paper {
  background: var(--phx-paper);
  color: var(--phx-ink);
}

.phx-panel--red {
  background: var(--phx-red);
  border-left-color: var(--phx-blue);
  color: #FDF6EC;
}

.phx-panel--red h1,
.phx-panel--red h2,
.phx-panel--red h3 {
  color: #FDF6EC;
}

/* ---------- 段落标签与导语 ---------- */
.phx-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--phx-red);
  margin-bottom: 14px;
}

.phx-section-label::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--grad-fire);
  transform: skewX(-30deg);
}

.phx-lead {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--phx-ink);
}

.phx-lead--light {
  color: rgba(253, 246, 236, 0.86);
}

/* ---------- 面包屑 ---------- */
.phx-breadcrumbs {
  --crumb-text: rgba(253, 246, 236, 0.72);
  --crumb-sep: rgba(253, 246, 236, 0.32);
  --crumb-now: var(--phx-gold);
  display: block;
  margin-bottom: 18px;
}

.phx-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phx-breadcrumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--crumb-sep);
  font-family: var(--font-mono);
}

.phx-breadcrumbs a {
  color: var(--crumb-text);
  text-decoration: none;
  transition: color 0.2s;
}

.phx-breadcrumbs a:hover {
  color: var(--crumb-now);
}

.phx-breadcrumbs li:last-child {
  color: var(--crumb-now);
  font-weight: 700;
}

.phx-breadcrumbs--paper {
  --crumb-text: rgba(26, 26, 46, 0.72);
  --crumb-sep: rgba(26, 26, 46, 0.32);
  --crumb-now: var(--phx-red);
}

/* ---------- 页面标题区 ---------- */
.phx-page-head {
  position: relative;
  background: var(--phx-blue);
  color: #FDF6EC;
  padding: 96px 0 68px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
}

.phx-page-head .page-container {
  position: relative;
}

.phx-page-head::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 24px;
  width: 300px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FFB347, #E63946);
  transform: skewX(-30deg);
  opacity: 0.7;
  pointer-events: none;
}

.phx-page-head h1 {
  display: inline-block;
  color: #FDF6EC;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  transform: skewX(-4deg);
  transform-origin: left bottom;
}

.phx-page-head__desc {
  max-width: 760px;
  color: rgba(253, 246, 236, 0.78);
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- 分割线与标签 ---------- */
.phx-divider {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent, #E63946 20%, #FFB347 80%, transparent);
  border: none;
  transform: skewX(-20deg);
}

.phx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 3px;
  background: rgba(230, 57, 70, 0.12);
  color: var(--phx-red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.phx-tag--dark {
  background: var(--phx-blue);
  color: #FDF6EC;
}

.phx-tag--gold {
  background: var(--grad-gold);
  color: var(--phx-blue);
}

.phx-tag--success {
  background: rgba(45, 106, 79, 0.14);
  color: var(--phx-green);
}

/* ---------- 正文排版容器 ---------- */
.content-article {
  font-size: 16px;
  line-height: 1.75;
  color: var(--phx-ink);
}

.content-article > p {
  margin-bottom: 1em;
}

.content-article h2 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-family: var(--font-display);
  font-weight: 900;
}

.content-article h3 {
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  font-family: var(--font-display);
  font-weight: 900;
}

.content-article ul {
  margin-bottom: 1em;
}

.content-article ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 0.55em;
}

.content-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 11px;
  height: 1px;
  background: var(--phx-red);
  transform: skewX(-30deg);
}

.content-article ol {
  list-style: decimal;
  padding-left: 1.3em;
  margin-bottom: 1em;
}

.content-article ol li {
  margin-bottom: 0.4em;
}

.content-article blockquote {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: var(--phx-mist);
  border-left: 4px solid var(--phx-red);
  border-radius: 0 8px 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--phx-ink);
}

.content-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 1.5em 0;
}

.content-article th,
.content-article td {
  border: 1px solid rgba(26, 26, 46, 0.1);
  padding: 12px;
  text-align: left;
}

.content-article th {
  background: var(--phx-blue);
  color: #FDF6EC;
}

.content-article tr:nth-child(even) td {
  background: var(--phx-mist);
}

/* ---------- 数据样式 ---------- */
.data-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  padding: 12px 16px 0;
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #FFB347, #FF6B35 45%, #E63946 80%);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 2;
  pointer-events: none;
}

.site-header__capsule {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 6px 8px 6px 22px;
  background: rgba(11, 29, 58, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(253, 246, 236, 0.12);
  border-left: 3px solid var(--phx-red);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(11, 29, 58, 0.28);
}

.site-header__capsule::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--phx-red);
  transform: translateY(-50%) rotate(45deg);
  border-radius: 1px;
  pointer-events: none;
}

/* 品牌 */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand__mark {
  width: 40px;
  height: 40px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(230, 57, 70, 0.35));
}

.site-brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #FDF6EC;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transform: skewX(-4deg);
}

.site-brand__name em {
  font-style: normal;
  color: var(--phx-red);
}

/* 导航 */
.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__item {
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(253, 246, 236, 0.82);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.site-nav__link:hover {
  background: rgba(230, 57, 70, 0.14);
  color: var(--phx-gold);
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  background: linear-gradient(135deg, #E63946, #FF6B35);
  color: #FDF6EC;
  box-shadow: 0 5px 16px rgba(230, 57, 70, 0.35);
}

/* 搜索入口 */
.site-header__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(253, 246, 236, 0.16);
  background: rgba(253, 246, 236, 0.06);
  color: #FDF6EC;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.site-header__search:hover {
  color: var(--phx-gold);
  border-color: rgba(255, 179, 71, 0.5);
  text-decoration: none;
}

.site-header__search svg {
  width: 18px;
  height: 18px;
}

/* 汉堡按钮 */
.site-header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(253, 246, 236, 0.16);
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.16);
  transition: background 0.2s;
  flex-shrink: 0;
}

.site-header__toggle:hover {
  background: rgba(230, 57, 70, 0.34);
}

.site-header__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #FDF6EC;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

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

/* 移动端头部导航 */
@media (max-width: 860px) {
  .site-header__capsule {
    padding-left: 16px;
    gap: 10px;
  }

  .site-header__capsule::after {
    display: none;
  }

  .site-header__search {
    display: none;
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 6px;
    right: 6px;
    top: calc(100% + 12px);
    margin-left: 0;
    background: rgba(11, 29, 58, 0.98);
    border: 1px solid rgba(253, 246, 236, 0.1);
    border-top: 3px solid var(--phx-red);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 40px rgba(11, 29, 58, 0.42);
    padding: 14px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    pointer-events: none;
  }

  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    display: block;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    color: #FDF6EC;
  }

  .site-nav__link[aria-current="page"] {
    background: linear-gradient(135deg, #E63946, #FF6B35);
    color: #FDF6EC;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--phx-blue);
  color: rgba(253, 246, 236, 0.82);
  margin-top: auto;
  position: relative;
}

.site-footer__inner {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 72px var(--gutter) 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 56px;
  position: relative;
}

.site-footer__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  width: 220px;
  height: 4px;
  background: linear-gradient(90deg, #E63946, #FFB347, transparent);
  transform: skewX(-30deg);
}

.site-footer__col--about,
.site-footer__col--nav,
.site-footer__col--contact {
  min-width: 0;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 14px;
}

.site-footer__brand:hover {
  text-decoration: none;
}

.site-footer__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.site-footer__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  color: #FDF6EC;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.site-footer__name em {
  font-style: normal;
  color: var(--phx-gold);
}

.site-footer__claim {
  max-width: 440px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(253, 246, 236, 0.82);
  margin-bottom: 12px;
}

.site-footer__trust {
  font-size: 13px;
  color: rgba(253, 246, 236, 0.72);
  border-left: 2px solid var(--phx-red);
  padding-left: 10px;
  margin-bottom: 14px;
  max-width: 420px;
}

.site-footer__icp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(253, 246, 236, 0.6);
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: var(--phx-gold);
  letter-spacing: 0.14em;
  border-left: 4px solid var(--phx-red);
  padding-left: 10px;
  margin-bottom: 18px;
}

.site-footer__list {
  text-align: left;
}

.site-footer__list li {
  margin-bottom: 4px;
}

.site-footer__list a {
  display: inline-block;
  padding: 4px 0;
  color: rgba(253, 246, 236, 0.76);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.site-footer__list a:hover {
  color: var(--phx-gold);
  padding-left: 8px;
  text-decoration: none;
}

.site-footer__contact {
  margin-bottom: 18px;
}

.site-footer__contact li {
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(253, 246, 236, 0.82);
}

.site-footer__feedback {
  font-size: 13px;
  background: rgba(230, 57, 70, 0.14);
  border-left: 3px solid var(--phx-red);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  color: rgba(253, 246, 236, 0.86);
}

.site-footer__bottom {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid rgba(253, 246, 236, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__copyright {
  font-size: 14px;
  color: rgba(253, 246, 236, 0.65);
}

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__legal a {
  color: rgba(253, 246, 236, 0.6);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__legal a:hover {
  color: var(--phx-gold);
  text-decoration: none;
}

@media (max-width: 980px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    padding-top: 56px;
    gap: 36px;
  }

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

/* ---------- 滚动显现与章节高亮 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

[data-scroll-spy] a.is-active {
  color: var(--phx-red);
  font-weight: 800;
}

[data-scroll-spy] a.is-active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 2px;
  background: var(--phx-red);
  margin-right: 8px;
  vertical-align: middle;
  transform: skewX(-30deg);
}

/* ---------- 平板与手机基础适配 ---------- */
@media (max-width: 768px) {
  .page-section {
    padding: 72px 0;
  }

  .phx-page-head {
    padding: 72px 0 56px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 0 100%);
  }

  .phx-panel {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .site-brand__name {
    font-size: 1.1rem;
  }

  .site-brand__mark {
    width: 36px;
    height: 36px;
  }

  .phx-btn {
    width: 100%;
  }
}

/* ---------- 焦点与减少动态效果 ---------- */
@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;
  }

  .site-header {
    transition: none;
  }

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