/* 页面初始骨架屏 —— 在 React 挂载前展示 */

#app-root-loading {
  position: fixed;
  inset: 0;
  display: flex;
  background: #fff;
  z-index: 9999;
  box-sizing: border-box;
}

#app-root-loading *,
#app-root-loading *::before,
#app-root-loading *::after {
  box-sizing: border-box;
}

/* 动画 */
@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.sk {
  background: #f0f0f0;
  border-radius: 8px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* 延迟 */
.d1 { animation-delay: 0.1s }
.d2 { animation-delay: 0.2s }
.d3 { animation-delay: 0.3s }
.d4 { animation-delay: 0.4s }
.d5 { animation-delay: 0.5s }
.d6 { animation-delay: 0.6s }

/* ── 侧边栏 ── */
.sk-side {
  width: 280px;
  height: 100%;
  border-right: 1px solid #eee;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.sk-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sk-logo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sk-logo-text {
  width: 64px;
  height: 24px;
  border-radius: 4px;
}

.sk-new {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  margin-bottom: 32px;
}

.sk-new-text {
  width: 120px;
  height: 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.sk-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sk-item-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-item-text {
  height: 16px;
  border-radius: 8px;
  flex: 1;
}

/* ── 主区域 ── */
.sk-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.sk-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* 顶栏 */
.sk-hd {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.sk-hd-model {
  width: 120px;
  height: 36px;
  border-radius: 8px;
}

.sk-hd-spacer {
  flex: 1;
}

.sk-hd-org {
  width: 120px;
  height: 36px;
  border-radius: 8px;
}

.sk-hd-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* 聊天内容区 */
.sk-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  padding: 20px 0;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden;
}

.sk-welcome {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
  padding-bottom: 32px;
}

.sk-welcome-logo {
  width: 100px;
  height: 16px;
  border-radius: 8px;
}

.sk-welcome-text {
  width: 400px;
  height: 24px;
  border-radius: 12px;
}

.sk-banners {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.sk-banner {
  flex: 1;
  height: 126px;
  border-radius: 12px;
}

.sk-line {
  height: 14px;
  border-radius: 8px;
}

/* ── 输入框 ── */
.sk-sender {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.sk-disclaimer {
  text-align: center;
  font-size: 12px;
  line-height: 22px;
  padding: 8px 0;
  color: #bbb;
}

.sk-sender-box {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 16px;
  height: 152px;
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.sk-sender-input {
  width: 100%;
  height: 52px;
  border-radius: 8px;
}

.sk-sender-left {
  display: flex;
  gap: 8px;
}

.sk-sender-right {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.sk-sender-pill {
  width: 80px;
  height: 36px;
  border-radius: 8px;
}

.sk-sender-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.sk-sender-send {
  width: 60px;
  height: 36px;
  border-radius: 8px;
}

/* 响应式：小屏隐藏侧边栏 */
@media (max-width: 700px) {
  .sk-side {
    display: none;
  }
}
