/* ==========================================
   Site CSS — /assets/site.css
   啦啦啦日韩免费站 · 共享层
   ========================================== */

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

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

body {
  font-family: "Helvetica Neue", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2D2D2D;
  background: #F5F0E6;
}

ul,
ol {
  list-style: none;
}

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

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "PingFang SC Semibold", "PingFang SC", "Microsoft YaHei Bold", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Variables ---------- */
:root {
  --bg-warm: #F5F0E6;
  --bg-cream: #FAF7F2;
  --bg-air: #E8F4F8;
  --white: #FFFFFF;
  --ink: #2D2D2D;
  --ink-soft: #56534E;
  --line: #D8D1C5;
  --line-soft: #E9E3D8;
  --deep: #14141A;
  --deep-2: #1D1D26;

  --c-orange: #FF6B35;
  --c-yellow: #FFD166;
  --c-green: #06D6A0;
  --c-blue: #118AB2;
  --c-purple: #9B5DE5;
  --c-new: #EF476F;
  --c-hot: #FF9F1C;
  --c-done: #06D6A0;

  --font-head: "PingFang SC Semibold", "PingFang SC", "Microsoft YaHei Bold", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-body: "Helvetica Neue", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Courier New", "Roboto Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 12px rgba(0, 0, 0, .04);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .07), 0 14px 30px rgba(0, 0, 0, .08);
  --header-h: 72px;
  --container: 1200px;
}

/* ---------- Base helpers ---------- */
.page-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.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;
}

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

#main-content {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 999;
  background: var(--c-purple);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--deep);
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 28px 28px;
  color: #FFFFFF;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-purple));
  opacity: .85;
  pointer-events: none;
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-hot), var(--c-orange), var(--c-purple));
  z-index: 1000;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-svg {
  width: 36px;
  height: 32px;
  flex: 0 0 auto;
}

.brand-text {
  color: inherit;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .76);
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}

.site-nav a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, .07);
}

.site-nav a[aria-current="page"] {
  color: #FFFFFF;
  background: rgba(155, 93, 229, .28);
  box-shadow: inset 0 -2px 0 var(--c-purple);
}

/* ---------- Nav toggle ---------- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: #FFFFFF;
  transition: background .2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, .07);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

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

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

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

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background-color: var(--deep);
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 24px 24px;
  color: rgba(255, 255, 255, .75);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-purple));
  opacity: .85;
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 52px clamp(16px, 4vw, 32px) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr 1.4fr;
  gap: 40px;
  align-items: start;
}

.footer-brand .brand {
  font-size: 22px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.footer-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, .68);
  padding: 4px 0;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-nav a:hover {
  color: var(--c-yellow);
  padding-left: 6px;
}

.footer-meta {
  font-size: 14px;
  line-height: 1.8;
}

.meta-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.meta-line a {
  color: var(--c-green);
  border-bottom: 1px dotted rgba(6, 214, 160, .45);
  transition: color .2s ease, border-color .2s ease;
}

.meta-line a:hover {
  color: var(--c-yellow);
  border-bottom-color: var(--c-yellow);
}

.footer-meta .icp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
  margin-top: 10px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
}

.footer-coord {
  letter-spacing: .12em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn--primary {
  background: var(--c-purple);
  color: #FFFFFF;
}

.btn--primary:hover {
  box-shadow: 0 4px 16px rgba(155, 93, 229, .4);
}

.btn--outline {
  background: transparent;
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.btn--outline:hover {
  background: var(--bg-air);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 16px 0;
}

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

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

.breadcrumb [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section--warm {
  background: var(--bg-warm);
}

.section--cream {
  background: var(--bg-cream);
}

.section--air {
  background: var(--bg-air);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 20px;
}

.section-title {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: .02em;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  bottom: .16em;
  width: 6px;
  border-radius: 3px;
  background: var(--c-purple);
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-cream);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--feature {
  grid-column: span 2;
}

.card__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Magnet matrix ---------- */
.magnet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.magnet {
  min-height: 140px;
  padding: 22px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.magnet:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.magnet::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  pointer-events: none;
}

.magnet--orange {
  background: var(--c-orange);
  color: #FFFFFF;
}

.magnet--yellow {
  background: var(--c-yellow);
  color: var(--ink);
}

.magnet--green {
  background: var(--c-green);
  color: var(--ink);
}

.magnet--blue {
  background: var(--c-blue);
  color: #FFFFFF;
}

.magnet__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.3;
}

.magnet__count {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: .85;
  margin-top: 12px;
}

