:root {
  color-scheme: dark;
  --bg: #0b1020;
  --ink: #f4f7fb;
  --muted: #9aa7b8;
  --line: rgba(244, 247, 251, 0.1);
  --line-strong: rgba(244, 247, 251, 0.18);
  --panel: rgba(16, 24, 40, 0.74);
  --panel-strong: rgba(20, 29, 48, 0.94);
  --card: rgba(244, 247, 251, 0.065);
  --card-hover: rgba(244, 247, 251, 0.12);
  --accent: #5fd4c8;
  --accent-2: #7c8cff;
  --hot: #ee6b7a;
  --green: #7bd88f;
  --blue: #6eb6ff;
  --violet: #a78bfa;
  --surface: #111827;
  --shadow: 0 28px 100px rgba(0, 0, 0, 0.48);
  --nav-cols: 4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #0b1020;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

#sceneCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(95, 212, 200, 0.035);
}

.hero {
  padding: 24px 18px 8px;
}

.hero-poster {
  position: relative;
  width: min(1500px, calc(100% - 32px));
  min-height: 480px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background-color: rgba(16, 17, 20, 0.42);
  background-image: url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1800&q=86");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 17, 20, 0.58);
  pointer-events: none;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background: rgba(95, 212, 200, 0.045);
  background-size: 42px 42px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 72px 34px 44px;
  text-align: center;
  animation: riseIn 700ms ease both;
}

.mobile-logo {
  display: none;
}

.site-kicker {
  display: inline-flex;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 22px 72px rgba(0, 0, 0, 0.5);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 10px;
  width: min(740px, 100%);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(10, 10, 12, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.search-panel:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 30px 110px rgba(95, 212, 200, 0.14), var(--shadow);
}

.search-panel input {
  min-width: 0;
  height: 58px;
  border: 0;
  outline: 0;
  border-radius: 17px;
  padding: 0 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-size: 17px;
}

.search-panel input::placeholder,
.site-filter::placeholder {
  color: rgba(247, 242, 232, 0.48);
}

.search-panel button {
  border: 0;
  border-radius: 17px;
  color: #041114;
  background: var(--accent);
  font-weight: 900;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.search-panel button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.search-drawer {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 92px));
  margin: -24px auto 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  text-align: left;
  background: rgba(11, 11, 13, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  perspective: 1200px;
}

.result-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #111;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  transform: rotateY(18deg) translateY(20px);
  opacity: 0;
  animation: dealCard 650ms cubic-bezier(.2,.8,.2,1) forwards;
}

.result-card:nth-child(2) {
  animation-delay: 100ms;
}

.result-card:nth-child(3) {
  animation-delay: 200ms;
}

.result-card:hover {
  transform: rotateY(0deg) translateY(-8px) scale(1.02);
}

.result-poster {
  position: absolute;
  inset: 0;
  background: #17181c;
}

.result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.result-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 18px;
}

.result-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.result-meta {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.result-card p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.55;
}

.result-card a,
.result-card span {
  display: inline-flex;
  margin-top: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.thinking-state {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.thinking-state span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.thinking-state span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  animation: pulseDot 1s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.72); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes dealCard {
  to {
    opacity: 1;
    transform: rotateY(0deg) translateY(0);
  }
}

.page {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.section {
  margin-top: 24px;
  border-radius: 30px;
  padding: 22px;
  background: rgba(18, 18, 20, 0.46);
  box-shadow: 0 22px 76px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav-section {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-left: 0;
  padding-right: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: 0;
}

.text-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  transition: transform 0.18s ease, background 0.18s ease;
}

.text-button:hover {
  transform: translateY(-2px);
  background: rgba(159, 216, 203, 0.13);
}

.poster-rail {
  overflow: hidden;
  mask-image: none;
}

.poster-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: posterFlow 38s linear infinite;
}

.poster-track:hover {
  animation-play-state: paused;
}

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

.poster-card {
  position: relative;
  width: 210px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #151515;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  transform: translateZ(0);
}

.poster-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.poster-card:hover {
  transform: translateY(-8px) scale(1.015);
}

.poster-card:hover img {
  transform: scale(1.06);
  filter: brightness(0.48) saturate(1.1);
}

.poster-title,
.poster-review {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
}

.poster-title {
  bottom: 0;
  margin: 0;
  padding: 46px 14px 14px;
  background: rgba(0, 0, 0, 0.62);
  font-size: 18px;
  font-weight: 900;
}

.poster-review {
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 18px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.26s ease, transform 0.26s ease;
  background: rgba(0, 0, 0, 0.7);
}

.poster-card:hover .poster-review {
  opacity: 1;
  transform: translateY(0);
}

.poster-review p {
  margin: 0;
  color: #fff2df;
  line-height: 1.55;
  font-size: 14px;
}

.rating {
  color: var(--accent);
  font-weight: 900;
}

.poster-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.guide-section {
  padding: 16px;
  border-radius: 24px;
  background: rgba(124, 140, 255, 0.055);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.2);
}

