/**
 * Hify Widget CSS 变量
 * 定义设计令牌，支持主题定制
 */

:root {
  /* 品牌 */
  --hify-brand-logo: none;
  --hify-brand-name: '在线客服';

  /* 颜色 - Primary */
  --hify-primary: #1890ff;
  --hify-primary-hover: #40a9ff;
  --hify-primary-active: #096dd9;
  --hify-primary-light: #e6f7ff;

  /* 颜色 - Text */
  --hify-text-primary: #262626;
  --hify-text-secondary: #595959;
  --hify-text-tertiary: #8c8c8c;
  --hify-text-disabled: #bfbfbf;
  --hify-text-inverse: #ffffff;

  /* 颜色 - Background */
  --hify-bg-primary: #ffffff;
  --hify-bg-secondary: #f5f5f5;
  --hify-bg-tertiary: #fafafa;
  --hify-bg-hover: #f0f0f0;

  /* 颜色 - Border */
  --hify-border-primary: #d9d9d9;
  --hify-border-secondary: #f0f0f0;
  --hify-border-focus: #1890ff;

  /* 颜色 - Status */
  --hify-success: #52c41a;
  --hify-warning: #faad14;
  --hify-error: #ff4d4f;
  --hify-error-bg: #fff2f0;

  /* 阴影 */
  --hify-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --hify-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --hify-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* 尺寸 */
  --hify-widget-width: 380px;
  --hify-widget-height: 600px;
  --hify-widget-width-mobile: 100vw;
  --hify-widget-height-mobile: 100vh;
  --hify-trigger-size: 56px;
  --hify-header-height: 56px;
  --hify-input-height: 64px;

  /* 间距 */
  --hify-spacing-xs: 4px;
  --hify-spacing-sm: 8px;
  --hify-spacing-md: 12px;
  --hify-spacing-lg: 16px;
  --hify-spacing-xl: 24px;

  /* 圆角 */
  --hify-radius-sm: 4px;
  --hify-radius-md: 8px;
  --hify-radius-lg: 12px;
  --hify-radius-xl: 16px;
  --hify-radius-full: 9999px;

  /* 字体 */
  --hify-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --hify-font-size-xs: 12px;
  --hify-font-size-sm: 13px;
  --hify-font-size-md: 14px;
  --hify-font-size-lg: 16px;
  --hify-font-size-xl: 18px;

  /* 行高 */
  --hify-line-height-sm: 1.3;
  --hify-line-height-md: 1.5;
  --hify-line-height-lg: 1.7;

  /* 字重 */
  --hify-font-weight-normal: 400;
  --hify-font-weight-medium: 500;
  --hify-font-weight-bold: 600;

  /* 动画 */
  --hify-transition-fast: 150ms ease;
  --hify-transition-normal: 250ms ease;
  --hify-transition-slow: 350ms ease;

  /* ===== Showcase 极简风格令牌（参考 bridge.surf，不影响聊天浮窗业务令牌） ===== */
  --hify-showcase-bg: #ffffff;            /* 主背景纯白 */
  --hify-showcase-bg-muted: #f7f8fa;      /* 浅灰交替底 */
  --hify-showcase-surface: #ffffff;       /* 卡片底 */
  --hify-showcase-border: #ececef;        /* 极淡描边 */
  --hify-showcase-ink: #0b0c0e;           /* 主标题近黑 */
  --hify-showcase-ink-muted: #5b6470;     /* 正文灰 */
  --hify-showcase-ink-subtle: #8a929c;    /* 辅助灰 */
  --hify-showcase-radius: 20px;           /* 大圆角 */
  --hify-showcase-radius-sm: 14px;        /* 中圆角 */
  --hify-showcase-shadow: 0 1px 2px rgba(15, 17, 21, 0.04), 0 8px 24px rgba(15, 17, 21, 0.06);
  --hify-showcase-shadow-hover: 0 1px 2px rgba(15, 17, 21, 0.05), 0 16px 40px rgba(15, 17, 21, 0.1);
  --hify-showcase-max: 1120px;            /* 内容最大宽度 */
}

/**
 * Hify Showcase 展示页面样式
 * 极简风格（参考 bridge.surf）：纯白画布、大量留白、单一品牌色、聊天界面为视觉中心
 * BEM 命名: .hify-showcase__*
 */

/* ===== 根容器 ===== */
.hify-showcase {
  font-family: var(--hify-font-family);
  color: var(--hify-showcase-ink);
  background: var(--hify-showcase-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 动画基类 ===== */
.hify-showcase__animated-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.hify-showcase__animated-item--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 导航栏 ===== */
.hify-showcase__nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--hify-transition-normal), box-shadow var(--hify-transition-normal);
}
.hify-showcase__nav--scrolled {
  border-bottom-color: var(--hify-showcase-border);
}
.hify-showcase__nav-inner {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hify-showcase__nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-showcase-ink);
  text-decoration: none;
  letter-spacing: -0.2px;
}
.hify-showcase__nav-logo svg {
  color: var(--hify-primary);
}
.hify-showcase__nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hify-showcase__nav-links {
  display: flex;
  gap: 28px;
}
.hify-showcase__nav-link {
  font-size: var(--hify-font-size-md);
  color: var(--hify-showcase-ink-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--hify-transition-fast);
  padding: 4px 0;
}
.hify-showcase__nav-link:hover {
  color: var(--hify-showcase-ink);
}
.hify-showcase__nav-link--active {
  color: var(--hify-primary);
}
.hify-showcase__nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--hify-radius-full);
  background: var(--hify-primary);
  color: #fff;
  font-size: var(--hify-font-size-md);
  font-weight: var(--hify-font-weight-medium);
  border: none;
  cursor: pointer;
  transition: background var(--hify-transition-fast), transform var(--hify-transition-fast);
}
.hify-showcase__nav-cta:hover {
  background: var(--hify-primary-hover);
  transform: translateY(-1px);
}

