/* 中等屏幕帮助按钮简化 */
@media (max-width: 1000px) {
    .help-text {
        display: none;
    }
    
    .help-button {
        padding: 12px;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 响应式样式 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 控制面板响应式 */
    .controls-toggle {
        padding: 10px 15px;
    }
    
    .scroll-top-btn {
        padding: 4px 8px;
        height: 26px;
        font-size: 11px;
        gap: 4px;
    }
    
    .scroll-text {
        font-size: 11px;
    }
    
    .arrow-up {
        border-left-width: 2px;
        border-right-width: 2px;
        border-bottom-width: 4px;
    }
    
    .arrow-up::after {
        bottom: -6px;
        left: -1px;
        width: 2px;
        height: 1px;
    }
    
    .controls-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 15px 20px;
    }
    
    .controls-content.collapsed {
        padding: 0 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        text-align: center;
        min-height: 44px;
        border-radius: 8px;
    }
    
    .search-box {
        max-width: none;
        margin-top: 8px;
        min-height: 44px;
    }
    
    .conversation-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .conversation-title-area {
        flex: 1;
    }
    
    .conversation-meta {
        align-self: flex-end;
    }
    
    .header h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
    }
    
    /* 右上角按钮优化 */
    .theme-toggle-container {
        position: relative;
        top: auto;
        right: auto;
        display: flex;
        justify-content: center;
        margin-bottom: 15px;
        gap: 12px;
    }
    
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 18px;
        padding: 8px;
    }
    
    .help-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    
    /* 对话框自适应 */
    .conversation {
        margin-bottom: 20px;
        border-radius: 12px;
        max-width: 100%;
        overflow: hidden;
    }
    
    .conversation-header {
        padding: 15px 18px;
    }
    
    .conversation-title {
        font-size: 15px;
        line-height: 1.4;
        word-break: break-word;
    }
    
    .conversation-preview {
        font-size: 13px;
        line-height: 1.3;
        -webkit-line-clamp: 3;
        word-break: break-word;
    }
    
    .user-msg, .assistant-msg {
        padding: 18px;
        gap: 12px;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .user-msg .content, .assistant-msg .content {
        font-size: 14px;
        line-height: 1.5;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        white-space: pre-wrap;
    }
    
    /* 代码块和工具结果的自适应 */
    .code-content, .result-content, .tool-result-content {
        overflow-x: auto;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .large-content-block, .tool-call {
        max-width: 100%;
        overflow: hidden;
    }
    
    .upload-area {
        padding: 20px;
        margin: 10px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .tool-call {
        margin: 10px 0;
    }
    
    .tool-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tool-icon {
        font-size: 14px;
    }
    
    .tool-details {
        padding: 15px;
    }
    
    .shortcut-hint {
        top: 10px;
        right: 10px;
        font-size: 11px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 18px 12px;
    }
    
    .header h1 {
        font-size: 1.5em;
        margin-bottom: 6px;
    }
    
    .stats {
        gap: 15px;
        padding: 15px;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 6px 12px;
    }
    
    /* 控制面板超小屏幕优化 */
    .controls-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .scroll-top-btn {
        padding: 3px 6px;
        height: 22px;
        font-size: 10px;
        gap: 3px;
    }
    
    .scroll-text {
        font-size: 10px;
    }
    
    .arrow-up {
        border-left-width: 2px;
        border-right-width: 2px;
        border-bottom-width: 3px;
    }
    
    .arrow-up::after {
        bottom: -5px;
        left: -1px;
        width: 2px;
        height: 1px;
    }
    
    .controls-content {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .controls-content.collapsed {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .search-box {
        min-height: 40px;
        font-size: 14px;
    }
    
    /* 右上角按钮超小屏幕优化 */
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .help-button {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }
    
    /* 对话框超小屏幕优化 */
    .conversation {
        margin-bottom: 16px;
        border-radius: 10px;
        margin-left: 5px;
        margin-right: 5px;
    }
    
    .conversation-header {
        padding: 12px 15px;
    }
    
    .conversation-title {
        font-size: 14px;
        word-break: break-all;
    }
    
    .conversation-preview {
        font-size: 12px;
        word-break: break-word;
    }
    
    .user-msg, .assistant-msg {
        padding: 15px;
        gap: 10px;
    }
    
    .user-msg .avatar, .assistant-msg .avatar {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .user-msg .content, .assistant-msg .content {
        font-size: 13px;
        line-height: 1.4;
        overflow-wrap: anywhere;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .conversation-arrow {
        font-size: 11px;
    }
    
    /* 代码块和内容在超小屏幕上的优化 */
    .code-content, .result-content, .tool-result-content {
        font-size: 11px;
        padding: 10px;
        overflow-x: auto;
        white-space: pre;
        word-wrap: normal;
    }
    
    .large-content-block {
        margin: 10px 0;
        border-radius: 6px;
    }
    
    /* 超小屏幕右上角按钮优化 */
    .help-button {
        padding: 8px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
        padding: 8px;
    }
}