﻿/* ============================================================
   配芯网 · 企业级设计系统 v2.0
   风格：高端极简商务轻奢 · B端官网视觉规范
   ============================================================ */

/* ── 1. Design Tokens ────────────────────────────────────── */
:root {
  /* 主色系 — 低饱和深蓝 */
  --primary:          #3B7DD8;
  --primary-light:    #5B9AE8;
  --primary-dark:     #2A5FAA;
  --primary-50:       rgba(59,125,216,0.06);
  --primary-100:      rgba(59,125,216,0.12);

  /* 中性色阶 */
  --gray-50:   #FAFBFC;
  --gray-100:  #F4F5F7;
  --gray-150:  #ECEEF1;
  --gray-200:  #E2E4E8;
  --gray-300:  #CDD1D8;
  --gray-400:  #A0A6B1;
  --gray-500:  #72798A;
  --gray-600:  #545B6B;
  --gray-700:  #3D4352;
  --gray-800:  #2A2F3C;
  --gray-900:  #1A1E28;

  /* 强调色 */
  --accent-orange:    #E8833A;
  --accent-green:     #3EAF7C;
  --accent-red:       #E05D5D;

  /* 表面 */
  --surface:          #FFFFFF;
  --surface-raised:   #FFFFFF;
  --surface-overlay:  rgba(255,255,255,0.92);
  --surface-backdrop: rgba(26,30,40,0.45);

  /* 页面底色 */
  --bg:               #F6F7F9;
  --bg-subtle:        #F0F2F5;

  /* 阴影系统 */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 28px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-glow:0 0 0 3px rgba(59,125,216,0.15);

  /* 圆角 */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* 间距基准(4px) */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3:  12px;
  --sp-4:  16px; --sp-5:  20px; --sp-6:  24px;
  --sp-8:  32px; --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px; --sp-20: 80px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
               Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;

  /* 字号体系 */
  --text-xs:   12px;  --text-sm:  13px;  --text-base: 14px;
  --text-md:   15px;  --text-lg:  16px;  --text-xl:   18px;
  --text-2xl:  22px;  --text-3xl: 28px;  --text-4xl:  36px;

  /* 行高 */
  --leading-tight:  1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* 字重 */
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* 过渡 */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;

  /* 容器 */
  --container-max: 1200px;
  --header-h:      60px;
}

/* ── 2. Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover, a:active, a:focus { text-decoration: none; }

dl, ol, ul { margin-top: 0; margin-bottom: 0; }
li { list-style: none; }
ul, ol { padding: 0; }

img { max-width: 100%; height: auto; }

/* ── 3. Layout Container ─────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}

.content-box {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.main-index {
  padding-bottom: var(--sp-12);
  min-height: calc(100vh - var(--header-h) - 120px);
  position: relative;
  z-index: 1;
}

/* ── 4. Header ───────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--gray-150);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

header .main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--sp-6);
  max-width: var(--container-max);
  margin: 0 auto;
}

.not_operational {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  z-index: 100;
  background: rgba(255,255,255,.8);
  display: none;
}

/* Logo */
header .logo {
  font-size: var(--text-xl);
  margin: 0;
  font-weight: var(--fw-semibold);
  position: relative;
  z-index: 99;
  flex-shrink: 0;
}
header .logo a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  line-height: var(--header-h);
  color: var(--gray-800);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}