/* ===== Section 通用 ===== */
.hify-showcase__section-header {
  text-align: center;
  margin-bottom: 56px;
}
.hify-showcase__section-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--hify-showcase-ink);
  margin-bottom: 14px;
  letter-spacing: -0.8px;
  line-height: 1.15;
}
.hify-showcase__section-subtitle {
  font-size: var(--hify-font-size-lg);
  color: var(--hify-showcase-ink-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: var(--hify-line-height-md);
}

/* ===== Hero ===== */
.hify-showcase__hero {
  position: relative;
  background: var(--hify-showcase-bg);
  padding: 160px 24px 100px;
  overflow: hidden;
}
.hify-showcase__hero-inner {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hify-showcase__hero-content {
  max-width: 560px;
}
.hify-showcase__hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--hify-radius-full);
  background: var(--hify-primary-light);
  color: var(--hify-primary);
  font-size: var(--hify-font-size-sm);
  font-weight: var(--hify-font-weight-medium);
  margin-bottom: 28px;
}
.hify-showcase__hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hify-primary);
}
.hify-showcase__hero-title {
  font-size: 56px;
  font-weight: 700;
  color: var(--hify-showcase-ink);
  line-height: 1.1;
  margin-bottom: 22px;
  letter-spacing: -1.4px;
}
.hify-showcase__hero-title-accent {
  color: var(--hify-primary);
}
.hify-showcase__hero-subtitle {
  font-size: 18px;
  color: var(--hify-showcase-ink-muted);
  line-height: var(--hify-line-height-lg);
  margin-bottom: 36px;
}
.hify-showcase__hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
}
.hify-showcase__hero-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  border-radius: var(--hify-radius-full);
  font-size: var(--hify-font-size-lg);
  font-weight: var(--hify-font-weight-medium);
  cursor: pointer;
  transition: all var(--hify-transition-normal);
}
.hify-showcase__hero-btn--primary {
  background: var(--hify-primary);
  color: #fff;
  border: 1px solid var(--hify-primary);
}
.hify-showcase__hero-btn--primary:hover {
  background: var(--hify-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 144, 255, 0.25);
}
.hify-showcase__hero-btn--secondary {
  background: var(--hify-showcase-surface);
  color: var(--hify-showcase-ink);
  border: 1px solid var(--hify-showcase-border);
}
.hify-showcase__hero-btn--secondary:hover {
  background: var(--hify-showcase-bg-muted);
  transform: translateY(-2px);
}
.hify-showcase__hero-stats {
  display: flex;
  gap: 40px;
}
.hify-showcase__hero-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--hify-showcase-ink);
  letter-spacing: -0.5px;
}
.hify-showcase__hero-stat-label {
  font-size: var(--hify-font-size-sm);
  color: var(--hify-showcase-ink-subtle);
  margin-top: 4px;
}

