/* ==========================================================
   乐鱼主站 / fast-go-leyu.com.cn
   全站共享样式 — /assets/site.css
   ========================================================== */

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: #E8F0F8;
  background-color: #0B0F1A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: #00E5FF;
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease;
}

a:hover {
  color: #00FF88;
}

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

main {
  display: block;
  flex: 1 0 auto;
  width: 100%;
}

/* ---------- 2. Tokens ---------- */
:root {
  --ly-bg: #0B0F1A;
  --ly-panel: #12172B;
  --ly-blue: #00E5FF;
  --ly-green: #00FF88;
  --ly-orange: #FF7A00;
  --ly-crimson: #FF2D78;
  --ly-text: #E8F0F8;
  --ly-muted: #8296AB;
  --ly-line: rgba(255, 255, 255, 0.10);
  --ly-line-acc: rgba(0, 229, 255, 0.28);
  --ly-grad-cg: linear-gradient(135deg, #00E5FF 0%, #00FF88 100%);
  --ly-grad-oc: linear-gradient(135deg, #FF7A00 0%, #FF2D78 100%);
  --ly-font: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ly-container-w: 1280px;
  --ly-space-1: clamp(0.75rem, 1.5vw, 1.25rem);
  --ly-space-2: clamp(1.5rem, 3.5vw, 3rem);
  --ly-space-3: clamp(3rem, 6vw, 5rem);
  --ly-radius: 4px 16px 4px 16px;
}

/* ---------- 3. Base Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--ly-font);
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ly-text);
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 200;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

p {
  max-width: 65ch;
}

::selection {
  background: rgba(0, 229, 255, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ly-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. Accessibility ---------- */
.ly-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 22px;
  background: var(--ly-blue);
  color: #0B0F1A;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transform: translateY(-300%);
  transition: transform 0.25s ease;
}

.ly-skip:focus {
  transform: translateY(0);
  color: #0B0F1A;
}

/* ---------- 5. Header ---------- */
.ly-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ly-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--ly-grad-cg);
  z-index: 5;
  border-radius: 0 3px 3px 0;
  transition: width 0.1s linear;
}

.ly-header-inner {
  max-width: var(--ly-container-w);
  margin: 0 auto;
  padding: 0 var(--ly-space-2);
}

.ly-masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 0 6px;
  gap: 12px;
}

.ly-masthead-meta {
  justify-self: start;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ly-muted);
  user-select: none;
  white-space: nowrap;
}

.ly-brand {
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--ly-text);
  padding: 0 10px;
}

.ly-brand:hover {
  color: var(--ly-text);
}

.ly-brand-cn {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--ly-text);
}

.ly-brand-en {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--ly-blue);
  margin-top: 3px;
}

.ly-version {
  justify-self: end;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ly-muted);
  padding: 3px 12px;
  border: 1px solid var(--ly-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  user-select: none;
}

/* ---------- 6. Navigation ---------- */
.ly-nav-toggle {
  display: none;
  justify-self: start;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ly-text);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--ly-line-acc);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.ly-nav-toggle:hover {
  background: rgba(0, 229, 255, 0.14);
}

.ly-nav-toggle-icon {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background-color 0.25s ease;
}

.ly-nav-toggle-icon::before,
.ly-nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: top 0.25s ease, transform 0.25s ease;
}

.ly-nav-toggle-icon::before {
  top: -5px;
}

.ly-nav-toggle-icon::after {
  top: 5px;
}

.ly-nav-toggle[aria-expanded="true"] .ly-nav-toggle-icon {
  background: transparent;
}

.ly-nav-toggle[aria-expanded="true"] .ly-nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.ly-nav-toggle[aria-expanded="true"] .ly-nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.ly-nav {
  border-top: 1px solid var(--ly-line);
}

.ly-nav-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.ly-nav-link {
  display: block;
  position: relative;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ly-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.ly-nav-link::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 5px;
  height: 2px;
  background: var(--ly-grad-cg);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ly-nav-link:hover {
  color: var(--ly-text);
}

.ly-nav-link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.ly-nav-link[aria-current="page"] {
  color: var(--ly-blue);
}

.ly-nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 1;
}

/* ---------- 7. Footer ---------- */
.ly-footer {
  background: var(--ly-panel);
  border-top: 2px solid rgba(0, 229, 255, 0.22);
  margin-top: auto;
  position: relative;
}

.ly-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ly-grad-cg);
  opacity: 0.4;
  pointer-events: none;
}

.ly-footer-main {
  max-width: var(--ly-container-w);
  margin: 0 auto;
  padding: var(--ly-space-3) var(--ly-space-2);
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.6fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.ly-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ly-footer-logo {
  display: inline-flex;
  flex-direction: column;
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  line-height: 1;
  color: var(--ly-text);
  text-decoration: none;
}

.ly-footer-logo:hover {
  color: var(--ly-text);
}

.ly-footer-logo-sub {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ly-blue);
  margin-top: 4px;
}

.ly-footer-desc {
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--ly-muted);
  max-width: 40ch;
}

.ly-footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ly-footer-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ly-blue);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
}

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

.ly-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ly-muted);
}