header .logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  animation: logoSpin 30s linear infinite;
  will-change: transform;
}
header .logo span {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* Nav */
header .nav {
  flex: 1;
  display: flex;
  justify-content: center;
  background: transparent;
  overflow: visible;
  transition: all var(--duration-slow) var(--ease-out);
  position: static;
  width: auto;
  box-shadow: none;
  align-items: center;
}

header .nav ul {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

header .nav li {
  float: none;
  font-size: var(--text-base);
}

header .nav a {
  display: flex;
  align-items: center;
  line-height: var(--header-h);
  font-size: var(--text-base);
  color: var(--gray-500);
  padding: 0 var(--sp-4);
  border-bottom: 2px solid transparent;
  font-weight: var(--fw-medium);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}
header .nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: all var(--duration-normal) var(--ease-out);
  transform: translateX(-50%);
}
header .nav a:hover {
  color: var(--primary);
}
header .nav a:hover::after {
  width: calc(100% - var(--sp-8));
}
header .nav a.active {
  color: var(--primary);
  font-weight: var(--fw-semibold);
}
header .nav a.active::after {
  width: calc(100% - var(--sp-8));
}

/* Mobile Nav Toggle */
header .nav-btn {
  position: fixed;
  border: none;
  background: transparent;
  top: 0; right: 12px;
  left: auto;
  outline: 0;
  margin-top: 14px;
  z-index: 1001;
  padding: 8px;
  cursor: pointer;
}
header .bar-btn {
  position: fixed;
  border: none;
  background: transparent;
  top: 0; left: 10px;
  outline: 0;
  margin-top: 14px;
  z-index: 1001;
  padding: 8px;
  cursor: pointer;
}

header .bar-btn .icon-bar,
header .nav-btn .icon-line {
  display: block;
  margin: 5px 0;
  width: 22px;
  height: 2px;
  background: var(--gray-400);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
header .nav-btn .middle { margin: 0 auto; }

header .animated2 .top {
  transform: translateY(7px) rotateZ(45deg);
}
header .animated2 .middle { width: 0; opacity: 0; }
header .animated2 .bottom {
  transform: translateY(-7px) rotateZ(-45deg);
}

/* Mobile Nav Drawer */
@media (max-width: 991px) {
  header .nav {
    position: fixed;
    top: -400px;
    left: 0;
    width: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    margin-left: 0;
    padding: var(--sp-4) 0;
    transition: top var(--duration-slow) var(--ease-out);
  }
  header .showNav {
    top: var(--header-h);
  }
  header .nav ul {
    flex-direction: column;
    gap: 0;
  }
  header .nav a {
    line-height: 48px;
    padding: 0 var(--sp-6);
    border-bottom: 1px solid var(--gray-100);
  }
  header .nav a::after { display: none; }
  header .nav a:hover {
    background: var(--primary-50);
  }
  header .nav li { width: 100%; }
}

/* ── 5. Search Section ───────────────────────────────────── */
.sousuo {
  padding: var(--sp-6) 0 var(--sp-8);
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 100;
}

.search {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  z-index: 100;
}

.search-box {
  height: 52px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  border: 1.5px solid var(--gray-200);
  background: var(--surface);
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.search-engine-trigger {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0 var(--sp-2) 0 var(--sp-3);
  flex-shrink: 0;
  height: 100%;
  border-right: 1px solid var(--gray-150);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  z-index: 2;
}
.search-engine-trigger:hover {
  background: var(--gray-50);
}
.search-engine-trigger:hover .search-arrow-down {
  color: var(--primary);
  transform: translateY(1px);
}

.search-icon {
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.search-arrow-down {
  color: var(--gray-400);
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.search-input {
  box-sizing: border-box;
  flex: 1;
  height: auto;
  line-height: normal;
  font-size: var(--text-lg);
  color: var(--gray-800);
  border: none;
  outline: none;
  padding: 0 var(--sp-4);
  background: transparent;
  font-family: var(--font-sans);
}
.search-input::placeholder {
  color: var(--gray-300);
  font-weight: var(--fw-normal);
}

.search-clear {
  position: absolute;
  right: 100px;
  top: 50%;
  font-size: 18px;
  color: var(--gray-300);
  margin-top: -9px;
  cursor: pointer;
  display: none;
  transition: color var(--duration-fast);
}
.search-clear:hover { color: var(--gray-500); }

.search-btn {
  width: 88px;
  height: auto;
  background: var(--primary);
  border: none;
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--text-md);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  outline: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.search-btn:hover {
  background: var(--primary-dark);
}
.search-btn:active {
  transform: scale(0.97);
}

/* Hot Models Marquee */
.hot-models {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0 0;
  max-width: 780px;
  margin: 0 auto;
}
.hot-models-label {
  font-size: var(--text-xs);
  color: var(--gray-400);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: var(--fw-medium);
}
.hot-models-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.hot-models-scroll {
  display: flex;
  gap: var(--sp-3);
  white-space: nowrap;
  animation: marqueeScroll 35s linear infinite;
  width: max-content;
}
.hot-models-scroll:hover {
  animation-play-state: paused;
}
.hot-models-scroll a {
  font-size: var(--text-xs);
  color: var(--gray-500);
  padding: 2px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.hot-models-scroll a:hover {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Search Suggest Popup */
.search-suggest {
  position: absolute;
  top: 56px; left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--sp-5);
  z-index: 1100;
  display: none;
  animation: suggestFadeIn 0.2s var(--ease-out);
}
.search-suggest.visible {
  display: block;
}
@keyframes suggestFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.suggest-tagline {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--accent-orange);
  font-weight: var(--fw-semibold);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--gray-100);
  letter-spacing: 0.05em;
}
.suggest-section {
  margin-bottom: var(--sp-4);
}
.suggest-section:last-child {
  margin-bottom: 0;
}
.suggest-section-title {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--gray-700);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.suggest-fire {
  font-size: var(--text-base);
}
.suggest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.suggest-tags a {
  font-size: var(--text-xs);
  color: var(--gray-500);
  padding: 4px 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-mono);
}
.suggest-tags a:hover {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
  transform: translateY(-1px);
}

/* Engine Switch Bar - hidden */
.engine-switch-bar {
  display: none;
}
.engine-switch-bar:hover {
  color: var(--gray-600);
  background: linear-gradient(to bottom, var(--gray-50), var(--surface));
  border-color: var(--gray-300);
}
.engine-switch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-400);
  transition: all var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}
.engine-switch-icon svg {
  display: block;
}
.engine-switch-bar:hover .engine-switch-icon {
  background: var(--primary-50);
  color: var(--primary);
  transform: translateY(1px);
}
.engine-switch-label {
  color: var(--gray-400);
  font-weight: var(--fw-normal);
}
.engine-current-name {
  font-weight: var(--fw-semibold);
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  border: none;
  font-size: var(--text-sm);
  box-shadow: 0 2px 8px rgba(59,125,216,0.2);
  transition: all var(--duration-normal) var(--ease-out);
  letter-spacing: 0.02em;
}
.engine-switch-bar:hover .engine-current-name {
  box-shadow: 0 3px 12px rgba(59,125,216,0.3);
  transform: translateY(-1px);
}
.engine-switch-hint {
  color: var(--gray-300);
  font-size: var(--text-xs);
  position: relative;
  padding-left: var(--sp-3);
}
.engine-switch-hint::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: var(--gray-200);
  transform: translateY(-50%);
}
.engine-switch-bar:hover .engine-switch-hint {
  color: var(--primary);
}
.engine-switch-bar:hover .engine-switch-hint::before {
  background: var(--primary-100);
}