/* Hero 聊天预览卡（视觉中心） */
.hify-showcase__hero-preview {
  position: relative;
}
.hify-showcase__hero-preview-chat {
  border-radius: var(--hify-showcase-radius);
  border: 1px solid var(--hify-showcase-border);
  overflow: hidden;
  background: var(--hify-showcase-surface);
  box-shadow: var(--hify-showcase-shadow);
}
.hify-showcase__hero-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hify-showcase-border);
  font-size: var(--hify-font-size-md);
  font-weight: var(--hify-font-weight-medium);
  color: var(--hify-showcase-ink);
}
.hify-showcase__hero-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hify-success);
}
.hify-showcase__hero-preview-status {
  margin-left: auto;
  font-size: var(--hify-font-size-xs);
  color: var(--hify-showcase-ink-subtle);
  font-weight: var(--hify-font-weight-normal);
}
.hify-showcase__hero-preview-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}
.hify-showcase__hero-preview-msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.hify-showcase__hero-preview-msg--user {
  flex-direction: row-reverse;
}
.hify-showcase__hero-preview-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hify-primary-light);
  color: var(--hify-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hify-showcase__hero-preview-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: var(--hify-font-size-sm);
  line-height: var(--hify-line-height-md);
  max-width: 78%;
}
.hify-showcase__hero-preview-msg--assistant .hify-showcase__hero-preview-bubble {
  background: var(--hify-showcase-bg-muted);
  color: var(--hify-showcase-ink);
  border-bottom-left-radius: 4px;
}
.hify-showcase__hero-preview-msg--user .hify-showcase__hero-preview-bubble {
  background: var(--hify-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.hify-showcase__hero-preview-typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--hify-showcase-bg-muted);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.hify-showcase__hero-preview-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hify-showcase-ink-subtle);
  animation: hify-typing 1.2s ease-in-out infinite;
}
.hify-showcase__hero-preview-typing span:nth-child(2) { animation-delay: 0.2s; }
.hify-showcase__hero-preview-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes hify-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ===== 工作原理 How it works ===== */
.hify-showcase__how {
  padding: 100px 24px;
  background: var(--hify-showcase-bg-muted);
}
.hify-showcase__how-grid {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.hify-showcase__how-card {
  position: relative;
  background: var(--hify-showcase-surface);
  border: 1px solid var(--hify-showcase-border);
  border-radius: var(--hify-showcase-radius);
  padding: 36px 28px;
  box-shadow: var(--hify-showcase-shadow);
  transition: box-shadow var(--hify-transition-normal), transform var(--hify-transition-normal);
}
.hify-showcase__how-card:hover {
  box-shadow: var(--hify-showcase-shadow-hover);
  transform: translateY(-4px);
}
/* 卡片间流程连接箭头 */
.hify-showcase__how-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -18px;
  width: 12px;
  height: 12px;
  border-top: 1.5px solid var(--hify-showcase-ink-subtle);
  border-right: 1.5px solid var(--hify-showcase-ink-subtle);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.5;
}
.hify-showcase__how-no {
  display: inline-block;
  font-size: var(--hify-font-size-sm);
  font-weight: 700;
  color: var(--hify-primary);
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.hify-showcase__how-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--hify-showcase-radius-sm);
  background: var(--hify-primary-light);
  color: var(--hify-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.hify-showcase__how-icon svg {
  width: 24px;
  height: 24px;
}
.hify-showcase__how-title {
  font-size: var(--hify-font-size-xl);
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-showcase-ink);
  margin-bottom: 10px;
}
.hify-showcase__how-desc {
  font-size: var(--hify-font-size-md);
  color: var(--hify-showcase-ink-muted);
  line-height: var(--hify-line-height-lg);
}

/* ===== Features ===== */
.hify-showcase__features {
  padding: 100px 24px;
  background: var(--hify-showcase-bg);
}
.hify-showcase__features-grid {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hify-showcase__feature-card {
  background: var(--hify-showcase-surface);
  border: 1px solid var(--hify-showcase-border);
  border-radius: var(--hify-showcase-radius);
  padding: 32px 26px;
  transition: box-shadow var(--hify-transition-normal), transform var(--hify-transition-normal), border-color var(--hify-transition-normal);
}
.hify-showcase__feature-card:hover {
  border-color: rgba(24, 144, 255, 0.4);
  box-shadow: var(--hify-showcase-shadow-hover);
  transform: translateY(-4px);
}
.hify-showcase__feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--hify-showcase-radius-sm);
  background: var(--hify-showcase-surface);
  border: 1px solid var(--hify-showcase-border);
  color: var(--hify-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.hify-showcase__feature-icon svg {
  width: 22px;
  height: 22px;
}
.hify-showcase__feature-title {
  font-size: var(--hify-font-size-xl);
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-showcase-ink);
  margin-bottom: 10px;
}
.hify-showcase__feature-desc {
  font-size: var(--hify-font-size-md);
  color: var(--hify-showcase-ink-muted);
  line-height: var(--hify-line-height-lg);
}

/* ===== Tech Stack ===== */
.hify-showcase__tech {
  padding: 100px 24px;
  background: var(--hify-showcase-bg-muted);
}
.hify-showcase__tech-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hify-showcase__tech-group {
  background: var(--hify-showcase-surface);
  border-radius: var(--hify-showcase-radius);
  padding: 30px 26px;
  border: 1px solid var(--hify-showcase-border);
}
.hify-showcase__tech-group-title {
  font-size: var(--hify-font-size-lg);
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-showcase-ink);
  margin-bottom: 18px;
}
.hify-showcase__tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hify-showcase__tech-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--hify-radius-full);
  font-size: var(--hify-font-size-sm);
  background: var(--hify-showcase-surface);
  color: var(--hify-showcase-ink-muted);
  border: 1px solid var(--hify-showcase-border);
  transition: color var(--hify-transition-fast), border-color var(--hify-transition-fast);
}
.hify-showcase__tech-tag:hover {
  color: var(--hify-primary);
  border-color: rgba(24, 144, 255, 0.4);
}
.hify-showcase__tech-highlight {
  max-width: 1000px;
  margin: 36px auto 0;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hify-showcase__tech-highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hify-showcase-ink-muted);
  font-size: var(--hify-font-size-md);
}
.hify-showcase__tech-highlight-item svg {
  color: var(--hify-primary);
}

