:root {
  --bg: #eef5ff;
  --bg-soft: #f7fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --panel-border: rgba(111, 163, 255, 0.18);
  --text: #1e355d;
  --muted: #6981a9;
  --line: rgba(85, 133, 214, 0.16);
  --brand: #2f78ff;
  --brand-2: #5fc7ff;
  --brand-3: #8be0ff;
  --accent: #1f58d1;
  --shadow: 0 12px 28px rgba(55, 110, 193, 0.08);
  --shadow-soft: 0 6px 18px rgba(65, 125, 212, 0.06);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 12px;
  --container: 1080px;
  --mono-level: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 360px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 360px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  font-family: "Microsoft YaHei UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(111, 199, 255, 0.5), transparent 26%),
    radial-gradient(circle at top right, rgba(47, 120, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #ecf5ff 0%, #f8fbff 50%, #eef5ff 100%);
  filter: grayscale(var(--mono-level));
  transition: filter 0.5s ease, background 0.5s ease;
}

body.mono-mode {
  --mono-level: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.36), transparent 24%, transparent 70%, rgba(255, 255, 255, 0.3)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 24%);
  opacity: 0.8;
}

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

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

button {
  cursor: pointer;
  border: 0;
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.18;
  mix-blend-mode: soft-light;
}

.site-header,
.main-wrap,
.floating-top {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(calc(100% - 24px), var(--container));
  margin: 12px auto 0;
  padding: 12px 18px 13px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(220px, 1fr) auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  column-gap: 16px;
  row-gap: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}

.site-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  max-width: 368px;
}

.brand-copy {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  max-width: 100%;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #69b4ff 0%, #4f98ff 62%, #3b84f3 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 5px 12px rgba(51, 111, 206, 0.14);
  font-family: "YouYuan", "Microsoft YaHei UI", sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
  overflow: hidden;
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 52%);
  pointer-events: none;
}

.brand-copy h1,
.brand-copy p,
.hero-copy h2,
.section-heading h3,
.modal-heading h3,
.detail-heading h2 {
  margin: 0;
}

.brand-copy h1 {
  font-family: "YouYuan", "Microsoft YaHei UI", sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.brand-copy p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.site-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  flex-wrap: nowrap;
  justify-self: center;
  width: 100%;
}

.site-nav a,
.small-pill,
.ghost-pill,
.primary-pill,
.primary-submit {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-nav a {
  padding: 3px 0;
  border-radius: 0;
  color: #365f98;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-self: end;
  align-self: center;
}

.header-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ghost-pill,
.primary-pill,
.primary-submit,
.small-pill {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.ghost-pill,
.small-pill {
  color: #4370aa;
  background: rgba(241, 248, 255, 0.92);
  border: 1px solid rgba(87, 138, 214, 0.14);
}

.primary-pill,
.primary-submit,
.small-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(47, 120, 255, 0.13);
}

.ghost-pill:hover,
.primary-pill:hover,
.primary-submit:hover,
.small-pill:hover,
.site-nav a:hover,
.media-card:hover,
.mini-rank-item:hover,
.floating-filter:hover,
.floating-theme:hover {
  transform: translateY(-1px);
}

.main-wrap {
  width: min(calc(100% - 24px), var(--container));
  margin: 10px auto 0;
  padding-bottom: 52px;
}

.hero-panel,
.result-panel,
.ranking-panel,
.filter-hero,
.detail-hero {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.result-panel[hidden] {
  display: none !important;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.85fr);
  grid-template-areas:
    "copy aside"
    "tip aside"
    "stats aside";
  gap: 8px;
  padding: 18px;
}

.hero-copy {
  grid-area: copy;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.hero-aside {
  grid-area: aside;
  display: grid;
  gap: 10px;
  align-content: start;
}

.hero-stats {
  grid-area: stats;
}

.hero-tip {
  grid-area: tip;
  margin: 0 0 6px;
  color: #86a0c2;
  font-size: 0.68rem;
  line-height: 1.35;
}

.eyebrow,
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eyebrow::before,
.tagline::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 0 0 5px rgba(104, 194, 255, 0.1);
}

.hero-copy h2 {
  margin-top: 0;
  font-family: "YouYuan", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(1.28rem, 2.2vw, 1.92rem);
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hero-desc {
  margin: 0;
  max-width: 580px;
  color: #567096;
  font-size: 0.88rem;
  line-height: 1.42;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-search,
.compact-search {
  margin: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(77, 140, 226, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(62, 116, 211, 0.08);
}

.search-icon,
.toolbar-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::before,
.search-icon::after {
  content: "";
  position: absolute;
}

.search-icon::before {
  inset: 0;
  border: 2px solid #70a4ff;
  border-radius: 50%;
}

.search-icon::after {
  width: 9px;
  height: 2px;
  right: -4px;
  bottom: -1px;
  background: #70a4ff;
  border-radius: 99px;
  transform: rotate(40deg);
}

.search-box input,
.search-box select,
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
}

.search-box button {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f78ff, #63cfff);
  color: #fff;
  font-size: 0.86rem;
  box-shadow: 0 8px 16px rgba(47, 120, 255, 0.13);
}

.hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 7px;
  margin-top: 6px;
  max-width: 640px;
  align-content: flex-start;
  padding: 0;
}

.keyword-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(236, 244, 255, 0.94));
  border: 1px solid rgba(169, 191, 235, 0.78);
  color: #5771a3;
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 4px 10px rgba(106, 145, 220, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.keyword-chip:hover,
.keyword-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(98, 151, 236, 0.9);
  color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 14px rgba(83, 134, 223, 0.1);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  align-self: start;
}

.stat-card,
.aside-card,
.media-card,
.mini-rank-item,
.detail-card,
.source-card {
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid rgba(123, 171, 235, 0.16);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title icon"
    "value icon"
    "note icon";
  align-content: start;
  min-height: 106px;
  padding: 14px 14px 12px 15px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 249, 255, 0.97));
  border: 1px solid rgba(123, 171, 235, 0.14);
}