/* ---------- Entry list ---------- */
.entry-list {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.entry-row {
  display: grid;
  grid-template-columns: 56px 1fr 120px 100px 90px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s ease;
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-row:nth-child(odd) {
  background: var(--bg-cream);
}

.entry-row:hover {
  background: var(--bg-air);
}

.entry-row__title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entry-row__cat {
  font-size: 12px;
  color: var(--ink-soft);
}

.entry-row__batch {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Tags ---------- */
.tag-block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-air);
  color: var(--ink);
  border-radius: 20px;
  transition: background .2s ease, color .2s ease;
}

.tag:hover {
  background: var(--c-purple);
  color: #FFFFFF;
}

.tag--orange {
  background: rgba(255, 107, 53, .14);
  color: #C74A1E;
}

.tag--yellow {
  background: rgba(255, 209, 102, .28);
  color: #7D5E00;
}

.tag--green {
  background: rgba(6, 214, 160, .16);
  color: #007A5A;
}

.tag--blue {
  background: rgba(17, 138, 178, .14);
  color: #0A5F7C;
}

.tag--purple {
  background: rgba(155, 93, 229, .16);
  color: #6B2FB0;
}

/* ---------- Status badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.5;
  flex: 0 0 auto;
}

.status-badge--new {
  background: var(--c-new);
}

.status-badge--hot {
  background: var(--c-hot);
  color: var(--ink);
}

.status-badge--done {
  background: var(--c-done);
  color: var(--ink);
}

.status-badge--purple {
  background: var(--c-purple);
}

/* ---------- Serial numbers ---------- */
.serial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-purple);
}

.serial--top1 {
  background: var(--c-orange);
  color: #FFFFFF;
  border-color: var(--c-orange);
}

.serial--top2 {
  background: var(--c-yellow);
  color: var(--ink);
  border-color: var(--c-yellow);
}

.serial--top3 {
  background: var(--c-green);
  color: var(--ink);
  border-color: var(--c-green);
}

/* ---------- Metric bars ---------- */
.metric-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .06);
  overflow: hidden;
}

.metric-bar > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--c-purple), var(--c-blue));
}

.metric-bar--hot > span {
  background: linear-gradient(90deg, var(--c-hot), var(--c-orange));
}

.metric-bar--new > span {
  background: linear-gradient(90deg, var(--c-new), var(--c-orange));
}

/* ---------- Index strip ---------- */
.index-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.index-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.index-strip a:hover {
  background: var(--c-purple);
  border-color: var(--c-purple);
  color: #FFFFFF;
}

.index-strip a.current {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #FFFFFF;
}

/* ---------- Slider rail ---------- */
.slider-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.slider-rail::-webkit-scrollbar {
  height: 4px;
}

.slider-rail::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.slider-item {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

/* ---------- Compare table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.compare-table thead th {
  background: var(--bg-air);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table tbody tr:nth-child(even) {
  background: var(--bg-cream);
}

/* ---------- Media placeholder ---------- */
.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-air);
  aspect-ratio: 16 / 10;
}

.media--square {
  aspect-ratio: 1 / 1;
}

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

.media .media__svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-air), var(--bg-cream));
}

/* ---------- Scroll reveal ---------- */
html.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

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

html.js-enabled [data-reveal="1"] {
  transition-delay: .08s;
}

html.js-enabled [data-reveal="2"] {
  transition-delay: .14s;
}

html.js-enabled [data-reveal="3"] {
  transition-delay: .2s;
}

html.js-enabled [data-reveal="4"] {
  transition-delay: .26s;
}

html.js-enabled [data-reveal="5"] {
  transition-delay: .32s;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .site-nav a {
    padding: 10px 9px;
    font-size: 13px;
  }

  .brand {
    font-size: 18px;
  }

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

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--deep-2);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 12px 16px 20px;
    animation: nav-fade .18s ease;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 14px 12px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    font-size: 15px;
  }

  .site-nav a[aria-current="page"] {
    border-left-color: var(--c-purple);
    box-shadow: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

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

  .card--feature {
    grid-column: auto;
  }

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

  .entry-row {
    grid-template-columns: 36px 1fr 72px;
    gap: 8px;
    padding: 10px 12px;
  }

  .entry-row__cat,
  .entry-row__batch {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .footer-coord {
    display: none;
  }

  .index-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .magnet-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    height: 64px;
  }

  #main-content {
    scroll-margin-top: calc(64px + 12px);
  }
}

/* ---------- Motion accessibility ---------- */
@keyframes nav-fade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {

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

  html.js-enabled [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
