:root {
  --screen-width: 100%;
  --screen-height: 100%;
  --aspect-ratio: 3200/1440;
  --secondary-bg: #ffffff;
  --border-color: #e0e0e0;
  --text-primary: #1f1f1f;
  --text-secondary: #8a8a8a;
  --accent-color: #007bff;
  --user-msg-bg: #007bff;
  --ai-msg-bg: #f0f2f5;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: normal;
  background-color: #f0f2f5;
  height: 100%;
  overflow: hidden;
}

#phone-screen {
  width: var(--screen-width);
  height: var(--screen-height);
  max-width: 100%;
  max-height: 100vh;
  aspect-ratio: var(--aspect-ratio);
  margin: 0 auto;
  background-color: var(--secondary-bg);
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* 全屏模式 */
#phone-screen.fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

/* 隐藏菜单 */
#hidden-menu {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 30px;
  padding: 15px 10px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 15px;
}

#hidden-menu.show {
  display: flex;
}

#hidden-menu button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#hidden-menu button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 状态栏 */
#status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 40px;
  color: white;
  background-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  pointer-events: none;
}

#status-bar-time {
  font-weight: 600;
}

.battery-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.battery-icon {
  width: 25px;
  height: 12px;
  border: 1px solid white;
  border-radius: 3px;
  position: relative;
  padding: 1px;
}

.battery-icon::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 6px;
  background-color: white;
  border-radius: 0 1px 1px 0;
}

.battery-level {
  height: 100%;
  background-color: white;
  border-radius: 1px;
  transition: width 0.5s ease, background-color 0.5s ease;
}

.battery-text {
  font-size: 12px;
  min-width: 32px;
  text-align: right;
}

/* 屏幕切换 */
.screen {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* 头部 */
.header {
  position: relative;
  z-index: 15;
  flex-shrink: 0;
  padding: 15px 20px;
  padding-top: calc(15px + env(safe-area-inset-top));
  background-color: rgba(247, 247, 247, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}

.header .back-btn, .header .action-btn, .header .add-btn, .header .save-btn {
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  text-align: center;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 多消息分隔符样式 */
.message-separator {
  margin: 10px 0;
  opacity: 0.6;
}

.message-separator hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #ccc, transparent);
}

.multi-message-part {
  margin-bottom: 8px;
}

.multi-message-part:last-child {
  margin-bottom: 0;
}

.header .action-btn, .header .add-btn, .header .save-btn {
  font-size: 16px;
  font-weight: 600;
  width: auto;
  min-width: 50px;
  padding: 0 8px;
}

/* 主屏幕 */
#home-screen {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  padding-left: 20px;
  padding-right: 20px;
}

#clock-container {
  text-align: center;
  color: white;
  text-shadow: 0 3px 8px rgba(0,0,0,0.4);
  margin-bottom: 20px;
  flex-shrink: 0;
  margin-top: calc(60px + env(safe-area-inset-top));
}

#main-time {
  font-size: 88px;
  font-weight: 600;
  letter-spacing: -2px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

#main-date {
  font-size: 22px;
  font-weight: normal;
}

#app-grid {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 20px;
  margin-bottom: calc(30px + env(safe-area-inset-bottom));
}

