/* ==========================================================
   乐鱼APP(CHINA)官方网站 — Site Kit 共享样式
   路径：/assets/site.css
   ========================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --c-primary: #0A192F;
  --c-primary-light: #1B2A4A;
  --c-accent: #FF6B35;
  --c-accent-gold: #FFB347;
  --c-bg: #121212;
  --c-surface: #2A2A2A;
  --c-surface-1: #1E1E1E;
  --c-white: #FFFFFF;
  --c-muted: #B0B0B0;
  --c-success: #28A745;
  --c-danger: #FF4136;

  --font-heading: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: Oswald, "Arial Narrow", Impact, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .16);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .32);

  --header-z: 200;
  --skip-z: 400;

  --container-max: 1200px;
  --gutter: 24px;
  --transition: .2s ease-out;
}

/* ---------- Reset 与基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-white);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { display: block; }
#main-content { scroll-margin-top: 84px; }
#main-content:focus { outline: none; }

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

ul, ol { margin: 0; }

a {
  color: var(--c-accent-gold);
}

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

button { font: inherit; }

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

::selection {
  background: rgba(255, 107, 53, .38);
  color: var(--c-white);
}

/* ---------- 通用排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--c-white);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 1.2vw + 1.4rem, 2.5rem); }
h2 { font-size: clamp(1.5rem, .8vw + 1.1rem, 2rem); }
h3 { font-size: clamp(1.125rem, .4vw + 1rem, 1.375rem); }

p { margin-bottom: 1em; }

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding: 64px 0;
}

.section--tight { padding: 32px 0; }
.section--loose { padding: 96px 0; }
.section--muted { background: var(--c-surface-1); }

.content {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-muted);
}

.content h1,
.content h2,
.content h3 {
  color: var(--c-white);
  margin-top: 1.5em;
}

.content a {
  color: var(--c-accent-gold);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: var(--skip-z);
  background: var(--c-accent);
  color: var(--c-white);
  padding: 10px 20px;
  border-radius: 0 0 14px 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--shadow-md);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-white);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn--primary {
  background: var(--c-accent);
  color: var(--c-white);
  box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
}

.btn--primary:hover {
  background: #FF7B4A;
  box-shadow: 0 10px 28px rgba(255, 107, 53, .35);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, .22);
  color: var(--c-white);
}

.btn--ghost:hover {
  border-color: var(--c-accent);
  color: var(--c-accent-gold);
  background: rgba(255, 107, 53, .08);
}

.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--lg { padding: 14px 32px; font-size: 18px; }

/* ---------- 标签与徽章 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--c-primary-light);
  color: var(--c-muted);
  line-height: 1.4;
}

.tag--accent { background: rgba(255, 107, 53, .14); color: var(--c-accent-gold); }
.tag--green  { background: rgba(40, 167, 69, .14); color: var(--c-success); }
.tag--red    { background: rgba(255, 65, 54, .14); color: var(--c-danger); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .14);
  background: var(--c-primary-light);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  background: var(--c-primary-light);
  border-color: rgba(255, 107, 53, .35);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ---------- 图片容器基础 ---------- */
.img-frame {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-surface));
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 80% 20%, rgba(255, 107, 53, .12), transparent 60%);
}

.img-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-muted);
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(255, 255, 255, .25);
}

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

.breadcrumb a:hover { text-decoration: underline; }

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

/* ---------- 顶部状态条 ---------- */
.topbar {
  background: var(--c-primary);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 13px;
  color: var(--c-muted);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
}

.topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-accent);
  color: var(--c-white);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--c-white);
  font-weight: 500;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, .18);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(40, 167, 69, .18); }
  50% { box-shadow: 0 0 0 7px rgba(40, 167, 69, .06); }
}

.topbar__trust {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 粘性头部 ---------- */
.site-header {
  position: sticky;
  top: 3px;
  z-index: var(--header-z);
  background: var(--c-primary);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(120deg, transparent 0 18px, rgba(255, 107, 53, .05) 18px 36px);
  pointer-events: none;
}

.header-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 72px;
}

.site-header .brand {
  margin-right: auto;
}

/* ---------- 进度条 ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 350;
  pointer-events: none;
  background: transparent;
}

.progress-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-gold) 100%);
  transition: width .18s ease-out;
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: .01em;
}

.brand__accent {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-accent);
  margin-left: 2px;
  letter-spacing: .04em;
}

.brand__tagline {
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: .02em;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.brand__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 179, 71, .16);
  border: 1px solid rgba(255, 179, 71, .45);
  color: var(--c-accent-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

.brand--footer .brand__name { font-size: 22px; }
.brand--footer .brand__accent { font-size: 20px; }
.brand--footer .brand__tagline { font-size: 12px; padding-left: 10px; }
.brand--footer .brand__badge { font-size: 10px; padding: 2px 8px; }

/* ---------- 主导航 ---------- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  color: var(--c-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color .2s ease-out, background .2s ease-out;
}

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

.site-nav__link[aria-current="page"] {
  color: var(--c-accent-gold);
  background: rgba(255, 107, 53, .12);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-accent);
}

.site-nav__index {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-accent);
  letter-spacing: .06em;
  transform: translateY(-1px);
}

/* ---------- 头部操作区 ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.nav-toggle:hover {
  border-color: var(--c-accent);
  background: rgba(255, 107, 53, .1);
}

.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform .2s ease-out, opacity .2s ease-out, background .2s;
}

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

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

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

/* ---------- 响应式头部：平板与桌面紧凑模式 ---------- */
@media (max-width: 1024px) {
  .topbar__trust { display: none; }
  .brand__tagline { display: none; }
  .header-actions__cta { display: none; }
  .site-nav__link { padding: 10px 10px; font-size: 13px; }
}

/* ---------- 响应式头部：移动端 ---------- */
@media (max-width: 860px) {
  .topbar { display: none; }

  .header-main {
    min-height: 64px;
    gap: 10px;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 10px 16px 20px;
    background: var(--c-primary);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  .site-nav[data-open] { display: block; }

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

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 14px;
  }

  .site-nav__link[aria-current="page"]::after {
    left: auto;
    right: auto;
    width: 3px;
    height: 22px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
  }
}

@media (max-width: 560px) {
  .brand__badge { display: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 88px;
  background-color: var(--c-primary);
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  color: var(--c-muted);
}

.footer-top {
  position: relative;
}

.footer-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 42%;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-gold) 100%);
  border-radius: 0 4px 4px 0;
}

.footer-top .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 56px 0 48px;
}

.footer-brand__desc {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  max-width: 42ch;
}

.footer-brand__trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--c-accent-gold);
}

.footer-brand__trust::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
}

.footer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 16px;
}

.footer__title::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--c-accent);
  transform: rotate(45deg);
  border-radius: 2px;
  flex-shrink: 0;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s, padding-left .2s;
}

.footer-col a:hover {
  color: var(--c-white);
  padding-left: 4px;
}

.footer-contact p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.footer-contact__note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-muted);
  border-left: 2px solid var(--c-accent);
  padding-left: 10px;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background-color: #060D1A;
  background-image: none;
  padding: 16px 0;
  font-size: 13px;
  color: var(--c-muted);
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- 响应式页脚 ---------- */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 40px 0 32px;
  }

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

  .footer-top::before { width: 64%; }
}

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

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

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

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

  .status-dot { animation: none; }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
