/* 主布局 */
.app-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  overflow: hidden;
}

/* 顶部导航栏 */
.app-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  position: relative;
  z-index: var(--z-header);
  flex-shrink: 0;
}

.header-left,
.header-right {
  width: 48px;
  display: flex;
  align-items: center;
}

.header-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: var(--transition);
}

.status-indicator.online {
  background: #34C759;
}

.status-indicator.offline {
  background: #FF3B30;
}

/* 聊天容器 */
.chat-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--spacing-lg) 0;
}

.chat-messages {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* 底部输入区域 */
.input-container {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 12px var(--spacing-lg) 16px;
  position: relative;
  z-index: var(--z-input);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-sm);
  max-width: 100%;
}

.message-input {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  background: var(--bg-color);
  border-radius: 22px;
  font-size: 16px;
  color: var(--text-primary);
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
}

.message-input::placeholder {
  color: var(--text-tertiary);
}

/* 按钮样式 */
.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:active {
  background: var(--bg-color);
  transform: scale(0.95);
}

.plus-btn {
  color: var(--text-secondary);
}

.plus-btn.active {
  transform: rotate(45deg);
}
}

.send-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.send-btn:active {
  background: var(--primary-hover);
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式 */
@media (min-width: 768px) {
  .app-container {
    max-width: 768px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
  }
}
