    /* ===== Sidebar ===== */
    .sidebar .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .sidebar .brand-name {
      font-size: 18px;
      font-weight: 700;
      margin: 0;
      color: #667eea;
    }

    .sidebar .sidebar-actions {
      display: flex;
      gap: 8px;
    }

    .sidebar .action-btn {
      background: none;
      border: none;
      padding: 6px;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
      color: #888;
    }

    .sidebar .action-btn:hover {
      background: #f5f5f5;
      color: #667eea;
    }

    .sidebar .action-btn svg {
      vertical-align: middle;
    }

    .sidebar .new-chat-btn {
      margin-bottom: 16px;
    }

    .sidebar .new-chat-btn button {
      width: 100%;
      padding: 10px;
      background: #f5f5f5;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s;
    }

    .sidebar .new-chat-btn button:hover {
      background: #e3e7ff;
      border-color: #667eea;
      color: #667eea;
    }

    .sidebar .new-chat-btn button svg {
      vertical-align: middle;
    }

    /* Dark mode styles */
    body.dark-mode .sidebar .action-btn:hover {
      background: #2d2d2d;
      color: #8899ff;
    }

    body.dark-mode .sidebar .new-chat-btn button {
      background: #2d2d2d;
      border-color: #444;
      color: #e0e0e0;
    }

    body.dark-mode .sidebar .new-chat-btn button:hover {
      background: #2d2d3d;
      border-color: #8899ff;
      color: #8899ff;
    }

    body.dark-mode .sidebar .conversation-item:hover {
      background: #2d2d2d;
    }

    body.dark-mode .sidebar .conversation-item.active {
      background: #2d2d3d;
    }

    body.dark-mode .sidebar .conversation-item .conv-title {
      color: #e0e0e0;
    }

    body.dark-mode .sidebar .conversation-item .conv-time {
      color: #888;
    }

    body.dark-mode .sidebar .conversation-item .conv-delete {
      color: #ff6666;
    }

    body.dark-mode .sidebar .conversation-item .conv-delete:hover {
      background: #3d2d2d;
    }

    .sidebar hr {
      border: none;
      border-top: 1px solid #eee;
      margin: 12px 0;
    }

    .sidebar h4 {
      font-size: 14px;
      color: #888;
      margin-bottom: 8px;
      text-transform: uppercase;
    }

    .sidebar .config-group {
      margin-bottom: 16px;
    }

    .sidebar .config-group label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      margin-bottom: 6px;
    }

    .sidebar select,
    .sidebar input[type="range"] {
      width: 100%;
    }

    .sidebar select {
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 6px;
      font-size: 14px;
      background: #fff;
    }

    .sidebar .range-value {
      font-size: 12px;
      color: #888;
      text-align: right;
    }

    .sidebar .btn-clear {
      width: 100%;
      padding: 8px;
      background: #fff0f0;
      border: 1px solid #ffcccc;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      color: #cc3333;
      transition: background 0.2s;
    }

    .sidebar .btn-clear:hover {
      background: #ffe0e0;
    }

    .sidebar .mode-radio {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .sidebar .mode-radio label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      cursor: pointer;
      padding: 6px 8px;
      border-radius: 6px;
      transition: background 0.2s;
    }

    .sidebar .mode-radio label:hover {
      background: #f5f5f5;
    }

    .sidebar .mode-radio input[type="radio"] {
      accent-color: #667eea;
    }

    /* Conversation History */
    .sidebar .conversation-history {
      flex: 1;
      overflow-y: auto;
      margin: 12px 0;
      max-height: 60vh;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }

    .sidebar .conversation-history::-webkit-scrollbar {
      display: none;
    }

    .sidebar .conversation-history:empty {
      display: none;
    }

    .sidebar .conversation-history .no-more {
      text-align: center;
      padding: 8px;
      font-size: 12px;
      color: #888;
      font-style: italic;
    }

    .sidebar .conversation-item {
      display: flex;
      align-items: center;
      padding: 10px 8px;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
      margin-bottom: 4px;
    }

    .sidebar .conversation-item:hover {
      background: #f0f0f0;
    }

    .sidebar .conversation-item.active {
      background: #e8eaf6;
    }

    .sidebar .conversation-item .conv-icon {
      margin-right: 8px;
      font-size: 14px;
    }

    .sidebar .conversation-item .conv-info {
      flex: 1;
      overflow: hidden;
    }

    .sidebar .conversation-item .conv-title {
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar .conversation-item .conv-time {
      font-size: 11px;
      color: #aaa;
    }

    .sidebar .conversation-item .conv-delete {
      opacity: 0;
      padding: 4px 8px;
      border-radius: 4px;
      background: none;
      border: none;
      cursor: pointer;
      color: #cc3333;
      transition: opacity 0.2s;
    }

    .sidebar .conversation-item:hover .conv-delete {
      opacity: 1;
    }

    .sidebar .conversation-item .conv-delete:hover {
      background: #ffe0e0;
    }

    .sidebar .mode-radio input[type="radio"]:checked+span {
      font-weight: 600;
      color: #667eea;
    }

    .sidebar .sidebar-footer {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: #fff;
      border-top: 1px solid #eee;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 10;
      padding: 12px 20px;
    }

    .sidebar .sidebar-footer .sidebar-user-section {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .sidebar .sidebar-footer .user-info {
      margin: 0;
    }

    .sidebar .sidebar-footer .user-info h3 {
      font-size: 14px;
      font-weight: 600;
      margin: 0;
    }

    .sidebar .sidebar-footer .user-info span {
      font-size: 12px;
      color: #888;
      display: block;
      margin-top: 2px;
    }

    .sidebar .sidebar-footer .user-info .token-balance {
      font-size: 12px;
      color: #52c41a;
      font-weight: 500;
      margin-top: 4px;
      display: block;
    }

    .sidebar .sidebar-footer .user-info .token-balance[style*="color: #ff4d4f"] {
      color: #ff4d4f !important;
      font-weight: 600;
    }

    .sidebar .sidebar-footer .btn-logout {
      padding: 6px 12px;
      font-size: 12px;
      background: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .sidebar .sidebar-footer .btn-logout:hover {
      background: #e8e8e8;
    }

    .sidebar .sidebar-footer .footer-text {
      font-size: 11px;
      color: #aaa;
      text-align: left;
    }

    /* ===== 新建对话按钮禁用状态 ===== */
    .sidebar .new-chat-btn button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      pointer-events: none;
    }
