/* ========== Homepage ========== */

.home-hero {
  position: relative;
  z-index: 30;
  border-radius: 20px;
  overflow: visible;
  margin-bottom: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  color: #fff;
  background: linear-gradient(135deg, #0d47a1 0%, #1677ff 38%, #4096ff 72%, #69b1ff 100%);
  box-shadow: 0 12px 40px rgba(22, 119, 255, 0.28);
}

.home-hero-mesh {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 40%);
  animation: heroMesh 12s ease-in-out infinite alternate;
}

@keyframes heroMesh {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  overflow: visible;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.home-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.home-hero-sub {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  opacity: 0.92;
  line-height: 1.6;
}

.home-hero-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  z-index: 200;
}

/* 联想展开时抬高 Hero 层，避免被下方 quickdock 盖住 */
.home-hero:has(.search-suggest-panel:not([hidden])),
body.search-suggest-open .home-hero {
  z-index: 100;
}

body.search-suggest-open .home-quickdock {
  z-index: 5;
}

.home-hero-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 0.35rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.home-hero-search-box input {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-radius: 10px;
  background: transparent;
  color: #1d2129;
  caret-color: var(--primary);
  position: static;
}

.home-hero-search-box input::placeholder {
  color: #86909c;
}

.home-hero-search-box input:-webkit-autofill,
.home-hero-search-box input:-webkit-autofill:hover,
.home-hero-search-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1d2129;
  box-shadow: 0 0 0 1000px #fff inset;
}

.home-hero-search-box button {
  grid-column: 2;
  justify-self: end;
  flex-shrink: 0;
  border: none;
  background: linear-gradient(135deg, var(--primary), #4096ff);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  position: static;
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-hero-search-box button:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.4);
}

.home-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  max-width: 720px;
  margin: 0 auto;
}

.home-stat-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 0.65rem 0.5rem;
  backdrop-filter: blur(8px);
}

.home-stat-card strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.home-stat-card span {
  font-size: 0.7rem;
  opacity: 0.88;
}

.home-stat-card.accent-blue strong { color: #bae0ff; }
.home-stat-card.accent-green strong { color: #aff0b5; }
.home-stat-card.accent-purple strong { color: #efdbff; }
.home-stat-card.accent-orange strong { color: #ffe7ba; }

/* Quick dock */
.home-quickdock {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.home-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  min-width: 64px;
  transition: transform 0.2s var(--ease), color 0.2s;
}

.home-quick-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
}

.home-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--qi-color) 12%, white);
  color: var(--qi-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.home-quick-item:hover .home-quick-icon {
  transform: scale(1.08);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--qi-color) 25%, transparent);
}

/* Banner */
.home-banner {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.home-banner-track {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.home-banner-item {
  flex: 1 0 280px;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
}

.home-banner-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.home-banner-item:hover img { transform: scale(1.06); }

.home-banner-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.home-ad-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.home-ad-top-item {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-ad-top-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.home-ad-top-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.home-ad-top-item span {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}

.home-side-ads { padding: 0.5rem; }

.home-side-ad-item {
  display: block;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.home-side-ad-item:last-child { margin-bottom: 0; }

.home-side-ad-item img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

/* Section */
.home-section { margin-bottom: 1.75rem; }

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.home-section-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-section-head h2 .fa-crown { color: var(--accent-orange); }
.home-section-head h2 .fa-fire { color: var(--accent-red); }

.home-section-more {
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s;
}

.home-section-more:hover { gap: 0.55rem; }

/* Featured horizontal scroll */
.home-featured-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.home-featured-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.28s var(--ease);
}

.home-featured-card:hover {
  border-color: rgba(22, 119, 255, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.home-featured-card img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.home-featured-meta { min-width: 0; }

.home-featured-meta strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.home-featured-meta p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.home-featured-spec {
  margin: 0.15rem 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.home-featured-price {
  display: block;
  font-size: 0.75rem;
  color: #00b42a;
  font-weight: 600;
  margin-top: 0.25rem;
}

.home-featured-score {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--accent-orange);
  font-weight: 600;
}

.home-section-sale {
  background: linear-gradient(180deg, rgba(255, 125, 0, 0.06) 0%, transparent 100%);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem 1rem;
}

.home-sale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.home-core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.home-core-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s var(--ease);
}

.home-core-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.1);
}

.home-core-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.home-core-icon.type-1 { background: rgba(22, 119, 255, 0.12); color: var(--primary); }
.home-core-icon.type-2 { background: rgba(0, 180, 42, 0.12); color: var(--accent-green); }
.home-core-icon.type-3 { background: rgba(114, 46, 209, 0.12); color: #722ed1; }

.home-core-card strong {
  font-size: 0.8125rem;
  text-align: center;
  line-height: 1.35;
}

/* Layout */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

.home-triple-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.home-panel-power { border-top: 3px solid var(--primary); }
.home-panel-token { border-top: 3px solid var(--accent-green); }
.home-panel-tool { border-top: 3px solid #722ed1; }

.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.home-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.home-panel-power .home-panel-head h2 { color: var(--primary); }
.home-panel-token .home-panel-head h2 { color: var(--accent-green); }
.home-panel-tool .home-panel-head h2 { color: #722ed1; }

.home-panel-head a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
}

.home-panel-head a:hover { color: var(--primary); }

.home-cate-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.home-cate-pills a {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
  transition: background 0.2s;
}

.home-cate-pills.token a {
  background: rgba(0, 180, 42, 0.1);
  color: var(--accent-green);
}

.home-cate-pills.tool a {
  background: rgba(114, 46, 209, 0.1);
  color: #722ed1;
}

.home-panel-empty {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.home-panel-empty a { color: var(--primary); }

.home-cate-pills a:hover { filter: brightness(0.95); }

.home-site-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.home-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
}

/* Sidebar */
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.home-side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.home-side-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.home-side-card h3 .fa { color: var(--primary); }

.home-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-news-list li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
}

.home-news-list li:last-child { border-bottom: none; }

.home-news-list a {
  display: block;
  font-size: 0.8125rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s;
}

.home-news-list a:hover { color: var(--primary); }

.home-news-list .news-cat {
  margin-right: 0.35rem;
  vertical-align: 0.05em;
}

.home-news-list time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.home-news-list .empty { color: var(--text-muted); font-size: 0.8125rem; }

.home-side-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
}

.home-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.home-keyword {
  font-size: calc(0.7rem + min(var(--kw-size, 1) * 0.05rem, 0.25rem));
  padding: 0.25rem 0.6rem;
  background: #f2f3f5;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.home-keyword:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.home-side-empty {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.home-side-cta {
  background: linear-gradient(160deg, #f0f7ff, #fff);
  border-color: rgba(22, 119, 255, 0.2);
}

.home-side-cta p {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.home-cta-btn {
  display: block;
  text-align: center;
  padding: 0.55rem;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.home-cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-triple-panels { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .home-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .home-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .home-hero { padding: 1.75rem 1rem; }
  .home-hero-search-box {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }
  .home-hero-search-box input { grid-column: 1; }
  .home-hero-search-box button {
    grid-column: 1;
    width: 100%;
    justify-self: stretch;
    padding: 0.65rem;
  }
  .home-quickdock { gap: 0.75rem; }
  .home-featured-card { flex: 0 0 220px; }
}