.app-row {
  display: flex;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.app-icon .icon-bg {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  background-color: var(--secondary-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  margin-bottom: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
  overflow: hidden;
}

.app-icon:active .icon-bg {
  transform: scale(0.9);
}

.app-icon .label {
  color: white;
}

/* 列表和表单 */
.form-container, .list-container {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  margin-bottom: 0;
  line-height: 1.4;
}

/* 头像上传容器 */
.avatar-upload-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  border: 2px dashed var(--border-color);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

/* 模型输入容器 */
.model-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.model-input-container input {
  flex: 1;
}

.model-input-container button {
  flex-shrink: 0;
  padding: 0 12px;
}

.fetch-models-btn {
  width: 100%;
  justify-content: center;
}

/* 模型选择下拉框 */
.model-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: var(--primary-bg);
  color: var(--text-primary);
}

/* 自定义模型输入容器 */
.model-custom-input-container {
  display: flex;
  gap: 10px;
}

.model-custom-input-container input {
  flex: 1;
}

.model-custom-input-container button {
  flex-shrink: 0;
  padding: 0 12px;
}
/* 设置菜单 */
.settings-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.menu-item {
    padding: 15px;
    background-color: var(--secondary-bg);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.menu-item:active {
    transform: translateY(0);
}

.menu-item .arrow {
    font-size: 20px;
    color: #999;
}

/* 开关组件 */
.switch-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 表单按钮 */
.form-button {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.form-button:hover {
    background-color: #3a5a80;
}

/* 原生安卓风格按钮 */
.android-button {
    width: 100%;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.android-button:hover {
    background-color: rgba(33, 150, 243, 0.08);
}

.android-button:active {
    background-color: rgba(33, 150, 243, 0.16);
    transform: scale(0.98);
}

.android-button-primary {
    background-color: var(--accent-color);
    color: white;
}

.android-button-primary:hover {
    background-color: #1976D2;
}

.android-button-primary:active {
    background-color: #0D47A1;
}

.android-button-danger {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

.android-button-danger:hover {
    background-color: #d32f2f;
}

.android-button-danger:active {
    background-color: #b71c1c;
}

/* 角色列表 */
.list-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.list-item:hover {
  background-color: #f5f5f5;
}

.list-item .avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
  background-color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.list-item .info {
  flex-grow: 1;
}

.list-item .name {
  font-weight: 500;
  color: var(--text-primary);
}

/* 聊天界面 */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px 15px;
  padding-top: 80px;
  margin-top: -60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.message {
  display: flex;
  max-width: 80%;
}

.message.user {
  align-self: flex-end;
}

.message.ai {
  align-self: flex-start;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 100%;
  word-wrap: break-word;
}

.message.user .message-bubble {
  background-color: var(--user-msg-bg);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.ai .message-bubble {
  background-color: var(--ai-msg-bg);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.system-message {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 5px 0;
  padding: 5px;
  opacity: 0.8;
  font-style: italic;
}

/* 消息选项菜单样式 */
.message-options-menu {
  position: fixed;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 8px 0;
  min-width: 150px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.message-option-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.message-option-item:hover {
  background-color: #f5f5f5;
}

.option-icon {
  margin-right: 10px;
  font-size: 16px;
}

/* 编辑消息对话框样式 */
.edit-message-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.edit-dialog-content {
  background-color: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.edit-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.edit-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: #f0f0f0;
}

.edit-dialog-body {
  padding: 16px 20px;
  flex-grow: 1;
}

.edit-textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.edit-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.edit-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
}

.cancel-btn, .save-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.cancel-btn {
  background-color: #f0f0f0;
  color: #333;
}

.cancel-btn:hover {
  background-color: #e0e0e0;
}

.save-btn {
  background-color: var(--accent-color);
  color: white;
}

.save-btn:hover {
  background-color: #0056b3;
}

/* 多选模式样式 */
.multi-select-mode {
  position: relative;
  transition: all 0.2s ease;
}

.multi-select-mode .message-bubble {
  opacity: 0.8;
}

.multi-select-mode.selected .message-bubble {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-color);
}

.message-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  z-index: 10;
}

.message-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}

.message-checkbox label {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background-color: white;
  transition: all 0.2s ease;
}

.message-checkbox input:checked + label {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.message-checkbox input:checked + label::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: white;
}

/* 多选工具栏样式 */
.multi-select-toolbar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  z-index: 100;
  animation: slideUp 0.3s ease;
}

.toolbar-left {
  flex-grow: 1;
}

.selected-count {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.toolbar-right {
  display: flex;
  gap: 8px;
}

.toolbar-btn {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.select-all-btn {
  background-color: #f0f0f0;
  color: #333;
}

.select-all-btn:hover {
  background-color: #e0e0e0;
}

.delete-selected-btn {
  background-color: #ff4757;
  color: white;
}

.delete-selected-btn:hover {
  background-color: #ff3838;
}

.delete-selected-btn:disabled {
  background-color: #f0f0f0;
  color: #ccc;
  cursor: not-allowed;
}

.cancel-btn {
  background-color: #f0f0f0;
  color: #333;
}

.cancel-btn:hover {
  background-color: #e0e0e0;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 原有输入区域样式 */
.input-container {
  display: flex;
  gap: 8px;
  padding: 8px;
  background-color: rgba(247, 247, 247, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
}

#chat-input {
  flex-grow: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  font-size: 16px;
  outline: none;
  background-color: white;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: var(--accent-color);
}

#chat-input-area {
  flex-shrink: 0;
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background-color: rgba(247, 247, 247, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
}

#send-btn {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#send-btn:hover {
  background-color: #1976D2;
}

#send-btn:active {
  background-color: #0D47A1;
  transform: scale(0.98);
}

/* 加号按钮样式 */
#plus-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f0f2f5;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#plus-btn:hover {
  background-color: #e0e0e0;
  color: var(--accent-color);
  transform: rotate(90deg);
}

#plus-btn:active {
  transform: rotate(90deg) scale(0.95);
}

/* 聊天菜单样式 */
.chat-menu {
  position: absolute;
  bottom: 60px;
  right: 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.chat-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-menu::before {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.menu-item:hover {
  background-color: #f5f5f5;
}

.menu-item:active {
  background-color: #eeeeee;
}

.menu-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.menu-text {
  font-size: 16px;
  color: var(--text-primary);
}

/* 文件消息样式 */
.file-message-container {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-message-container:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.file-icon {
    font-size: 24px;
    margin-right: 12px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-all;
}

.file-size {
    font-size: 12px;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #phone-screen {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
    
    #hidden-menu {
        right: 10px;
    }
    
    #hidden-menu button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-height: 500px) {
    #hidden-menu {
        flex-direction: row;
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        padding: 10px 15px;
        border-radius: 30px;
    }
}

/* 关于界面样式 */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
    text-align: center;
}

.app-icon-large {
    margin-bottom: 20px;
}

.app-icon-large .icon-bg {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.app-title {
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.about-info {
    width: 100%;
    max-width: 300px;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
}

.copyright {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

.copyright p {
    margin: 0;
}

/* Markdown渲染样式 */
.message.ai .message-bubble h1,
.message.ai .message-bubble h2,
.message.ai .message-bubble h3,
.message.ai .message-bubble h4,
.message.ai .message-bubble h5,
.message.ai .message-bubble h6 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.message.ai .message-bubble h1 {
    font-size: 1.5em;
    font-weight: 600;
}

.message.ai .message-bubble h2 {
    font-size: 1.3em;
    font-weight: 600;
}

.message.ai .message-bubble h3 {
    font-size: 1.1em;
    font-weight: 600;
}

.message.ai .message-bubble p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.message.ai .message-bubble p:last-child {
    margin-bottom: 0;
}

.message.ai .message-bubble ul,
.message.ai .message-bubble ol {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.message.ai .message-bubble li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.message.ai .message-bubble code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message.ai .message-bubble pre {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 10px;
    overflow-x: auto;
    margin: 0 0 10px 0;
}

.message.ai .message-bubble pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.message.ai .message-bubble blockquote {
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
    margin: 0 0 10px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.message.ai .message-bubble a {
    color: var(--accent-color);
    text-decoration: none;
}

.message.ai .message-bubble a:hover {
    text-decoration: underline;
}

/* 模态框样式 */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.visible {
    display: flex;
}

.modal-content {
    width: 90%;
    max-height: 90%;
    background-color: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
}

.modal-footer button {
    width: 45%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
    cursor: pointer;
    font-size: 16px;
}

.modal-footer .save {
    background-color: var(--accent-color);
    color: white;
}

.modal-footer .cancel {
    background-color: white;
    color: var(--accent-color);
}

.modal-footer .btn-danger {
    background-color: #ff3b30;
    border-color: #ff3b30;
    color: white;
}

.message.ai .message-bubble table {
    border-collapse: collapse;
    width: 100%;
    margin: 0 0 10px 0;
}

.message.ai .message-bubble th,
.message.ai .message-bubble td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
}

.message.ai .message-bubble th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.message.ai .message-bubble hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

/* KaTeX数学公式样式 */
.message.ai .message-bubble .katex {
    font-size: 1em;
}

.message.ai .message-bubble .katex-display {
    margin: 10px 0;
    text-align: center;
}

.message.ai .message-bubble .katex-display > .katex {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}