:root {
  --text: #14213d;
  --muted: #64748b;
  --line: rgba(120, 146, 180, 0.2);
  --glass: rgba(255, 255, 255, 0.62);
  --blue: #3b82f6;
  --cyan: #16b8c7;
  --violet: #8b5cf6;
  --green: #10b981;
  --orange: #f59e0b;
  --shadow: 0 24px 70px rgba(60, 86, 140, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 235, 255, 0.96), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(242, 230, 255, 0.95), transparent 32%),
    radial-gradient(circle at 52% 92%, rgba(218, 249, 241, 0.72), transparent 30%),
    linear-gradient(135deg, #edf5ff 0%, #f8fbff 52%, #f7f1ff 100%);
  background-attachment: fixed;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-bottom: 32px;
}

.page-glow {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.34;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}

.glow-a {
  left: -120px;
  top: 120px;
  background: #bcd8ff;
}

.glow-b {
  right: -150px;
  top: 300px;
  background: #dbc9ff;
  animation-delay: -3s;
}

.glow-c {
  left: 48%;
  bottom: -170px;
  background: #baf4e8;
  animation-delay: -6s;
}

.site-header {
  position: fixed;
  left: 0;
  top: 18px;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  min-height: 58px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 50px rgba(89, 112, 158, 0.14);
  backdrop-filter: blur(22px);
  color: var(--text);
  text-decoration: none;
  pointer-events: auto;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #2f80ff, #8b5cf6);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.brand b,
.brand small {
  display: block;
}

.brand b {
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.ghost-link {
  border: 1px solid rgba(255, 255, 255, 0.72);
  min-height: 58px;
  padding: 0 22px;
  border-radius: 22px;
  color: #35506f;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 50px rgba(89, 112, 158, 0.14);
  backdrop-filter: blur(22px);
  font-weight: 700;
  pointer-events: auto;
}

main {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
}

.hero-screen {
  min-height: auto;
  display: grid;
  place-items: center;
  padding: 112px 0 18px;
}

.hero-copy {
  width: min(980px, 100%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: #436182;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 35px rgba(75, 104, 155, 0.12);
  backdrop-filter: blur(18px);
}

.eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.14);
}

.hero-copy h1 {
  max-width: 820px;
  margin: 18px auto 12px;
  color: #13233d;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(120deg, #2f80ff, #22b8cf 48%, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 auto;
  color: #53657c;
  font-size: 15px;
  line-height: 1.68;
}

.search-box {
  display: grid;
  grid-template-columns: 142px 1fr 128px;
  gap: 10px;
  margin: 18px auto 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.keyword-wrap,
.search-box input,
.search-box select {
  width: 100%;
  min-height: 44px;
}

.search-box input,
.search-box select {
  border: 1px solid rgba(120, 146, 180, 0.22);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: none;
}

.keyword-wrap {
  position: relative;
  display: block;
}

.keyword-wrap input {
  padding-right: 46px;
}

.clear-keyword {
  position: absolute;
  top: 50%;
  right: 10px;
  display: none;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #6d8cff, #8b5cf6);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.keyword-wrap.has-value .clear-keyword {
  display: grid;
  place-items: center;
}

.clear-keyword:hover {
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
  transform: translateY(-50%) scale(1.04);
}

.search-box button,
.pager button,
.report-submit {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 14px 30px rgba(79, 112, 232, 0.25);
  font-weight: 800;
}

.hero-tags,
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.update-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(940px, 100%);
  min-height: 38px;
  margin: 12px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.46);
  color: #48617f;
}

.update-ticker > span {
  color: #1d4ed8;
  font-weight: 900;
  white-space: nowrap;
}

.update-ticker > div {
  overflow: hidden;
}

.update-ticker p {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-width: max-content;
  margin: 0;
  animation: ticker 28s linear infinite;
}

.update-ticker button {
  border: 0;
  background: transparent;
  color: #506987;
  font: inherit;
  white-space: nowrap;
}

.hero-tags button,
.chip {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.48);
  color: #5b6d84;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metrics-strip div,
.glass-panel,
.entrance,
.result-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.metrics-strip div {
  padding: 10px 14px;
  border-radius: 18px;
}

.metrics-strip strong {
  display: block;
  color: #1d4ed8;
  font-size: 20px;
}

.metrics-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hero-metrics {
  width: min(760px, 100%);
  margin: 18px auto 0;
}

.section {
  padding: 42px 0 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 18px;
}

.section-head span,
.panel-title span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-weight: 900;
}

.section-head h2,
.panel-title h2 {
  margin: 0;
  color: #15243c;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.poster-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.compact-picks {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 12px;
  width: min(820px, 100%);
  margin: 12px auto 0;
}

body.no-query .compact-picks {
  display: none;
}

body.has-query .compact-picks {
  display: grid;
}

.poster-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  padding: 0;
  background: #dbeafe;
  box-shadow: var(--shadow);
  text-align: left;
}

.poster-card:nth-child(2),
.poster-card:nth-child(3) {
  min-height: 220px;
  margin-top: 18px;
}

.compact-poster,
.compact-poster:nth-child(2),
.compact-poster:nth-child(3) {
  height: 116px;
  min-height: 116px;
  border-radius: 18px;
  margin-top: 0;
}

.compact-poster img {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
}

.compact-poster .poster-rank {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  font-size: 12px;
}

.compact-poster .poster-info {
  left: 14px;
  right: 14px;
  bottom: 12px;
}

.compact-poster .poster-info b {
  font-size: 14px;
}