/* ===== Demo ===== */
.hify-showcase__demo {
  padding: 100px 24px;
  background: var(--hify-showcase-bg);
}
.hify-showcase__demo-wrapper {
  max-width: 720px;
  margin: 0 auto;
}
.hify-showcase__demo-card {
  background: var(--hify-showcase-surface);
  border: 1px solid var(--hify-showcase-border);
  border-radius: var(--hify-showcase-radius);
  padding: 64px 40px;
  text-align: center;
  box-shadow: var(--hify-showcase-shadow);
}
.hify-showcase__demo-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--hify-showcase-ink);
  margin-bottom: 14px;
  letter-spacing: -0.6px;
}
.hify-showcase__demo-desc {
  font-size: var(--hify-font-size-lg);
  color: var(--hify-showcase-ink-muted);
  margin-bottom: 36px;
  line-height: var(--hify-line-height-md);
}
.hify-showcase__demo-btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 40px;
  border-radius: var(--hify-radius-full);
  font-size: var(--hify-font-size-lg);
  font-weight: var(--hify-font-weight-medium);
  cursor: pointer;
  border: none;
  background: var(--hify-primary);
  color: #fff;
  transition: all var(--hify-transition-normal);
}
.hify-showcase__demo-btn:hover {
  background: var(--hify-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 144, 255, 0.25);
}
.hify-showcase__demo-hint-text {
  font-size: var(--hify-font-size-sm);
  color: var(--hify-showcase-ink-subtle);
  margin-top: 20px;
}

/* ===== Metrics ===== */
.hify-showcase__metrics {
  padding: 100px 24px;
  background: var(--hify-showcase-bg-muted);
}
.hify-showcase__metrics-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.hify-showcase__metric-card {
  text-align: center;
  padding: 36px 20px;
  background: var(--hify-showcase-surface);
  border-radius: var(--hify-showcase-radius);
  border: 1px solid var(--hify-showcase-border);
  box-shadow: var(--hify-showcase-shadow);
}
.hify-showcase__metric-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--hify-showcase-ink);
  margin-bottom: 10px;
  letter-spacing: -1px;
  line-height: 1;
}
.hify-showcase__metric-label {
  font-size: var(--hify-font-size-md);
  color: var(--hify-showcase-ink);
  font-weight: var(--hify-font-weight-medium);
  margin-bottom: 4px;
}
.hify-showcase__metric-desc {
  font-size: var(--hify-font-size-sm);
  color: var(--hify-showcase-ink-subtle);
}