@media (max-width: 768px) {
  .engine-switch-label, .engine-switch-hint { display: none; }
  .engine-current-name {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
  }
  .engine-switch-bar { padding: var(--sp-2) var(--sp-3); }
}

/* Search Engine Dropdown */
.search-engine {
  position: absolute;
  top: 58px; left: 0;
  width: 100%;
  background: var(--surface);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  transition: all var(--duration-normal) var(--ease-out);
  display: none;
  z-index: 1100;
  border: 1px solid var(--gray-150);
}
.search-engine-head {
  overflow: hidden;
  margin-bottom: var(--sp-3);
  padding-right: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-engine-tit {
  float: none;
  margin: 0;
  font-size: var(--text-md);
  color: var(--primary) !important;
  font-weight: var(--fw-semibold) !important;
}
.search-engine-tool {
  float: none;
  font-size: var(--text-xs);
  color: var(--gray-400);
}
.search-engine-tool > span {
  float: right;
  display: inline-block;
  width: 28px; height: 16px;
  background: url(https://www.icqb.com/images/off_on.png) no-repeat 0 0;
  cursor: pointer;
  border-radius: var(--radius-full);
}
.search-engine-tool > span.off { background-position: -30px 0; }

.search-engine-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.search-engine-list::after { display: none; }
.search-engine-list li {
  float: none !important;
  width: auto !important;
  padding: var(--sp-2) var(--sp-4) !important;
  margin: 0 !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  font-size: var(--text-base) !important;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: var(--surface);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  display: flex !important;
  align-items: center;
  gap: var(--sp-2);
  line-height: normal !important;
}
.search-engine-list li:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.search-engine-list li img {
  width: 20px !important;
  height: 20px !important;
  border-radius: var(--radius-sm) !important;
  float: none !important;
  margin: 0 !important;
  object-fit: contain;
}

.search-engine ul { padding: 0; }
.search-engine ul::before { display: none; }

/* Hot Text */
.search-hot-text {
  position: absolute;
  z-index: 1100;
  width: 100%;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-150);
  border-top: none;
  overflow: hidden;
}
.search-hot-text ul { margin: 0; }
.search-hot-text ul li {
  border-top: 1px solid var(--gray-100);
  line-height: 38px;
  font-size: var(--text-base);
  padding: 0 var(--sp-6);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.search-hot-text ul li:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.search-hot-text ul li.current {
  background: var(--primary-50);
  color: var(--primary);
}

/* ── 6. Navigation Cards Grid ────────────────────────────── */
.row.dh {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--sp-3) * -1);
  margin-right: calc(var(--sp-3) * -1);
}