.compact-poster .poster-info small {
  margin-top: 4px;
  font-size: 12px;
}

.poster-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.poster-card:hover img {
  transform: scale(1.04);
}

.poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 20, 35, 0.08), rgba(12, 20, 35, 0.82));
}

.poster-rank {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

.poster-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  color: #fff;
}

.poster-info b,
.poster-info small {
  display: block;
}

.poster-info b {
  font-size: 18px;
  line-height: 1.35;
}

.poster-info small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 22px;
}

.search-workbench {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  padding-top: 10px;
}

body.no-query .results,
body.has-query .home-rankings {
  display: none;
}

body.no-query .home-rankings {
  display: block;
}

body.has-query .results {
  display: flex;
}

body.has-query .search-workbench {
  grid-template-columns: 1fr;
}

body.has-query .search-workbench > .rank-panel {
  display: none;
}

body.has-query .center-column {
  grid-column: 1 / -1;
  max-width: 1000px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

body.has-query .center-column > .results {
  height: auto;
  min-height: 0;
}

.glass-panel {
  border-radius: 22px;
  padding: 18px;
}

.rank-panel,
.home-rankings,
.results {
  height: 620px;
}

.center-column {
  min-width: 0;
}

.center-column,
.center-column > .glass-panel {
  height: 620px;
}

.panel-title {
  margin-bottom: 10px;
}

.panel-title h2 {
  font-size: 20px;
}

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

.rank-list button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 15px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  text-align: left;
}

.rank-list em {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 10px;
  color: #1d4ed8;
  background: #e8f1ff;
  font-style: normal;
  font-weight: 900;
}

.rank-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 12px;
}

.rank-list small,
.tag {
  border-radius: 999px;
  padding: 4px 8px;
  color: #2563eb;
  background: rgba(219, 234, 254, 0.78);
  white-space: nowrap;
}

.rank-list small {
  display: none;
}

.result-card:hover,
.rank-list button:hover {
  transform: translateY(-3px);
}

.results {
  flex-direction: column;
  margin-top: 0;
  min-width: 0;
  overflow: hidden;
}

body.has-query .results {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.74) 46%, rgba(225, 247, 244, 0.64) 100%),
    radial-gradient(circle at 50% 100%, rgba(176, 236, 232, 0.58), rgba(255, 255, 255, 0) 58%),
    rgba(255, 255, 255, 0.7);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.result-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

body.has-query .result-list {
  flex: 0 0 auto;
  align-content: start;
  grid-template-rows: repeat(4, minmax(104px, auto));
}

.result-card {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.result-card h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  margin-top: 8px;
}

.actions button,
.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(120, 146, 180, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  text-decoration: none;
}

body.has-query .actions button,
body.has-query .actions a {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.actions .report-action {
  color: #64748b;
  background: rgba(248, 250, 252, 0.72);
}

.actions .report-action:hover {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
}

.pager {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 10px;
}

.pager button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
}

.pager button:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.statement {
  margin-top: 18px;
}

.statement h2 {
  margin: 0 0 10px;
}

.statement p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

dialog {
  width: min(620px, calc(100% - 28px));
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.36);
  backdrop-filter: blur(3px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

#dialogBody {
  padding: 16px;
}

.share-box,
.report-form {
  display: grid;
  gap: 10px;
}

.share-url {
  word-break: break-all;
  padding: 12px;
  border-radius: 16px;
  background: #f3f7ff;
}

.qr-img {
  width: 140px;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  background: #fff;
}

.report-form input,
.report-form textarea,
.report-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

@keyframes float {
  50% {
    transform: translate3d(18px, -24px, 0) scale(1.04);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1120px) {
  .brand {
    min-width: 0;
  }

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

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

  .center-column {
    grid-column: 1 / -1;
  }

  .poster-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .poster-card,
  .poster-card:nth-child(2),
  .poster-card:nth-child(3) {
    min-height: 280px;
    margin-top: 0;
  }

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

  .compact-poster,
  .compact-poster:nth-child(2),
  .compact-poster:nth-child(3) {
    height: 112px;
    min-height: 112px;
  }
}

@media (max-width: 680px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: 20px;
  }

  .brand small {
    display: none;
  }

  .site-header {
    padding: 0 10px;
  }

  .brand {
    min-width: 0;
    min-height: 50px;
    padding-right: 10px;
  }

  .ghost-link {
    min-height: 50px;
    padding: 0 14px;
  }

  main {
    width: min(100% - 22px, 1180px);
  }

  .hero-screen {
    min-height: auto;
    padding-top: 78px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .search-box,
  .compact-picks {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 14px;
  }

  .metrics-strip div {
    min-width: 0;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .metrics-strip strong {
    font-size: 17px;
    line-height: 1.1;
  }

  .metrics-strip span {
    margin-top: 3px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .rank-panel,
  .home-rankings,
  .results,
  .center-column,
  .center-column > .glass-panel {
    height: auto;
    min-height: 0;
  }

  .update-ticker {
    grid-template-columns: 1fr;
    border-radius: 18px;
    padding: 8px 12px;
  }

  .poster-card,
  .poster-card:nth-child(2),
  .poster-card:nth-child(3) {
    min-height: 240px;
  }

  .compact-poster,
  .compact-poster:nth-child(2),
  .compact-poster:nth-child(3) {
    height: 104px;
    min-height: 104px;
  }

  .rank-list button {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .rank-list small {
    grid-column: 2;
    width: fit-content;
  }

  .section {
    padding-top: 28px;
  }
}