/* ===== Footer ===== */
.hify-showcase__footer {
  background: #0b0c0e;
  padding: 64px 24px 28px;
  color: rgba(255, 255, 255, 0.7);
}
.hify-showcase__footer-inner {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.hify-showcase__footer-brand {
  max-width: 320px;
}
.hify-showcase__footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--hify-font-size-xl);
  font-weight: var(--hify-font-weight-bold);
  color: #fff;
  margin-bottom: 14px;
}
.hify-showcase__footer-logo svg {
  color: var(--hify-primary);
}
.hify-showcase__footer-desc {
  font-size: var(--hify-font-size-md);
  color: rgba(255, 255, 255, 0.5);
  line-height: var(--hify-line-height-md);
}
.hify-showcase__footer-links {
  display: flex;
  gap: 72px;
}
.hify-showcase__footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hify-showcase__footer-col-title {
  font-size: var(--hify-font-size-md);
  font-weight: var(--hify-font-weight-medium);
  color: #fff;
  margin-bottom: 6px;
}
.hify-showcase__footer-col a {
  font-size: var(--hify-font-size-sm);
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--hify-transition-fast);
}
.hify-showcase__footer-col a:hover {
  color: var(--hify-primary);
}
.hify-showcase__footer-bottom {
  max-width: var(--hify-showcase-max);
  margin: 0 auto;
  padding-top: 24px;
  text-align: center;
  font-size: var(--hify-font-size-sm);
  color: rgba(255, 255, 255, 0.4);
}
.hify-showcase__footer-icp {
  margin-top: 6px;
}
.hify-showcase__footer-icp a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}
.hify-showcase__footer-icp a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== 响应式 - 平板 ===== */
@media (max-width: 960px) {
  .hify-showcase__hero {
    padding: 130px 24px 80px;
  }
  .hify-showcase__hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hify-showcase__hero-content {
    max-width: none;
  }
  .hify-showcase__hero-title {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  .hify-showcase__nav-inner {
    height: 56px;
    padding: 0 16px;
  }
  .hify-showcase__nav-right {
    gap: 16px;
  }
  .hify-showcase__nav-links {
    gap: 16px;
  }
  .hify-showcase__nav-link {
    font-size: var(--hify-font-size-sm);
  }
  .hify-showcase__nav-cta {
    padding: 8px 14px;
    font-size: var(--hify-font-size-sm);
  }
  .hify-showcase__hero-title {
    font-size: 36px;
  }
  .hify-showcase__hero-subtitle {
    font-size: var(--hify-font-size-lg);
  }
  .hify-showcase__hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hify-showcase__hero-btn {
    justify-content: center;
  }
  .hify-showcase__hero-stats {
    gap: 28px;
  }
  .hify-showcase__hero-stat-value {
    font-size: 24px;
  }
  .hify-showcase__section-title {
    font-size: 30px;
  }
  .hify-showcase__how-grid,
  .hify-showcase__features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hify-showcase__how-card:not(:last-child)::after {
    display: none;
  }
  .hify-showcase__tech-content {
    grid-template-columns: 1fr;
  }
  .hify-showcase__metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hify-showcase__footer-inner {
    flex-direction: column;
    gap: 32px;
  }
  .hify-showcase__footer-links {
    gap: 48px;
  }
}

/* ===== 响应式 - 手机 ===== */
@media (max-width: 480px) {
  .hify-showcase__nav-links {
    display: none;
  }
  .hify-showcase__hero {
    padding: 110px 16px 64px;
  }
  .hify-showcase__hero-title {
    font-size: 30px;
  }
  .hify-showcase__hero-stats {
    flex-direction: column;
    gap: 18px;
  }
  .hify-showcase__how,
  .hify-showcase__features,
  .hify-showcase__tech,
  .hify-showcase__demo,
  .hify-showcase__metrics {
    padding: 64px 16px;
  }
  .hify-showcase__demo-card {
    padding: 44px 22px;
  }
  .hify-showcase__demo-title {
    font-size: 26px;
  }
  .hify-showcase__how-grid,
  .hify-showcase__features-grid,
  .hify-showcase__metrics-grid {
    grid-template-columns: 1fr;
  }
  .hify-showcase__footer-links {
    flex-direction: column;
    gap: 28px;
  }
}

/* Dark Theme Variables */

[data-theme="dark"] {
  /* 颜色 - Primary */
  --hify-primary: #177ddc;
  --hify-primary-hover: #3c9ae8;
  --hify-primary-active: #1557ad;
  --hify-primary-light: #1d2935;
  
  /* 颜色 - Text */
  --hify-text-primary: rgba(255, 255, 255, 0.85);
  --hify-text-secondary: rgba(255, 255, 255, 0.65);
  --hify-text-tertiary: rgba(255, 255, 255, 0.45);
  --hify-text-disabled: rgba(255, 255, 255, 0.25);
  --hify-text-inverse: rgba(0, 0, 0, 0.85);
  
  /* 颜色 - Background */
  --hify-bg-primary: #141414;
  --hify-bg-secondary: #1f1f1f;
  --hify-bg-tertiary: #262626;
  --hify-bg-hover: #2a2a2a;
  
  /* 颜色 - Border */
  --hify-border-primary: #434343;
  --hify-border-secondary: #303030;
  --hify-border-focus: #177ddc;
  
  /* 颜色 - Status */
  --hify-success: #49aa19;
  --hify-warning: #d89614;
  --hify-error: #d32029;
  --hify-error-bg: #2b1d1d;
  
  /* 阴影 */
  --hify-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --hify-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --hify-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/**
 * Hify Widget 主样式
 * 极简风格（参考 bridge.surf）：白底留白、单一品牌色、柔和阴影、大圆角、聊天为视觉中心
 * BEM 命名规范
 */

/* ============ 主容器 ============ */

.hify-widget {
  position: fixed;
  z-index: 2147483647;
  font-family: var(--hify-font-family);
  font-size: var(--hify-font-size-md);
  line-height: var(--hify-line-height-md);
  color: var(--hify-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 位置 - 右下角 */
.hify-widget--bottom-right {
  right: var(--hify-spacing-lg);
  bottom: var(--hify-spacing-lg);
}

/* 位置 - 左下角 */
.hify-widget--bottom-left {
  left: var(--hify-spacing-lg);
  bottom: var(--hify-spacing-lg);
}

/* 内嵌模式 - 展示页面用 */
.hify-widget--embedded {
  position: relative;
  z-index: auto;
  width: 100%;
  height: 100%;
  right: auto;
  bottom: auto;
  left: auto;
  top: auto;
}
.hify-widget--embedded .hify-widget__trigger {
  display: none;
}
.hify-widget--embedded .hify-widget__window {
  position: relative;
  bottom: auto;
  right: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.hify-widget--embedded .hify-widget__window--open {
  transform: none;
}

/* ============ 触发按钮 ============ */

.hify-widget__trigger {
  position: relative;
  width: var(--hify-trigger-size);
  height: var(--hify-trigger-size);
  border-radius: var(--hify-radius-full);
  background: var(--hify-primary);
  color: var(--hify-text-inverse);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(24, 144, 255, 0.32);
  transition: all var(--hify-transition-normal);
  outline: none;
}

.hify-widget__trigger:hover {
  background: var(--hify-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 144, 255, 0.4);
}

.hify-widget__trigger:active {
  background: var(--hify-primary-active);
  transform: translateY(0) scale(0.96);
}

.hify-widget__trigger:focus-visible {
  box-shadow: 0 0 0 3px var(--hify-primary-light), 0 4px 16px rgba(24, 144, 255, 0.32);
}

.hify-widget__trigger--hidden {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

/* ============ 聊天窗口 ============ */

.hify-widget__window {
  position: absolute;
  bottom: calc(var(--hify-trigger-size) + var(--hify-spacing-md));
  right: 0;
  width: var(--hify-widget-width);
  height: var(--hify-widget-height);
  max-height: calc(100vh - 100px);
  background: var(--hify-bg-primary);
  border: 1px solid var(--hify-border-secondary);
  border-radius: var(--hify-radius-xl);
  box-shadow: 0 1px 2px rgba(15, 17, 21, 0.04), 0 16px 48px rgba(15, 17, 21, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  pointer-events: none;
  transition: all var(--hify-transition-normal);
}

.hify-widget--bottom-left .hify-widget__window {
  right: auto;
  left: 0;
}

.hify-widget__window--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* ============ 头部 ============ */

.hify-widget__header {
  position: relative;
  height: var(--hify-header-height);
  padding: 0 var(--hify-spacing-lg);
  background: var(--hify-bg-primary);
  color: var(--hify-text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--hify-border-secondary);
}

.hify-widget__header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hify-widget__header-title {
  font-size: var(--hify-font-size-md);
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-text-primary);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hify-widget__header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--hify-font-size-xs);
  color: var(--hify-text-tertiary);
  line-height: 1;
}

.hify-widget__header-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hify-success);
  box-shadow: 0 0 0 0 rgba(82, 196, 26, 0.5);
  animation: hify-widget-pulse 2s ease-in-out infinite;
}

@keyframes hify-widget-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(82, 196, 26, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(82, 196, 26, 0); }
}

.hify-widget__header-actions {
  display: flex;
  gap: var(--hify-spacing-sm);
}

.hify-widget__header-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--hify-radius-md);
  background: transparent;
  color: var(--hify-text-secondary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--hify-transition-fast), color var(--hify-transition-fast);
}

