.chat-container {
  flex: 2;
  display: flex;
  flex-direction: column;
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 12px;
  position: relative;
  animation: fadeIn 0.3s;
}

.message.self {
  align-self: flex-end;
  background: var(--message-bg-self);
}

.message.other {
  align-self: flex-start;
  background: var(--message-bg-other);
  border: 1px solid #eee;
}

.message-content {
  margin-bottom: 5px;
  word-break: break-word;
}

.message-meta {
  font-size: 0.8em;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-actions {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.message:hover .message-actions {
  display: flex;
  gap: 5px;
}

.chat-input {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  outline: none;
  transition: border-color 0.3s;
}

.chat-input input:focus {
  border-color: var(--primary-color);
}

.file-preview {
  margin-bottom: 10px;
}

.file-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-info {
  background: rgba(0, 0, 0, 0.05);
  padding: 10px;
  border-radius: var(--border-radius);
  margin-top: 5px;
}

.file-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.file-meta {
  font-size: 0.8em;
  color: #666;
}

.file-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* 拖拽上传区域 */
.chat-messages.drag-over::after {
  content: '释放以上传文件';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(24, 144, 255, 0.1);
  border: 2px dashed var(--primary-color);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color);
  z-index: 10;
}

/* 悬浮上传按钮 */
.float-upload {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
}

.float-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.float-upload-icon {
  font-size: 24px;
}

/* 移动端工具栏 */
@media (max-width: 768px) {
  .mobile-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
  }

  .tool-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: var(--border-radius);
    background: #f5f5f5;
    cursor: pointer;
  }

  .tool-icon {
    font-size: 24px;
    color: #666;
  }

  .tool-text {
    font-size: 12px;
    color: #666;
  }
}

/* 上传进度 */
.upload-progress-overlay {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: white;
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  animation: slideIn 0.3s;
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.upload-title {
  font-weight: 500;
}

.upload-close {
  cursor: pointer;
  padding: 4px;
}

.upload-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-item-info {
  flex: 1;
  min-width: 0;
}

.upload-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.upload-progress-bar {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 文件网盘 */
.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.file-item {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s;
}

.file-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-preview {
  aspect-ratio: 16/9;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.file-info {
  padding: 12px;
}

.file-name {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.8em;
  color: #666;
  display: flex;
  gap: 8px;
}

.file-actions {
  padding: 12px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
}

/* 分享对话框 */
.share-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s;
}

.share-content {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  width: 90%;
  max-width: 500px;
}

.share-link {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.share-link input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  outline: none;
}

.share-info {
  color: #666;
  margin-bottom: 15px;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
} 