.dh {
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-5);
}
.dh .col-xs-4 { padding: 0 var(--sp-1); }

/* Category Card */
div.dh > .row {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  margin-left: 0;
  margin-right: 0;
}
div.dh > .row:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-150);
  transform: translateY(-2px);
}

/* Category Title */
.dhname {
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.dhname::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}
.dhname img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Link Items */
.dh a {
  background: var(--gray-50);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-weight: var(--fw-medium);
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.dh a:hover {
  color: #fff !important;
  font-weight: var(--fw-semibold);
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,125,216,0.25);
}

/* Highlighted links */
.dh a[style*="color:#da542e"],
.dh a[style*="color: #da542e"] {
  color: var(--accent-orange) !important;
  font-weight: var(--fw-semibold);
  background: rgba(232,131,58,0.06);
  border-color: rgba(232,131,58,0.12);
}
.dh a[style*="color:#da542e"]:hover,
.dh a[style*="color: #da542e"]:hover {
  color: #fff !important;
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  box-shadow: 0 4px 12px rgba(232,131,58,0.3);
}

.dh a[style*="color:#27a9e3"],
.dh a[style*="color: #27a9e3"] {
  color: #27a9e3 !important;
  font-weight: var(--fw-semibold);
  background: rgba(39,169,227,0.06);
}

.dh a[style*="color:#ffb848"],
.dh a[style*="color: #ffb848"] {
  color: var(--accent-orange) !important;
  font-weight: var(--fw-semibold);
  background: rgba(255,184,72,0.06);
}

.dh a[style*="color:red"] {
  color: var(--accent-red) !important;
  font-weight: var(--fw-semibold);
  background: rgba(224,93,93,0.06);
}

/* ── 7. Footer ───────────────────────────────────────────── */
.footer {
  width: 100%;
  background: var(--surface);
  font-size: var(--text-sm);
  padding: var(--sp-4) 0 var(--sp-3);
  margin-top: 0;
  height: auto;
  z-index: 1;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-150);
}
.footer .container {
  padding: var(--sp-4);
}
.footer #hitokoto {
  display: block;
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-xs);
  line-height: 1.5;
  max-width: none;
  margin: 0 auto var(--sp-2);
  white-space: nowrap;
}
.footer-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4);
}
.footer-box p {
  margin: 0;
}
.footer a {
  color: var(--gray-500);
  transition: color var(--duration-fast);
}
.footer a:hover { color: var(--primary); }

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}
.beian-link img {
  height: 14px;
  width: auto;
}

/* ── 8. Back to Top ──────────────────────────────────────── */
#get-top {
  width: 42px; height: 42px;
  background: var(--surface);
  color: var(--primary);
  position: fixed;
  right: 20px; bottom: 30px;
  line-height: 42px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  display: none;
  z-index: 100;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-150);
  transition: all var(--duration-normal) var(--ease-out);
}
#get-top:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
#get-top i {
  margin: 0;
  font-size: 16px;
}

/* ── 9. Responsive ───────────────────────────────────────── */

/* Tablet & Up */
@media (min-width: 768px) {
  .sousuo {
    padding: var(--sp-4) 0 var(--sp-6);
    margin-top: 0;
  }
  .search-clear { right: 100px; }
}