.guide-section .section-head {
  margin-bottom: 12px;
}

.guide-section .section-head h2 {
  font-size: 22px;
}

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

.guide-mini {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background: rgba(244, 247, 251, 0.07);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, background 0.18s ease;
}

.guide-mini:hover {
  transform: translateY(-3px);
  background: rgba(95, 212, 200, 0.14);
}

.guide-mini b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #07131f;
  background: var(--accent);
  font-size: 13px;
}

.guide-mini strong,
.guide-mini small {
  display: block;
}

.guide-mini strong {
  margin-bottom: 4px;
}

.guide-mini small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nav-head {
  align-items: center;
}

.site-filter {
  width: min(360px, 100%);
  border: 0;
  border-radius: 18px;
  outline: 0;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(244, 247, 251, 0.08);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.category-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(244, 247, 251, 0.07);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.category-tabs button.active {
  color: #07131f;
  border-color: transparent;
  background: var(--accent-2);
  font-weight: 900;
}

.nav-groups {
  display: grid;
  gap: 22px;
}

.nav-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 20px;
}

.count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(var(--nav-cols), minmax(0, 1fr));
  gap: 16px;
}

.site-card {
  position: relative;
  display: block;
  min-height: 250px;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.site-card::before {
  content: attr(data-logo);
  position: absolute;
  inset: 16px 16px 74px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: rgba(244, 247, 251, 0.1);
  background: rgba(244, 247, 251, 0.06);
  font-size: 54px;
  font-weight: 1000;
}

.site-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44), 0 0 54px rgba(124, 140, 255, 0.14);
  filter: saturate(1.08);
}

.site-blur,
.site-preview {
  position: absolute;
  inset: 0;
  background-image: var(--preview);
  background-position: top center;
  background-size: cover;
}

.site-blur {
  transform: scale(1.1);
  filter: blur(18px) saturate(1.18) brightness(0.72);
  opacity: 0.7;
}

.site-preview {
  inset: 16px 16px 74px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s ease;
}

.site-preview img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-card.preview-loaded .site-preview img {
  opacity: 1;
}

.site-card:hover .site-preview {
  transform: scale(1.025);
}

.site-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08);
}

.site-info {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(18, 18, 21, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 17px;
  color: #07131f;
  background: var(--accent);
  font-weight: 1000;
}

.site-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(244, 247, 251, 0.1);
}

.site-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-card p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state,
.loading-state {
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1280px) {
  .site-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  .hero {
    padding: 10px 9px 0;
  }

  .hero-poster {
    width: 100%;
    min-height: 210px;
    border-radius: 22px;
    background-position: center;
  }

  .hero-copy {
    padding: 22px 14px 18px;
  }

  .mobile-logo {
    display: block;
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  }

  .site-kicker,
  h1 {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr 54px;
    gap: 8px;
    padding: 7px;
    border-radius: 18px;
  }

  .search-panel button {
    width: 54px;
    height: 44px;
    overflow: hidden;
    padding: 0;
    font-size: 0;
  }

  .search-panel button::before {
    content: "AI";
    font-size: 14px;
  }

  .search-panel input {
    height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

  .search-drawer {
    width: calc(100% - 28px);
    margin: -8px 14px 24px;
  }

  .page {
    width: min(100% - 18px, 1500px);
  }

  .section {
    border-radius: 24px;
    padding: 15px;
  }

  .section-head,
  .nav-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .poster-card {
    width: 168px;
    border-radius: 20px;
  }

  .site-filter {
    width: 100%;
  }

  .site-card {
    min-height: 178px;
    border-radius: 18px;
    padding: 8px;
  }

  .site-card::before,
  .site-preview {
    inset: 8px 8px 58px;
    border-radius: 14px;
  }

  .site-info {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 34px 1fr;
    gap: 8px;
    min-height: 44px;
    padding: 7px;
    border-radius: 14px;
  }

  .site-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .site-card strong {
    font-size: 13px;
  }

  .site-card p {
    display: none;
  }

  .guide-mini {
    grid-template-columns: 34px 1fr;
    min-height: 68px;
    padding: 9px;
    border-radius: 14px;
  }

  .guide-mini b {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 11px;
  }

  .guide-mini strong {
    font-size: 13px;
  }

  .guide-mini small {
    -webkit-line-clamp: 1;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(1120px, 100%);
  height: min(760px, 86vh);
  overflow: hidden;
  border-radius: 26px;
  background: rgba(9, 12, 16, 0.96);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.58);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px 0 20px;
  background: rgba(255, 255, 255, 0.06);
}

.modal-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.modal iframe {
  width: 100%;
  height: calc(100% - 54px);
  border: 0;
  background: #0b0d10;
}