.ly-footer-link {
  color: var(--ly-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.ly-footer-link:hover {
  color: var(--ly-blue);
  padding-left: 4px;
}

.ly-footer-note {
  margin-top: 14px;
  padding-left: 12px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ly-muted);
  border-left: 2px solid rgba(0, 229, 255, 0.3);
}

.ly-footer-bottom {
  border-top: 1px solid var(--ly-line);
  max-width: var(--ly-container-w);
  margin: 0 auto;
  padding: 18px var(--ly-space-2) 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ly-copyright {
  font-size: 0.78rem;
  color: var(--ly-muted);
  letter-spacing: 0.02em;
}

.ly-footer-legal {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ly-footer-legal .ly-footer-link {
  font-size: 0.78rem;
}

.ly-footer-sep {
  color: rgba(130, 150, 171, 0.4);
  user-select: none;
}

/* ---------- 8. Layout Containers ---------- */
.ly-container {
  max-width: var(--ly-container-w);
  margin: 0 auto;
  padding: 0 var(--ly-space-2);
  width: 100%;
}

.ly-section {
  padding-block: var(--ly-space-3);
}

.ly-section--tight {
  padding-block: var(--ly-space-2);
}

.ly-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--ly-space-2);
}

/* ---------- 9. Components ---------- */
.ly-card {
  background: var(--ly-panel);
  border: 1px solid var(--ly-line);
  border-radius: var(--ly-radius);
  padding: var(--ly-space-2);
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.ly-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ly-grad-cg);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 4px 16px 0 0;
}

.ly-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-2px);
  background: #151B30;
}

.ly-card:hover::before {
  opacity: 1;
}

.ly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 30px;
  font-family: var(--ly-font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px 12px 4px 12px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.ly-btn-primary {
  background: var(--ly-grad-cg);
  color: #0B0F1A;
}

.ly-btn-primary:hover {
  color: #0B0F1A;
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}

.ly-btn-ghost {
  background: transparent;
  color: var(--ly-text);
  border: 1px solid var(--ly-line-acc);
}

.ly-btn-ghost:hover {
  background: rgba(0, 229, 255, 0.08);
  color: var(--ly-blue);
  transform: translateY(-1px);
}

.ly-tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ly-blue);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 4px;
  text-transform: uppercase;
}

.ly-tag--hot {
  color: var(--ly-orange);
  background: rgba(255, 122, 0, 0.1);
  border-color: rgba(255, 122, 0, 0.3);
}

.ly-tag--ok {
  color: var(--ly-green);
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.25);
}

.ly-chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--ly-space-2);
  align-items: start;
  padding-block: var(--ly-space-2);
}

.ly-chapter-num {
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 100;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--ly-blue);
  opacity: 0.3;
  user-select: none;
  white-space: nowrap;
  font-family: var(--ly-font);
}

.ly-chapter-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 200;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: skew(-5deg);
  color: var(--ly-text);
  margin-bottom: 10px;
}

.ly-chapter-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ly-muted);
  max-width: 46ch;
}

.ly-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ly-muted);
  padding: var(--ly-space-1) 0;
}

.ly-breadcrumb a {
  color: var(--ly-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.ly-breadcrumb a:hover {
  color: var(--ly-blue);
}

.ly-breadcrumb-sep {
  color: rgba(130, 150, 171, 0.4);
  user-select: none;
}

/* ---------- 10. Media ---------- */
.ly-media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 229, 255, 0.14), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 122, 0, 0.1), transparent 45%),
    linear-gradient(145deg, #12172B, #0E1424 90%);
  border-radius: var(--ly-radius);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ly-line);
}

.ly-media::after {
  content: "MEDIA";
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: rgba(130, 150, 171, 0.5);
  user-select: none;
  pointer-events: none;
}

.ly-media--portrait {
  aspect-ratio: 3 / 4;
}

.ly-media--wide {
  aspect-ratio: 21 / 9;
}

.ly-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 11. Responsive ---------- */
@media (max-width: 1024px) {
  .ly-nav-link {
    padding: 11px 14px;
    font-size: 0.84rem;
  }

  .ly-nav-link::after {
    left: 14px;
    right: 14px;
  }

  .ly-footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .ly-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .ly-header-inner {
    padding: 0 14px;
  }

  .ly-masthead {
    grid-template-columns: 1fr auto 1fr;
    padding: 10px 0 6px;
    gap: 6px;
  }

  .ly-masthead-meta {
    display: none;
  }

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

  .ly-brand-cn {
    font-size: 1.6rem;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .ly-brand-en {
    font-size: 0.5rem;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
  }

  .ly-version {
    font-size: 0.55rem;
    padding: 2px 8px;
  }

  .ly-nav {
    display: none;
    border-top: 1px solid var(--ly-line);
    padding-bottom: 10px;
  }

  .ly-nav[data-open="true"] {
    display: block;
    animation: ly-fade-in 0.2s ease;
  }

  .ly-nav-list {
    flex-direction: column;
    gap: 0;
  }

  .ly-nav-link {
    padding: 12px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
  }

  .ly-nav-link::after {
    left: 6px;
    right: auto;
    width: 26px;
    bottom: 3px;
  }

  @keyframes ly-fade-in {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .ly-footer-main {
    grid-template-columns: 1fr;
    padding: var(--ly-space-2) 14px;
    gap: 24px;
  }

  .ly-footer-brand {
    grid-column: auto;
  }

  .ly-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 14px 20px;
  }

  .ly-chapter {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ly-chapter-num {
    font-size: 3.4rem;
    -webkit-text-stroke-width: 0.8px;
  }

  .ly-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .ly-chapter-num {
    font-size: 6rem;
  }
}

/* ---------- 12. Motion & Reduced Motion ---------- */
@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;
  }

  .ly-progress {
    transition: none;
  }

  .ly-nav[data-open="true"] {
    animation: none;
  }
}