.hify-widget__header-btn:hover {
  background: var(--hify-bg-hover);
  color: var(--hify-text-primary);
}

/* ============ 消息列表 ============ */

.hify-widget__message-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--hify-spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--hify-spacing-lg);
  /* background: var(--hify-bg-secondary); */
}

/* 自定义滚动条 */
.hify-widget__message-list::-webkit-scrollbar {
  width: 6px;
}

.hify-widget__message-list::-webkit-scrollbar-track {
  background: transparent;
}

.hify-widget__message-list::-webkit-scrollbar-thumb {
  background: var(--hify-border-primary);
  border-radius: 3px;
}

.hify-widget__message-list::-webkit-scrollbar-thumb:hover {
  background: var(--hify-text-tertiary);
}

/* ============ 快捷问题 ============ */

.hify-widget__quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hify-spacing-xs);
  padding: var(--hify-spacing-sm) 0;
}

.hify-widget__quick-question-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--hify-border-primary);
  border-radius: var(--hify-radius-full);
  background: var(--hify-bg-primary);
  color: var(--hify-text-secondary);
  font-size: var(--hify-font-size-sm);
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hify-widget__quick-question-btn:hover {
  border-color: var(--hify-primary-color, #1890ff);
  color: var(--hify-primary-color, #1890ff);
  background: var(--hify-bg-primary);
}

.hify-widget__quick-question-btn:active {
  transform: scale(0.96);
}

/* ============ 单条消息 ============ */

.hify-widget__message {
  display: flex;
  gap: var(--hify-spacing-sm);
  max-width: 85%;
}

.hify-widget__message--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.hify-widget__message--assistant {
  align-self: flex-start;
}

/* 头像 */
.hify-widget__message-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--hify-radius-full);
  background: var(--hify-primary-light);
  color: var(--hify-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hify-widget__message--user .hify-widget__message-avatar {
  background: var(--hify-bg-tertiary);
  color: var(--hify-text-secondary);
}

/* 内容区域 */
.hify-widget__message-content {
  display: flex;
  flex-direction: column;
  gap: var(--hify-spacing-xs);
}

.hify-widget__message--user .hify-widget__message-content {
  align-items: flex-end;
}

/* 气泡 */
.hify-widget__message-bubble {
  padding: var(--hify-spacing-sm) var(--hify-spacing-md);
  border-radius: var(--hify-radius-lg);
  word-wrap: break-word;
  font-size: var(--hify-font-size-md);
  line-height: var(--hify-line-height-md);
}

.hify-widget__message--user .hify-widget__message-bubble {
  background: var(--hify-primary);
  color: var(--hify-text-inverse);
  border-bottom-right-radius: var(--hify-radius-sm);
}

.hify-widget__message--assistant .hify-widget__message-bubble {
  background: var(--hify-bg-primary);
  color: var(--hify-text-primary);
  border: 1px solid var(--hify-border-secondary);
  border-bottom-left-radius: var(--hify-radius-sm);
}

.hify-widget__message--error .hify-widget__message-bubble {
  background: var(--hify-error-bg);
  color: var(--hify-error);
  border-color: var(--hify-error);
}

/* 流式消息闪烁光标 */
.hify-widget__message--streaming .hify-widget__message-bubble::after {
  content: '▊';
  animation: blink 1s infinite;
  margin-left: 1px;
  color: var(--hify-primary-color, #1890ff);
  font-weight: 400;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 时间戳 */
.hify-widget__message-time {
  font-size: var(--hify-font-size-xs);
  color: var(--hify-text-tertiary);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.hify-widget__message:hover .hify-widget__message-time {
  opacity: 1;
}

/* 代码块 */
.hify-code-block {
  background: var(--hify-bg-tertiary, #f5f5f5);
  border-radius: var(--hify-radius-sm, 4px);
  padding: var(--hify-spacing-sm, 8px);
  margin: var(--hify-spacing-xs, 4px) 0;
  overflow-x: auto;
  font-size: var(--hify-font-size-sm, 13px);
  line-height: 1.5;
}

[data-theme="dark"] .hify-code-block {
  background: var(--hify-bg-tertiary, #2a2a2a);
}

/* 重试按钮 */
.hify-widget__message-retry {
  display: inline-block;
  margin-top: var(--hify-spacing-xs, 4px);
  padding: 4px 12px;
  border: 1px solid var(--hify-border-primary);
  border-radius: var(--hify-radius-full);
  background: transparent;
  color: var(--hify-text-secondary);
  font-size: var(--hify-font-size-xs, 12px);
  cursor: pointer;
  transition: all 0.2s;
}

.hify-widget__message-retry:hover {
  border-color: var(--hify-primary-color, #1890ff);
  color: var(--hify-primary-color, #1890ff);
}

/* ============ 输入区域 ============ */

.hify-widget__input-area {
  padding: var(--hify-spacing-md) var(--hify-spacing-lg);
  background: var(--hify-bg-primary);
  border-top: 1px solid var(--hify-border-secondary);
  display: flex;
  gap: var(--hify-spacing-md);
  align-items: flex-end;
  flex-shrink: 0;
  position: relative;
}

.hify-widget__input-wrapper {
  flex: 1;
  position: relative;
}

.hify-widget__textarea {
  width: 100%;
  padding: var(--hify-spacing-sm) var(--hify-spacing-md);
  padding-right: 56px;
  border: 1px solid var(--hify-border-secondary);
  border-radius: var(--hify-radius-lg);
  background: var(--hify-bg-secondary);
  color: var(--hify-text-primary);
  font-family: inherit;
  font-size: var(--hify-font-size-md);
  line-height: var(--hify-line-height-md);
  resize: none;
  outline: none;
  transition: border-color var(--hify-transition-fast), background var(--hify-transition-fast), box-shadow var(--hify-transition-fast);
  min-height: 42px;
  max-height: 120px;
}

.hify-widget__textarea:hover {
  border-color: var(--hify-border-primary);
}

.hify-widget__textarea:focus {
  border-color: var(--hify-primary);
  background: var(--hify-bg-primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.hify-widget__textarea:disabled {
  background: var(--hify-bg-secondary);
  cursor: not-allowed;
}

/* 字符计数 */
.hify-widget__char-count {
  position: absolute;
  right: var(--hify-spacing-sm);
  bottom: var(--hify-spacing-sm);
  font-size: var(--hify-font-size-xs);
  color: var(--hify-text-tertiary);
  pointer-events: none;
}

.hify-widget__char-count--warning {
  color: var(--hify-warning);
}

/* 发送按钮 */
.hify-widget__send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--hify-radius-full);
  background: var(--hify-bg-secondary);
  color: var(--hify-text-disabled);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--hify-transition-fast);
  outline: none;
}

.hify-widget__send-btn:hover:not(:disabled) {
  background: var(--hify-primary-hover);
}

.hify-widget__send-btn:active:not(:disabled) {
  background: var(--hify-primary-active);
  transform: scale(0.94);
}

.hify-widget__send-btn--active {
  background: var(--hify-primary);
  color: var(--hify-text-inverse);
}

.hify-widget__send-btn--loading {
  background: var(--hify-primary);
  color: var(--hify-text-inverse);
  cursor: default;
}

.hify-widget__send-btn:disabled {
  cursor: not-allowed;
}

/* 表情按钮 */
.hify-widget__emoji-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--hify-radius-full);
  background: var(--hify-bg-secondary);
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--hify-transition-fast);
  outline: none;
}

.hify-widget__emoji-btn:hover {
  background: var(--hify-primary-hover);
}

.hify-widget__emoji-btn--active {
  background: var(--hify-primary);
}

/* 表情面板 */
.hify-widget__emoji-panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: var(--hify-spacing-lg);
  right: var(--hify-spacing-lg);
  background: var(--hify-bg-primary);
  border: 1px solid var(--hify-border-secondary);
  border-radius: var(--hify-radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: var(--hify-spacing-sm);
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.hify-widget__emoji-panel--show {
  display: grid;
}

.hify-widget__emoji-item {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: var(--hify-radius-sm);
  transition: background var(--hify-transition-fast);
  outline: none;
}

.hify-widget__emoji-item:hover {
  background: var(--hify-bg-secondary);
}

/* 加载动画 */
.hify-widget__spinner {
  animation: spin 1s linear infinite;
}

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

/* ============ Toast 提示 ============ */

.hify-widget__toast {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: var(--hify-spacing-sm) var(--hify-spacing-lg);
  background: var(--hify-text-primary);
  color: var(--hify-text-inverse);
  border-radius: var(--hify-radius-md);
  font-size: var(--hify-font-size-sm);
  opacity: 0;
  transition: all var(--hify-transition-normal);
  pointer-events: none;
  white-space: nowrap;
}

.hify-widget__toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ============ 移动端适配 ============ */

@media (max-width: 480px) {
  .hify-widget {
    right: 0;
    bottom: 0;
    left: 0;
  }

  .hify-widget--bottom-right,
  .hify-widget--bottom-left {
    right: 0;
    left: 0;
    bottom: 0;
  }

  .hify-widget__trigger {
    position: fixed;
    right: var(--hify-spacing-lg);
    bottom: var(--hify-spacing-lg);
  }

  .hify-widget--bottom-left .hify-widget__trigger {
    left: var(--hify-spacing-lg);
    right: auto;
  }

  .hify-widget__window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
  }

  .hify-widget__window--open {
    transform: none;
  }
}

/* ============ 系统消息 ============ */

.hify-widget__message--system {
  align-self: center;
  max-width: 90%;
}

.hify-widget__message--system .hify-widget__message-bubble {
  background: var(--hify-bg-tertiary, #f0f0f0);
  color: var(--hify-text-secondary);
  border: 1px solid var(--hify-border-secondary);
  border-radius: var(--hify-radius-full);
  font-size: var(--hify-font-size-sm);
  text-align: center;
  padding: var(--hify-spacing-xs) var(--hify-spacing-md);
}

/* 人工客服消息 */
.hify-widget__message--human_agent {
  align-self: flex-start;
}

.hify-widget__message--human_agent .hify-widget__message-bubble {
  background: var(--hify-bg-primary);
  color: var(--hify-text-primary);
  border: 1px solid var(--hify-border-primary);
  border-bottom-left-radius: var(--hify-radius-sm);
}

.hify-widget__message--human_agent .hify-widget__message-name {
  display: block;
  font-size: var(--hify-font-size-xs);
  color: var(--hify-text-secondary);
  margin-bottom: 2px;
  font-weight: var(--hify-font-weight-medium);
}

/* 图片消息 */
.hify-widget__message-image {
  display: block;
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--hify-radius-md);
  cursor: pointer;
  object-fit: contain;
  transition: opacity var(--hify-transition-fast);
}

.hify-widget__message-image:hover {
  opacity: 0.9;
}

/* 图片放大预览遮罩 */
.hify-widget__image-preview {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: zoom-out;
  padding: var(--hify-spacing-lg);
}

.hify-widget__image-preview-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--hify-radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ============ 知识库参考提示 ============ */

.hify-widget__retrieval-badge {
  font-size: var(--hify-font-size-xs);
  color: var(--hify-text-tertiary);
  margin-top: var(--hify-spacing-xs);
  padding-left: 4px;
}

/* ============ 满意度评价 ============ */

.hify-widget__feedback {
  padding: var(--hify-spacing-lg);
  background: var(--hify-bg-primary);
  border-top: 1px solid var(--hify-border-secondary);
  flex-shrink: 0;
}

.hify-widget__feedback-title {
  text-align: center;
  font-size: var(--hify-font-size-md);
  font-weight: var(--hify-font-weight-bold);
  color: var(--hify-text-primary);
  margin-bottom: var(--hify-spacing-md);
}

.hify-widget__feedback-stars {
  display: flex;
  justify-content: center;
  gap: var(--hify-spacing-sm);
  margin-bottom: var(--hify-spacing-md);
}

.hify-widget__feedback-star {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--hify-border-primary);
  padding: 2px;
  transition: color var(--hify-transition-fast), transform var(--hify-transition-fast);
}

.hify-widget__feedback-star:hover {
  transform: scale(1.15);
}

.hify-widget__feedback-star--active {
  color: #ffc107;
}

.hify-widget__feedback-text {
  width: 100%;
  padding: var(--hify-spacing-sm) var(--hify-spacing-md);
  border: 1px solid var(--hify-border-secondary);
  border-radius: var(--hify-radius-lg);
  background: var(--hify-bg-secondary);
  color: var(--hify-text-primary);
  font-family: inherit;
  font-size: var(--hify-font-size-sm);
  resize: none;
  outline: none;
  box-sizing: border-box;
  margin-bottom: var(--hify-spacing-md);
  transition: border-color var(--hify-transition-fast), background var(--hify-transition-fast);
}

.hify-widget__feedback-text:focus {
  border-color: var(--hify-primary);
  background: var(--hify-bg-primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.hify-widget__feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--hify-spacing-sm);
}

.hify-widget__feedback-skip {
  padding: var(--hify-spacing-sm) var(--hify-spacing-md);
  background: none;
  border: 1px solid var(--hify-border-primary);
  border-radius: var(--hify-radius-full);
  color: var(--hify-text-secondary);
  cursor: pointer;
  font-size: var(--hify-font-size-sm);
  transition: all var(--hify-transition-fast);
}

.hify-widget__feedback-skip:hover {
  background: var(--hify-bg-secondary);
  border-color: var(--hify-text-tertiary);
}

.hify-widget__feedback-submit {
  padding: var(--hify-spacing-sm) var(--hify-spacing-lg);
  background: var(--hify-primary);
  color: var(--hify-text-inverse);
  border: none;
  border-radius: var(--hify-radius-full);
  cursor: pointer;
  font-size: var(--hify-font-size-sm);
  transition: background var(--hify-transition-fast);
}

.hify-widget__feedback-submit:hover:not(:disabled) {
  background: var(--hify-primary-hover);
}

.hify-widget__feedback-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hify-widget__feedback-thanks {
  text-align: center;
  color: var(--hify-text-secondary);
  font-size: var(--hify-font-size-md);
  padding: var(--hify-spacing-lg) 0;
}

/* ============ 连接断开状态 ============ */

.hify-widget--disconnected .hify-widget__header-status-dot {
  background: var(--hify-error);
  animation: none;
}

.hify-widget--disconnected .hify-widget__header-status {
  color: var(--hify-error);
}

.hify-widget--disconnected .hify-widget__header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hify-error);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============ 隐藏类（用于无障碍） ============ */

.hify-widget__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;
}

/* ============ 打印隐藏 ============ */

@media print {
  .hify-widget {
    display: none !important;
  }
}

