/* ============ Landing 首页 ============ */
#view-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 40px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(199,156,110,0.08) 0%, transparent 60%),
    var(--bg-primary);
}

.landing-hero {
  text-align: center;
  max-width: 900px;
  padding: 40px 20px;
  width: 100%;
}

.landing-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #f0d9b5, var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease infinite;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.landing-hero .subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* ============ Feature 卡片 ============ */
.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(199,156,110,0.15);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============ 行动按钮 ============ */
.landing-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.landing-actions .btn-primary {
  padding: 14px 40px;
  font-size: 16px;
  border-radius: var(--radius);
}

.landing-actions .btn-secondary {
  padding: 14px 40px;
  font-size: 16px;
  border-radius: var(--radius);
}

.landing-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ 公告滚动条 ============ */
.announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(199,156,110,0.15) 0%, rgba(199,156,110,0.06) 50%, rgba(199,156,110,0.15) 100%);
  border-bottom: 1px solid rgba(199,156,110,0.25);
  padding: 8px 20px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.announcement-icon {
  font-size: 18px;
  flex-shrink: 0;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.announcement-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 24px;
  line-height: 24px;
}

.announcement-text {
  display: inline-block;
  white-space: nowrap;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  animation: scroll-left 18s linear infinite;
}

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

/* 多条公告时暂停动画 */
.announcement-text.paused {
  animation-play-state: paused;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .landing-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .landing-actions {
    flex-direction: column;
    align-items: center;
  }

  .landing-actions .btn-primary,
  .landing-actions .btn-secondary {
    width: 100%;
    max-width: 300px;
  }
}


/* 聊天页面：公告条让出侧边栏位置 */
body.chat-view .announcement-bar {
  left: var(--sidebar-width, 280px);
  width: auto;
}

@media (max-width: 768px) {
  body.chat-view .announcement-bar {
    left: 0;
    width: 100%;
  }
}


/* 聊天页面：侧边栏顶到屏幕最顶部，不受公告条影响 */
body.chat-view .chat-sidebar {
    top: 0;
}


/* 聊天页面：view自身不需要padding-top，由chat-main内部处理 */
body.chat-view #view-chat {
    padding-top: 0;
}


/* 聊天页面：主内容区顶部留出公告条空间 */
body.chat-view .chat-main {
    padding-top: var(--announcement-height, 40px);
}


/* 聊天页面：底部留出footer备案条空间 */
body.chat-view .chat-layout {
    height: calc(100vh - var(--footer-height, 50px));
}

body.chat-view .chat-sidebar {
    height: calc(100vh - var(--footer-height, 50px));
}
