:root {
  --ink: #0b1833;
  --muted: #66738f;
  --blue: #1676f3;
  --line: #e7ebf2;
  --shell: 1300px;
  --shadow: 0 16px 38px rgba(17, 39, 82, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7f8fb;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,231,240,.9);
}
.header-inner {
  width: min(var(--shell), calc(100% - 44px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand img { width: 170px; height: auto; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 8px; }
.main-nav a {
  position: relative;
  min-width: 82px;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #52617e;
  font-weight: 700;
  font-size: 15px;
}
.main-nav a span { font-size: 11px; color: #687792; }
.main-nav a:hover, .main-nav a.active { color: var(--blue); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  background: var(--blue);
  border-radius: 999px 999px 0 0;
}

.hero {
  position: relative;
  min-height: 485px;
  overflow: hidden;
  background: #102856;
}
.hero-bg, .hero-shade {
  position: absolute;
  inset: 0;
}
.hero-bg {
  background: url('./assets/hero-city.webp') center center / cover no-repeat;
  transform: scale(1.01);
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(4,31,79,.84) 0%, rgba(8,38,89,.58) 31%, rgba(13,48,101,.18) 56%, rgba(8,37,82,.12) 100%),
    linear-gradient(180deg, rgba(3,19,48,.04) 0%, rgba(4,22,53,.13) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--shell), calc(100% - 44px));
  margin: 0 auto;
  padding: 14px 0 34px;
}
.leaderboard-wrap {
  display: flex;
  justify-content: center;
  min-height: 98px;
}
.leaderboard-scroll {
  width: 100%;
  max-width: 760px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 16px 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.4) transparent;
}
.leaderboard-fixed {
  width: 728px;
  min-height: 90px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(1,10,31,.28);
  background: rgba(255,255,255,.08);
}
.hero-content {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(330px, .92fr) minmax(520px, 1.35fr);
  align-items: center;
  gap: 70px;
}
.hero-copy { color: #fff; padding-top: 12px; text-shadow: 0 2px 12px rgba(3,18,49,.35); }
.eyebrow { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 13px; }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(42px, 5vw, 64px); line-height: 1.08; letter-spacing: -2px; }
.hero-copy p { margin: 0; max-width: 580px; font-size: 18px; line-height: 1.75; font-weight: 600; color: rgba(255,255,255,.92); }
.search-area { align-self: center; padding-top: 52px; }
.search-box {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  height: 58px;
  background: #fff;
  border: 3px solid #4b94ff;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(5,28,69,.24);
  overflow: hidden;
}
.search-icon { text-align: right; font-size: 27px; color: #1c73e8; transform: rotate(-15deg); }
.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: #22314f;
  font-size: 17px;
}
.search-box input::placeholder { color: #7d879b; }
.search-box button {
  height: 100%;
  min-width: 94px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #1b80ff, #1670e8);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.search-box button:hover { filter: brightness(1.06); }
.popular-tags {
  margin-top: 17px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}
.popular-tags strong { margin-right: 2px; }
.popular-tags button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(25,35,64,.46);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 6px 12px;
  backdrop-filter: blur(4px);
}
.popular-tags button:hover { background: rgba(26,119,246,.82); }

.content-shell { width: min(var(--shell), calc(100% - 44px)); margin: 0 auto; }
.cards-section { position: relative; z-index: 5; margin-top: -48px; }
.cards-grid { display: grid; gap: 14px; }
.first-row { grid-template-columns: repeat(6, 1fr); }
.portal-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.16 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #18233c;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.72);
  transition: transform .18s ease, box-shadow .18s ease;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(17,39,82,.21); }
.portal-card > img:not(.card-icon-img) { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.portal-card:hover > img:not(.card-icon-img) { transform: scale(1.04); }
.portal-card:nth-child(1) > img:not(.card-icon-img) { object-position: 65% 50%; }
.portal-card:nth-child(2) > img:not(.card-icon-img) { object-position: 62% 50%; }
.portal-card:nth-child(3) > img:not(.card-icon-img) { object-position: 64% 50%; }
.portal-card:nth-child(4) > img:not(.card-icon-img) { object-position: 61% 48%; }
.portal-card:nth-child(5) > img:not(.card-icon-img) { object-position: 52% 50%; }
.portal-card:nth-child(6) > img:not(.card-icon-img) { object-position: 50% 48%; }
.card-gradient { position: absolute; inset: 34% 0 0; background: linear-gradient(180deg, transparent, rgba(6,13,29,.30) 34%, rgba(5,10,22,.93) 100%); }
.card-icon-img {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(4,18,52,.30));
  transform: translateZ(0);
  transition: transform .18s ease, filter .18s ease;
}
.portal-card:hover .card-icon-img {
  transform: translateY(-1px) scale(1.045);
  filter: drop-shadow(0 10px 16px rgba(4,18,52,.38));
}
.card-copy { position: absolute; left: 14px; right: 30px; bottom: 13px; color: #fff; }
.card-copy strong { display: block; margin-bottom: 5px; font-size: 19px; line-height: 1.15; }
.card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: rgba(255,255,255,.84); }
.card-arrow { position: absolute; right: 13px; bottom: 18px; color: #fff; font-size: 30px; line-height: 1; }

.second-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1.12fr);
  gap: 14px;
  margin-top: 14px;
}
.second-row { grid-template-columns: repeat(3, 1fr); }
.second-row .portal-card { aspect-ratio: 1.46 / 1; }
.featured-card {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #6a1023;
  border: 1px solid rgba(255,255,255,.76);
}
.featured-card img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; transition: transform .35s ease; }
.featured-card:hover img { transform: scale(1.035); }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(70,6,20,.91) 0%, rgba(75,8,23,.72) 37%, rgba(52,6,16,.08) 70%); }
.sponsored-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ff3c68;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.featured-copy { position: absolute; left: 17px; right: 16px; bottom: 16px; color: #fff; }
.featured-copy strong { display: block; font-size: 25px; margin-bottom: 8px; }
.featured-copy small { display: block; line-height: 1.55; color: rgba(255,255,255,.88); font-size: 13px; }
.featured-button {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 23px;
  border-radius: 999px;
  background: linear-gradient(135deg,#ff255e,#ff4f74);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(121,0,31,.25);
}
.search-empty { margin-top: 18px; padding: 18px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
  margin-bottom: 40px;
}
.discover-banner {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: #ffede8;
}
.discover-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.discover-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,244,240,.95) 0%, rgba(255,239,234,.88) 43%, rgba(255,235,228,.15) 73%, rgba(255,235,228,0) 100%); }
.discover-copy { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); max-width: 58%; color: #781520; }
.discover-copy small { display: block; margin-bottom: 9px; color: #ff4b45; font-weight: 900; font-size: 14px; }
.discover-copy strong { display: block; margin-bottom: 10px; font-size: clamp(24px,2.4vw,34px); line-height: 1.25; }
.discover-copy span { color: #5a3d42; font-size: 15px; line-height: 1.7; }
.discover-button {
  position: absolute;
  right: 42px;
  bottom: 35px;
  padding: 16px 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg,#ff3158,#ff832d);
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(240,74,47,.26);
}
.rectangle-ad {
  position: relative;
  width: 300px;
  min-height: 250px;
  background: #fff;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rectangle-ad-inner { width: 300px; height: 250px; }
.ad-label { position: absolute; z-index: 3; left: 7px; top: 6px; padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.88); color: #788399; font-size: 10px; pointer-events: none; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  width: min(var(--shell), calc(100% - 44px));
  min-height: 150px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  color: var(--muted);
}
.footer-inner img { width: 142px; height: auto; }
.footer-inner p { margin: 9px 0 0; font-size: 13px; }
.footer-note { text-align: right; max-width: 520px; line-height: 1.7; }

[hidden] { display: none !important; }
[data-search].is-hidden { display: none; }

@media (max-width: 1120px) {
  .main-nav a { min-width: 68px; font-size: 14px; }
  .hero-content { grid-template-columns: 1fr 1.15fr; gap: 34px; }
  .first-row { grid-template-columns: repeat(3,1fr); }
  .portal-card { aspect-ratio: 1.36 / 1; }
  .second-layout { grid-template-columns: 1fr; }
  .featured-card { min-height: 250px; }
}

@media (max-width: 820px) {
  .header-inner { width: min(100% - 28px, var(--shell)); min-height: 64px; }
  .brand img { width: 145px; }
  .main-nav { gap: 0; }
  .main-nav a { min-width: auto; padding: 0 9px; font-size: 13px; }
  .main-nav a span { display: none; }
  .hero { min-height: 610px; }
  .hero-inner { width: min(100% - 28px, var(--shell)); }
  .hero-content { min-height: auto; grid-template-columns: 1fr; gap: 18px; align-items: start; padding-top: 15px; }
  .hero-copy { max-width: 610px; }
  .hero-copy h1 { font-size: clamp(38px,10vw,56px); }
  .hero-copy p { font-size: 16px; }
  .search-area { padding-top: 0; }
  .cards-section { width: min(100% - 28px, var(--shell)); margin-top: -38px; }
  .first-row, .second-row { grid-template-columns: repeat(2,1fr); }
  .portal-card, .second-row .portal-card { aspect-ratio: 1.25 / 1; }
  .lower-grid { width: min(100% - 28px, var(--shell)); grid-template-columns: 1fr; }
  .rectangle-ad { margin: 0 auto; }
  .discover-banner { min-height: 300px; }
  .discover-copy { max-width: 65%; left: 22px; }
  .discover-button { right: 22px; bottom: 22px; }
}

@media (max-width: 560px) {
  .site-header { position: relative; }
  .header-inner { min-height: 62px; }
  .brand img { width: 132px; }
  .main-nav a:not(.active):not([href="#featured"]) { display: none; }
  .main-nav a { font-size: 13px; padding: 0 7px; }
  .hero { min-height: 620px; }
  .hero-bg { background-position: 66% center; }
  .hero-shade { background: linear-gradient(180deg, rgba(5,31,76,.39), rgba(6,29,69,.72) 52%, rgba(5,25,61,.88)); }
  .leaderboard-wrap { min-height: 100px; margin-inline: -14px; }
  .leaderboard-scroll { padding-inline: 14px; }
  .leaderboard-fixed { margin-left: 0; }
  .hero-content { padding-top: 8px; }
  .hero-copy h1 { letter-spacing: -1px; }
  .hero-copy p { font-size: 15px; line-height: 1.65; }
  .search-box { height: 54px; grid-template-columns: 32px 1fr 68px; }
  .search-box input { font-size: 14px; padding-inline: 9px; }
  .search-box button { min-width: 68px; font-size: 14px; }
  .popular-tags { gap: 7px; font-size: 12px; }
  .popular-tags button { padding: 5px 9px; }
  .cards-section { margin-top: -26px; }
  .first-row, .second-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .portal-card, .second-row .portal-card { aspect-ratio: .93 / 1; border-radius: 10px; }
  .card-icon-img { top: 8px; left: 8px; width: 44px; height: 44px; }
  .card-copy { left: 11px; right: 24px; bottom: 10px; }
  .card-copy strong { font-size: 16px; }
  .card-copy small { font-size: 11px; }
  .card-arrow { right: 9px; bottom: 13px; font-size: 24px; }
  .second-layout { gap: 10px; margin-top: 10px; }
  .featured-card { min-height: 265px; }
  .featured-copy strong { font-size: 23px; }
  .lower-grid { margin-top: 12px; }
  .discover-banner { min-height: 360px; }
  .discover-banner img { object-position: 70% center; }
  .discover-overlay { background: linear-gradient(180deg, rgba(255,244,240,.97) 0%, rgba(255,239,234,.78) 55%, rgba(255,235,228,.12) 100%); }
  .discover-copy { top: 27px; left: 20px; right: 20px; transform: none; max-width: none; }
  .discover-copy strong { font-size: 24px; }
  .discover-copy span { font-size: 13px; }
  .discover-button { left: 20px; right: auto; bottom: 22px; padding: 13px 26px; }
  .footer-inner { width: min(100% - 28px,var(--shell)); min-height: 180px; flex-direction: column; justify-content: center; align-items: flex-start; }
  .footer-note { text-align: left; }
}