.stat-card::before {
  content: "";
  position: absolute;
  right: -10px;
  top: -10px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle, rgba(123, 171, 235, 0.16) 0, rgba(123, 171, 235, 0.12) 40%, rgba(123, 171, 235, 0) 72%);
  opacity: 0.9;
}

.stat-card::after {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(228, 239, 255, 0.95);
  border: 1px solid rgba(101, 154, 234, 0.14);
  color: #4d84ea;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.hero-stats .stat-card:nth-child(1)::after {
  content: "⌕";
}

.hero-stats .stat-card:nth-child(2)::after {
  content: "#";
}

.hero-stats .stat-card:nth-child(3)::after {
  content: "⏱";
}

.stat-card > span,
.stat-card > strong {
  position: relative;
  z-index: 1;
}

.stat-card > span:first-child {
  grid-area: title;
}

.stat-card > strong {
  grid-area: value;
  margin-top: 4px;
}

.stat-note {
  grid-area: note;
  display: block;
  margin-top: 2px;
  color: #7a8ea9;
  font-size: 0.7rem;
  line-height: 1.2;
}

.stat-card span,
.meta-chip,
.resource-line span,
.result-meta,
.section-note,
.media-card p,
.media-card .meta-row,
.mini-rank-meta,
.feature-list,
.popover-status {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  font-size: clamp(1.12rem, 2vw, 1.62rem);
  color: var(--accent);
  max-width: calc(100% - 54px);
}

.hero-aside {
  display: grid;
  gap: 10px;
}

.aside-card {
  padding: 14px;
}

.section-heading,
.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading h3,
.detail-heading h2 {
  margin-top: 4px;
  font-family: "YouYuan", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(1.05rem, 1.7vw, 1.46rem);
}

.mini-rank-list {
  display: grid;
  gap: 6px;
}

.mini-rank-item {
  padding: 9px 11px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.mini-rank-number {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(47, 120, 255, 0.14), rgba(95, 199, 255, 0.28));
  color: var(--accent);
  font-weight: 700;
  font-size: 0.86rem;
}

.mini-rank-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-top: 1px;
}

.mini-rank-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.mini-rank-title {
  display: inline-block;
  flex: 0 1 auto;
  font-size: 0.88rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-rank-meta {
  font-size: 0.72rem;
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  text-align: left;
}

.mini-rank-summary {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7b8eae;
  font-size: 0.72rem;
  line-height: 1.18;
}

.score-pill {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(57, 130, 255, 0.12);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

.floating-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(57, 130, 255, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
}

.feature-list {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.55;
}

.result-panel,
.ranking-panel,
.filter-hero {
  margin-top: 12px;
  padding: 16px;
}

.pan-filter-row,
.section-controls,
.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-toolbar {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.filter-group {
  align-items: center;
}

.filter-group span {
  min-width: 48px;
  color: var(--muted);
}

.media-grid {
  display: grid;
  gap: 10px;
}

.search-grid,
.showcase-grid,
.recommend-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.search-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.popover-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.media-card {
  overflow: hidden;
  min-width: 0;
}

.search-result-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.97));
  border: 1px solid rgba(118, 166, 239, 0.14);
}

