/* ── Top Header ── */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Logo */
.top-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  width: auto;
  min-width: 98px;
}

.top-header-logo > img {
  display: block;
  width: 97.888px;
  height: 32px;
  object-fit: contain;
}

.top-header-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6.72px;
  background: linear-gradient(225deg, #87e256 0%, #009242 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.top-header-logo-icon img {
  width: 23.75px;
  height: 23.75px;
  object-fit: contain;
  display: block;
}

.top-header-logo-text {
  height: 20px;
  width: 100px;
  flex-shrink: 0;
}

.top-header-logo-text img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Nav links — absolutely centered relative to the full header */
.top-header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 31.77px;
}

.top-header-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.15px;
  color: #101828;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.top-header-nav a:hover {
  color: #101828;
  background: rgba(16, 24, 40, 0.06);
}

/* Right actions */
.top-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.top-header-btn-login,
.top-header-btn-download {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 14px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.top-header-btn-login {
  min-width: 100px;
  padding: 12px 29px;
  border: 1px solid #ebedf4;
  background: #fff;
  color: #101828;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.top-header-btn-login:hover {
  background: #f9fafb;
  border-color: #d7dbe7;
  color: #101828;
}

.top-header-btn-download {
  gap: 10px;
  min-width: 146px;
  padding: 13.5px 28px;
  border: none;
  outline: none;
  background: linear-gradient(172deg, #b05500 12.706%, #d97a2c 87.294%);
  box-shadow: 0 4px 12px rgba(176, 85, 0, 0.35);
  color: #fff;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.top-header-btn-download:hover {
  opacity: 0.96;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(176, 85, 0, 0.32);
}

.top-header-btn-download-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-header-btn-download-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

/* PC端才显示 page-header，平板和手机隐藏（含横屏） */
@media (max-width: 1024px), (hover: none) {
  .top-header {
    display: none;
  }

  body {
    padding-top: 0;
  }
}

/* 滚动后 header 背景变实色 */
.top-header-inner.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

/* 锚点滚动偏移，防止 fixed header 遮挡（header 顶部16px + 高度64px + 余量16px） */
#how-it-works,
#use-cases,
#early-access {
  scroll-margin-top: 96px;
}

/* ── Download Dropdown ── */
.top-header-download-wrap {
  position: relative;
}

.top-header-download-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: #111418;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.top-header-download-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-header-dl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.top-header-dl-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.top-header-dl-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* el-message 容器 */
.el-message-container {
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  z-index: 9999;
  pointer-events: none;
}

/* el-message 单条消息 */
.el-message {
  min-width: 280px;
  max-width: 420px;
  margin: 0 auto 12px auto;
  background: #f4f4f5;
  color: #333;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  position: relative;
}

.el-message__icon {
  margin-right: 10px;
  font-size: 18px;
  line-height: 1;
}

.el-message__content {
  flex: 1;
  white-space: pre-wrap;
}

.el-message__close {
  background: none;
  border: none;
  font-size: 18px;
  color: #888;
  cursor: pointer;
  margin-left: 10px;
  transition: color 0.2s;
}
.el-message__close:hover {
  color: #f56c6c;
}

.el-message--success {
  background: rgb(240, 249, 235);
  border: 1px solid rgb(225, 243, 216);
  color: #67c23a;
  box-shadow: none;
}
.el-message--warning {
  background: #fdf6ec;
  color: #e6a23c;
}
.el-message--error {
  background: #fef0f0;
  color: #f56c6c;
}
.el-message--info {
  background: #f4f4f5;
  color: #909399;
}

.el-message--plain {
  background: #fff;
  border: 1px solid #ebeef5;
}

/* ── User Avatar & Dropdown ── */
.top-header-user-wrap {
  position: relative;
}

.top-header-user-avatar-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.top-header-user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.top-header-user-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #00a854 0%, #33cc77 100%);
  border-radius: 50%;
  text-transform: uppercase;
}

.top-header-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  background: #111418;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.top-header-user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-header-user-info {
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 6px;
}

.top-header-user-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 148px;
}

.top-header-user-mail {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 148px;
  margin-top: 2px;
}

.top-header-user-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-header-user-logout-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