/* Desktop */
@media (min-width: 992px) {
  :root {
    --header-h: 60px;
  }

  .search { max-width: 780px; }
  .search-engine { max-width: 780px; }

  .search-hot-text {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    left: 0; right: 0;
  }

  .dh {
    padding: 0 var(--sp-3);
    margin-bottom: var(--sp-5);
  }

  .content-box {
    padding: 0 var(--sp-5);
    padding-top: calc(var(--header-h) + var(--sp-4));
  }

  #content .content-box {
    padding-top: calc(var(--header-h) + var(--sp-2));
  }

  .main-index {
    padding-top: var(--sp-4);
  }
}

/* Small mobile */
@media (max-width: 767px) {
  :root {
    --header-h: 52px;
  }

  header .logo span {
    font-size: var(--text-md);
  }
  header .logo img {
    width: 28px; height: 28px;
  }

  .sousuo {
    padding: var(--sp-3) 0 var(--sp-4);
  }

  .search-box { height: 46px; }
  .search-input {
    height: 46px;
    line-height: 46px;
    font-size: var(--text-base);
    padding-left: 44px;
  }
  .search-icon {
    width: 34px; height: 34px;
    left: 5px; top: 6px;
  }
  .search-btn {
    height: 46px;
    width: 72px;
    font-size: var(--text-sm);
  }

  .dh { padding: 0 var(--sp-2); margin-bottom: var(--sp-4); }
  .dh .col-xs-4 { padding: 0 2px; }

  div.dh > .row {
    padding: var(--sp-4) var(--sp-3) var(--sp-3);
    border-radius: var(--radius-md);
  }

  .dhname {
    font-size: var(--text-base);
    margin-bottom: var(--sp-2);
    padding-bottom: var(--sp-2);
  }

  .dh a {
    height: 38px;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
  }

  .footer {
    padding: var(--sp-3) 0 var(--sp-2);
    font-size: var(--text-xs);
  }
  .footer #hitokoto {
    white-space: normal;
    font-size: 11px;
  }

  #content .content-box {
    padding-top: calc(var(--header-h) + var(--sp-2));
  }

  #get-top {
    width: 36px; height: 36px;
    line-height: 36px;
    right: 12px; bottom: 20px;
    font-size: 16px;
  }
}

/* Extra small */
@media (max-width: 480px) {
  .dh a {
    font-size: 11px;
    height: 36px;
  }
  header .logo span {
    font-size: var(--text-sm);
  }
}

/* ── 10. Utility Classes ─────────────────────────────────── */
.mb-2, .my-2 { margin-bottom: .5rem !important; }
.mb-3, .my-3 { margin-bottom: 1rem !important; }
.text-center { text-align: center; }
.bg-white { background-color: var(--surface); }
.flex { display: flex; }

/* ── 11. Scroll & Performance ────────────────────────────── */
.search-box, .dh a, #get-top, header, .engine-switch-bar {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ── 12. Selection & Scrollbar ───────────────────────────── */
::selection {
  background: var(--primary-100);
  color: var(--primary-dark);
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ── 13. Page Load Animation ─────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-index .dh {
  animation: fadeInUp 0.5s var(--ease-out) forwards;
}
/* 动画结束后 JS 添加 .animated 类清除 transform，防止层叠上下文遮挡搜索弹窗 */
.main-index.animated .dh {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.main-index .dh:nth-child(1)  { animation-delay: 0.05s; }
.main-index .dh:nth-child(2)  { animation-delay: 0.10s; }
.main-index .dh:nth-child(3)  { animation-delay: 0.15s; }
.main-index .dh:nth-child(4)  { animation-delay: 0.20s; }
.main-index .dh:nth-child(5)  { animation-delay: 0.25s; }
.main-index .dh:nth-child(6)  { animation-delay: 0.30s; }
.main-index .dh:nth-child(7)  { animation-delay: 0.35s; }
.main-index .dh:nth-child(8)  { animation-delay: 0.40s; }
.main-index .dh:nth-child(9)  { animation-delay: 0.45s; }
.main-index .dh:nth-child(10) { animation-delay: 0.50s; }

/* 搜索区域仅使用 opacity 动画，避免 transform 创建包含块遮挡弹窗 */
@keyframes fadeInOpacity {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sousuo {
  animation: fadeInOpacity 0.4s var(--ease-out) both;
}