.search-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(115, 165, 239, 0.1);
}

.search-result-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-result-chip,
.search-result-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.search-result-chip.is-source {
  color: #1d5bc8;
  background: rgba(228, 239, 255, 0.95);
  border: 1px solid rgba(101, 150, 229, 0.14);
}

.search-result-chip.is-disk {
  color: var(--accent);
  background: rgba(240, 247, 255, 0.95);
  border: 1px solid rgba(87, 141, 228, 0.16);
}

.search-result-state {
  color: #2a6de0;
  background: rgba(232, 242, 255, 0.92);
  border: 1px solid rgba(92, 147, 235, 0.12);
}

.search-result-body {
  display: grid;
  gap: 8px;
}

.search-result-card h4 {
  margin: 0;
  color: #203b6d;
  font-size: 0.96rem;
  line-height: 1.45;
  min-height: 2.9em;
  word-break: break-word;
}

.search-result-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.search-meta-item {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(244, 249, 255, 0.92);
  border: 1px solid rgba(111, 163, 255, 0.08);
  min-width: 0;
}

.search-result-meta-grid em {
  font-style: normal;
  color: #7790b7;
  font-size: 0.64rem;
  line-height: 1;
}

.search-result-meta-grid strong {
  color: #355585;
  font-size: 0.75rem;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-actions {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(115, 165, 239, 0.1);
}

.search-result-actions .ghost-pill,
.search-result-actions .primary-pill {
  min-height: 32px;
  border-radius: 12px;
  font-size: 0.74rem;
}

.media-card button {
  background: transparent;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 38, 82, 0.72);
  color: #fff;
  font-size: 0.68rem;
  backdrop-filter: blur(12px);
}

.poster-score {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.media-body {
  padding: 10px;
}

.media-body h4 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.32;
}

.media-body p {
  margin: 4px 0 0;
  font-size: 0.76rem;
  line-height: 1.42;
  min-height: 40px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.72rem;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.card-actions .ghost-pill,
.card-actions .primary-pill {
  flex: 1;
  padding: 8px 9px;
  text-align: center;
  font-size: 0.76rem;
}

.floating-top {
  position: fixed;
  right: max(12px, calc((100vw - var(--container)) / 2 - 72px));
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  background: linear-gradient(155deg, rgba(47, 120, 255, 0.96), rgba(95, 199, 255, 0.9));
  box-shadow: 0 18px 36px rgba(47, 120, 255, 0.24);
  bottom: 74px;
}

.floating-top span:last-child {
  font-size: 0.74rem;
}

.filter-icon::before,
.filter-icon::after,
.theme-icon::before,
.theme-icon::after {
  content: "";
  position: absolute;
}

.filter-icon::before {
  width: 18px;
  height: 2px;
  background: #fff;
  top: 4px;
  left: 0;
  box-shadow: 0 6px 0 #fff, 0 12px 0 #fff;
}

.filter-icon::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 11px;
  box-shadow: -7px 6px 0 #fff, 3px 12px 0 #fff;
}

.theme-icon::before {
  inset: 1px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 50%, rgba(255, 255, 255, 0.3) 50%);
}

.theme-icon::after {
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  box-shadow: 10px 0 0 0 rgba(255, 255, 255, 0.55);
}

.top-icon::before,
.top-icon::after {
  content: "";
  position: absolute;
}

.top-icon::before {
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(45deg);
}

.top-icon::after {
  width: 2px;
  height: 14px;
  left: 9px;
  top: 4px;
  background: #fff;
  border-radius: 999px;
}

.theme-wave {
  position: absolute;
  inset: auto auto 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: scale(1);
}

.floating-theme.is-burst .theme-wave {
  animation: theme-burst 0.6s ease-out;
}

@keyframes theme-burst {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(9.5);
  }
}

.modal-backdrop,
.search-popover {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 12;
  background: rgba(15, 36, 74, 0.45);
  backdrop-filter: blur(14px);
}

.modal-backdrop.is-open,
.search-popover.is-open {
  display: flex;
}

