

        .page-title {
            font-size: 24px;
            color: #333;
            margin-bottom: 20px;
        }

        .chat-wrapper {
            width: 92%;
            /*max-width: 800px;*/
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .chat-container {
            width: 100%;
            height: 10vh;
            border: none;
            border-radius: 0;
            background: transparent;
            padding: 0;
            padding-bottom: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
            transition: height 0.3s ease;
            border-bottom: 1px solid #e5e9ef;
        }

        .chat-container.has-content {
            height: 100%;
        }

        .message {
            max-width: 85%;
            padding: 12px 16px;
            border-radius: 8px;
            line-height: 1.6;
            word-wrap: break-word;
            font-size: 15px;
        }

        .user-message {
            align-self: flex-end;
            background: #2d8cf0;
            color: #fff;
        }

        .ai-message {
            align-self: flex-start;
            background: #f5f7fa;
            color: #333;
            border: 1px solid #e5e9ef;
        }

        .loading {
            align-self: flex-start;
            color: #999;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
        }

        .loading-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #999;
            animation: blink 1s infinite alternate;
        }

        .loading-dot:nth-child(2) { animation-delay: 0.2s; }
        .loading-dot:nth-child(3) { animation-delay: 0.4s; }

        @keyframes blink {
            from { opacity: 0.3; }
            to { opacity: 1; }
        }

        .input-container {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-top: 20px;
            position: relative;
        }

        .upload-wrapper {
            display: flex;
            justify-content: flex-start;
            margin-bottom: 5px;
        }

        .button-group {
            position: absolute;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
        }

        .input-wrapper {
            display: flex;
            width: 100%;
            position: relative;
        }

        #prompt-input {
            width: 100%;
            padding: 14px 16px;
            padding-right: 90px; /* 为发送按钮留出空间 */
            border: 1px solid #e5e9ef;
            border-radius: 8px;
            outline: none;
            font-size: 15px;
            resize: none;
            height: 70px;
            line-height: 1.5;
            overflow-y: hidden;
            min-height: 50px;
            max-height: 200px;
        }

        #prompt-input:focus {
            border-color: #2d8cf0;
            box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.1);
        }

        #send-btn {
            position: absolute;
            right: 10px;
            bottom: 10px;
            padding: 16px 20px;
            background: #2d8cf0;
            color: #fff;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.3s;
            height: auto;
        }

        #send-btn:hover {
            background: #1c7ed6;
        }

        #send-btn:disabled {
            background: #999;
            cursor: not-allowed;
        }

        .upload-button {
            padding: 6px 15px;
            background: #52c41a;
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .upload-button:hover {
            background: #389e0d;
        }
        
        
        
           /* 写作按钮与面板（写作功能） */
        .writing-button {
            background: #1677ff;
        }
        .writing-button:hover {
            background: #0f6ede;
        }
        .writing-panel {
            display: none;
            width: 100%;
            border: 1px solid #e5e9ef;
            border-radius: 10px;
            background: #ffffff;
            padding: 12px 12px 10px 12px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        }
        .writing-panel.show {
            display: block;
        }
        .writing-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        .writing-panel-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }
        .writing-panel-close {
            width: 28px;
            height: 28px;
            border: none;
            border-radius: 8px;
            background: #f0f2f5;
            cursor: pointer;
            font-size: 18px;
            line-height: 28px;
            color: #666;
        }
        .writing-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
        }
        .writing-tab {
            padding: 6px 12px;
            border-radius: 999px;
            border: 1px solid #d9d9d9;
            background: #fff;
            cursor: pointer;
            font-size: 13px;
            color: #333;
        }
        .writing-tab.active {
            border-color: #1677ff;
            color: #1677ff;
            background: rgba(22,119,255,0.06);
        }
        .writing-section {
            display: block;
        }
        .writing-section.hidden {
            display: none;
        }
        .writing-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 0;
            flex-wrap: wrap;
        }
        .writing-label {
            min-width: 44px;
            font-size: 13px;
            color: #666;
        }
        .writing-row select {
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid #d9d9d9;
            font-size: 13px;
            outline: none;
        }
        .writing-options {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            font-size: 13px;
            color: #333;
        }
        .writing-options label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }
        .writing-tip {
            margin-top: 8px;
            font-size: 12px;
            color: #999;
        }