/* results.css */
.results-header {
  border-bottom: none;
  padding: 10px 20px 0 30px;
  /* 顶部压缩10px，让头像完美锚定在 Top:20px */
  background-color: transparent;
  z-index: 1000;
}

.header-top {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.results-logo-container {
  width: 112px;
  flex-shrink: 0;
  margin: 0;
  /* 消除 h1 默认上下幽灵边距 */
  line-height: 1;
}

.results-logo {
  font-size: 32px;
  /* 缩小 Logo */
  margin-bottom: 0;
  margin-right: 0;
  text-decoration: none;
  font-family: "Product Sans", Arial, sans-serif;
}

.results-search-form {
  width: 100%;
  max-width: 690px;
  margin-right: 20px;
  /* 防止屏幕缩小时贴在一起 */
}

.results-topbar-actions {
  margin-left: auto;
  /* 核心：将头像自动推到桌面端屏幕最右侧 */
  display: flex;
  align-items: center;
}

.results-search-box {
  margin: 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background-color: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.results-search-box:focus-within {
  border-color: #09090b;
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.1);
}

.header-nav-wrap {
  margin-left: 112px;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-item {
  color: #5f6368;
  font-size: 14px;
  padding-bottom: 12px;
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  color: #1f1f1f;
}

.nav-item.active {
  color: #5f6368;
  border-bottom: none;
}

.cloud-dropdown {
  position: relative;
}

.cloud-dropdown summary {
  list-style: none;
}

.cloud-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4e5157;
  /* 优雅的百度式灰黑色 */
  font-size: 14px;
  padding-bottom: 12px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  user-select: none;
}

.nav-dropdown-trigger:hover {
  color: #1f1f1f;
}


.cloud-dropdown[open] .nav-dropdown-trigger {
  color: #09090b;
  font-weight: 500;
}


.cloud-caret {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 4px;
}

/* 展开时 V 形箭头平滑旋转 180 度向上 */
.cloud-dropdown[open] .cloud-caret {
  transform: translateY(1px) rotate(-135deg);
}

.cloud-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 144px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(60, 64, 67, 0.18);
  z-index: 20;
}


.cloud-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 28px; /* 居中对齐上方文字 */
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #dadce0;
  border-top: 1px solid #dadce0;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0; /* 让尖角稍微圆润柔和一点 */
}

.cloud-dropdown-item {
  display: block;
  padding: 10px 14px;
  color: #3c4043;
  font-size: 14px;
  text-decoration: none;
}

.cloud-dropdown-item:hover {
  background: #f8f9fa;
}

.cloud-dropdown-item.active {
  color: #09090b;
  font-weight: 600;
  background: #f4f4f5;
}

.results-main {
  margin-left: 142px;
  max-width: 690px;
  padding-top: 16px;
  padding-bottom: 40px;
}

.results-stats {
  color: #70757a;
  font-size: 14px;
  margin-bottom: 20px;
}

.result-item {
  margin-bottom: 28px;
}

.result-title {
  color: #09090b;
  font-size: 18px;
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.result-title:hover {
  text-decoration: none;
  color: #52525b;
}

.result-snippet {
  color: #71717a;
  font-size: 14px;
  line-height: 1.6;
}

.result-tags {
  margin-top: 6px;
}

.result-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  background: #f4f4f5;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #27272a;
}

.results-empty {
  color: #70757a;
  font-size: 14px;
}

.result-loading {
  margin-bottom: 32px;
  padding: 2px 0;
}

.loading-line {
  position: relative;
  overflow: hidden;
  background-color: #f2f2f2;
  border-radius: 4px;
}

.loading-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.6) 50%,
      rgba(255, 255, 255, 0) 100%);
  animation: shimmer 1.5s infinite;
}

.loading-line.title {
  height: 20px;
  width: 65%;
  margin-bottom: 12px;
}

.loading-line.snippet {
  height: 14px;
  width: 90%;
  margin-bottom: 8px;
}

.loading-line.tags {
  height: 12px;
  width: 30%;
}

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

  100% {
    transform: translateX(100%);
  }
}

.result-item {
  animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  .results-header {
    padding: 8px 16px 0 16px;
 
  }

  .header-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px;
  }

  .results-logo-container {
    display: none !important;
    /* 彻底隐藏移动端左侧 Logo */
  }

  .results-search-form {
    flex: 1 !important;
    min-width: 0 !important;
    /* 核心防溢出 */
    width: auto !important;
    margin-right: 12px !important;
    /* 保持与头像的间距 */
  }

  .results-topbar-actions {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    margin-left: 0 !important;
  }

  .header-nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .header-nav-wrap {
    margin-left: 0;
  }

  .cloud-dropdown-menu {
    left: 0;
    right: auto;
  }

  .results-main {
    margin-left: 14px;
    margin-right: 14px;
    padding-top: 12px;
  }

  .result-title {
    font-size: 18px;
  }
}


.breathing-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: relative;
}

.breathing-dot.green {
  background-color: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 2s infinite;
}

.breathing-dot.orange {
  background-color: #F59E0B;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse-orange 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes pulse-orange {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}


.ad-ticker-banner {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
}

.ad-ticker-icon {
  display: flex;
  align-items: center;
  color: #a1a1aa;
  margin-right: 8px;
}

.ad-ticker-wrapper {
  position: relative;
  height: 22px;
  flex: 1;
  overflow: hidden;
}

.ad-ticker-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 14px;
  color: #70757a;
  text-decoration: none;
  line-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.ad-ticker-link.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ad-ticker-link.exiting {
  opacity: 0;
  transform: translateY(-15px);
  pointer-events: none;
}

.ad-ticker-link:hover {
  text-decoration: underline;
  color: #3f3f46;
}