.modal-card,
.search-popover-card {
  width: min(100%, 560px);
  max-height: min(90vh, 860px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(111, 163, 255, 0.2);
  box-shadow: 0 28px 80px rgba(19, 52, 108, 0.28);
  position: relative;
}

.search-popover-card {
  width: min(100%, 900px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: #5984bd;
  background: rgba(227, 240, 255, 0.92);
}

.modal-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.modal-form label {
  display: grid;
  gap: 8px;
}

.modal-form span {
  font-size: 0.92rem;
  color: #5277ab;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(93, 148, 222, 0.16);
  background: rgba(242, 248, 255, 0.92);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 16;
  display: grid;
  gap: 10px;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(111, 163, 255, 0.12);
  backdrop-filter: blur(12px);
}

.footer-inner {
  width: min(calc(100% - 40px), 1600px);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  color: #8a97ac;
  font-size: 0.84rem;
}

.footer-inner p {
  margin: 0;
  line-height: 1.55;
}

.footer-map {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.footer-map a {
  color: #7d8ea9;
  position: relative;
}

.footer-map a + a::before {
  content: "|";
  color: #b2bfd3;
  margin-right: 12px;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, rgba(47, 120, 255, 0.95), rgba(95, 199, 255, 0.95));
  box-shadow: 0 16px 32px rgba(47, 120, 255, 0.28);
  animation: toast-in 0.28s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-hero {
  padding: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-content-wrap {
  display: grid;
  gap: 12px;
}

.detail-card,
.source-card {
  padding: 16px;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-heading p {
  margin: 6px 0 0;
  color: #587398;
  line-height: 1.55;
}

.meta-chip-row,
.source-actions,
.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(231, 242, 255, 0.92);
  border: 1px solid rgba(101, 150, 220, 0.14);
  font-size: 0.8rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resource-line {
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(243, 248, 255, 0.96);
  border: 1px solid rgba(101, 150, 220, 0.12);
}

.resource-line strong {
  display: block;
  margin-top: 5px;
}

.source-actions .primary-pill,
.source-actions .ghost-pill {
  text-align: center;
}

.section-note,
.popover-status,
.result-meta {
  font-size: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-up 0.6s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .floating-top {
    right: 16px;
  }
}

@media (max-width: 980px) {
  .hero-panel,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    font-size: clamp(1.35rem, 4.2vw, 2rem);
  }

  .search-grid,
  .showcase-grid,
  .recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-panel {
    padding: 16px;
    gap: 12px;
  }

  .site-nav {
    gap: 16px;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero-panel,
  .result-panel,
  .ranking-panel,
  .filter-hero,
  .detail-hero {
    border-radius: 24px;
  }

  .stats-row,
  .resource-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hot-keywords {
    max-width: 100%;
  }

  .hero-panel,
  .result-panel,
  .ranking-panel,
  .filter-hero,
  .detail-hero {
    padding: 14px;
  }

  .footer-inner {
    width: min(calc(100% - 24px), 100%);
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

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

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav";
    align-items: center;
    row-gap: 12px;
  }

  .brand-copy p {
    max-width: 260px;
  }

  .header-actions {
    justify-self: end;
  }

  .site-nav {
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 12px;
    border-radius: 24px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "actions";
  }

  .site-brand,
  .header-actions,
  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .header-actions {
    justify-self: stretch;
    flex-wrap: wrap;
  }

  .search-box {
    padding: 9px 10px 9px 14px;
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .hero-copy h2 {
    font-size: 1.2rem;
  }

  .search-box button {
    width: 100%;
    padding: 9px 12px;
  }

  .card-actions {
    flex-direction: column;
  }

  .stats-row {
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card strong {
    font-size: 1.24rem;
  }

  .aside-card,
  .result-panel,
  .ranking-panel,
  .filter-hero,
  .detail-hero {
    padding: 14px;
  }

  .mini-rank-item {
    padding: 9px 10px;
    gap: 8px;
  }

  .mini-rank-title {
    font-size: 0.9rem;
  }

  .media-grid {
    gap: 12px;
  }

  .media-body {
    padding: 10px;
  }

  .media-body h4 {
    font-size: 0.9rem;
  }

  .media-body p {
    margin-top: 5px;
    min-height: 36px;
  }

  .search-result-card {
    padding: 12px;
    gap: 10px;
  }

  .search-result-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-result-meta-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .floating-top {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
}
