
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.header {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header-favicon {
    width: 48px;
    height: 48px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    color: #666;
}

.back-home {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    /* background: rgba(102, 126, 234, 0.1); */
    color: #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    /* border: 1px solid rgba(102, 126, 234, 0.2); */
}

.back-home:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-50%) translateX(-5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.main-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 5px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 30px;
    resize: vertical;
    line-height: 1.6;
}

/* 额外要求输入框样式 */
#extraRequirements {
    min-height: 30px;
    font-size: 0.9rem;
    color: #555;
    padding: 10px;
}

/* 开关按钮样式 */
.toggle-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-color: #667eea;
    color: #667eea;
}

.extra-requirements-container {
    margin-top: 15px;
    animation: slideDown 0.3s ease-out;
}

.article-title-container {
    margin-top: 15px;
    animation: slideDown 0.3s ease-out;
}

/* 更多设置容器样式 */
.more-settings-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .mode-selector {
        grid-template-columns: 1fr;
    }
    
    .main-card {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    /* 移动端隐藏语言切换器 */
    .language-switcher {
        display: none !important;
    }
    
    /* 移动端隐藏回首页按钮 */
    .back-home {
        display: none !important;
    }
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 25px; /* 与上一个区域保持间距 */
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.7);
    background: linear-gradient(135deg, #ff5252 0%, #e55039 100%);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    display: none;
}

.result-section.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

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

.result-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.result-link {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    word-break: break-all;
}

.result-link a:hover {
    text-decoration: underline;
}

.copy-btn {
    margin-top: 15px;
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #5568d3;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #c33;
    display: none;
}

.error-message.show {
    display: block;
}

.tips {
    margin-top: 25px;
    padding: 20px;
    background: #fff9e6;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.tips h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tips ul {
    list-style-position: inside;
    color: #666;
    line-height: 1.8;
}

.nav-links {
    text-align: center;
    margin-top: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 1;
}

/* 底部标识样式 */
.footer {
    margin-top: 60px;
    text-align: center;
    padding: 20px 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 美化模式选择器样式 - 紧凑版 */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.mode-option:hover {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.mode-option input[type="radio"] {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.mode-option input[type="radio"]:checked + .mode-icon {
    transform: scale(1.1);
}

.mode-option:checked,
.mode-option:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.mode-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
    transition: transform 0.3s;
}

.mode-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.9rem;
    text-align: center;
}

.mode-desc {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    line-height: 1.3;
}

/* 额外要求输入框样式 */
#extraRequirements {
    min-height: 30px;
    font-size: 0.9rem;
    color: #555;
    padding: 10px;
}

/* 快速预设按钮容器 */
.quick-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 内联快速预设按钮容器 */
.quick-presets-inline {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* 快速预设按钮样式 */
.preset-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.preset-btn:active {
    transform: scale(0.95);
}

/* 小巧的内联预设按钮样式 */
.preset-btn-small {
    width: 28px;
    height: 28px;
    border: 1.5px solid #d0d0d0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.preset-btn-small:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    border-color: #667eea;
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.preset-btn-small:active {
    transform: scale(0.9);
}

/* 标签页样式 - 已废弃，保留以防万一 */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* 核心区：内联设置行 */
.inline-setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.inline-label {
    font-weight: 700; /* 标题加粗 */
    color: #333;
    font-size: 1rem;
    min-width: 80px;
    margin-bottom: 0;
}

/* 扩写模式内联选择器 */
.mode-selector-inline {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.mode-option-inline {
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 400; /* 选项默认不加粗 */
    color: #666;
}

.option-label span{
    color: gray;
    font-size: 16px;
}

.mode-option-inline:hover {
    color: #667eea;
}

.mode-option-inline input[type="radio"] {
    display: none;
}

.mode-option-inline:has(input[type="radio"]:checked) {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 500; /* 选中时稍微加重一点，但不超过标题 */
}

/* 样式风格内联选择器 */
.style-selector-wrapper-inline {
    position: relative;
    width: 140px; /* 限制宽度，比四个汉字稍长 */
}

.style-selector-btn-inline {
    width: auto;
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.style-selector-btn-inline:hover {
    border-color: #667eea;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.1);
}

/* 高级设置按钮（在标题行右侧） */
.advanced-settings-btn {
    margin-left: auto; /* 推到最右侧 */
    padding: 6px 14px;
    background: transparent;
    color: #667eea;
    border: 1px dashed #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.advanced-settings-btn:hover {
    background: #f0f0ff;
    border-style: solid;
}

/* 进阶区：输出格式选择器（内联版） */
.output-format-selector-inline {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.format-option-inline {
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 400; /* 选项默认不加粗 */
    color: #666;
}

.format-option-inline:hover {
    color: #667eea;
}

.format-option-inline input[type="radio"] {
    display: none;
}

.format-option-inline:has(input[type="radio"]:checked) {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 500; /* 选中时稍微加重一点 */
}

.format-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
    transition: transform 0.3s;
}

.format-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-align: center;
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* 响应式调整 - 标签页 */
@media (max-width: 768px) {
    .settings-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 calc(50% - 4px);
        font-size: 0.85rem;
        padding: 8px 10px;
    }
}


.language-switcher {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 1000;
        }
        .lang-dropdown-wrapper {
            position: relative;
        }
        .lang-btn {
            padding: 8px 16px;
            border: 2px solid #667eea;
            background: white;
            color: #667eea;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 100px;
            justify-content: space-between;
        }
        .lang-btn:hover {
            background: #f0f0ff;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }
        .lang-arrow {
            font-size: 10px;
            transition: transform 0.3s;
        }
        .lang-btn.active .lang-arrow {
            transform: rotate(180deg);
        }
        .lang-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
            min-width: 120px;
            z-index: 1001;
            overflow: hidden;
        }
        .lang-option {
            padding: 10px 16px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid #f0f0f0;
            font-size: 14px;
        }
        .lang-option:last-child {
            border-bottom: none;
        }
        .lang-option:hover {
            background: #f5f7fa;
            color: #667eea;
        }
        .lang-option.selected {
            background: #667eea;
            color: white;
        }
        
        /* 样式风格选择器 */
        .style-selector-wrapper {
            position: relative;
        }
        .style-selector-btn {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            transition: all 0.3s;
        }
        .style-selector-btn:hover {
            border-color: #667eea;
        }
        .dropdown-arrow {
            font-size: 10px;
            color: #999;
            transition: transform 0.3s;
        }
        .style-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 8px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
            max-height: 400px;
            overflow-y: auto;
            z-index: 100;
            width: 130px;
        }
        .style-option {
            padding: 12px 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
            border-bottom: 1px solid #f0f0f0;
        }
        .style-option:last-child {
            border-bottom: none;
        }
        .style-option:hover {
            background: #f5f7fa;
        }
        .style-option.selected {
            background: #667eea;
            color: white;
        }
        .style-icon {
            font-size: 20px;
        }
        .style-name {
            font-size: 14px;
            font-weight: 500;
        }

/* 链接提示按钮样式 */
.link-tip-btn {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: gray;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.link-tip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.link-tip-btn:active {
    transform: translateY(0);
}

/* 链接提示框样式 */
.link-tip-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tooltip-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    min-width: 300px;
    position: relative;
    border: 2px solid #667eea;
}

.tooltip-text {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    padding-right: 30px;
}

.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.tooltip-close:hover {
    background: #e0e0e0;
    color: #333;
}
/* 🔴 结果区域按钮布局 */
.result-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.copy-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 查看模板按钮 - 仅桌面端显示 */
.view-templates-btn {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.view-templates-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 移动端隐藏查看模板按钮 */
@media (max-width: 768px) {
    .view-templates-btn {
        display: none !important;
    }
}

/* 登录/注册按钮样式 */
.header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 20px;
    text-align: left !important;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-home-logo {
    display: inline-block;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.back-home-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.header-left h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    line-height: 1.4;
}

.header-right {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.login-btn {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}

.login-btn:hover {
    background: #667eea;
    color: white;
}

.register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#usernameDisplay {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9em;
}

/* 用户名链接悬停效果 - 提高优先级 */
a#usernameDisplay.username-link,
.username-link#usernameDisplay {
    text-decoration: none !important;
    color: #667eea !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative;
    display: inline-block;
}

a#usernameDisplay.username-link:hover,
.username-link#usernameDisplay:hover {
    opacity: 0.85 !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

a#usernameDisplay.username-link:hover,
.username-link#usernameDisplay:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-color: rgba(102, 126, 234, 0.6) !important;
}

.logout-btn {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 0.85em;
}

.logout-btn:hover {
    background: #dc2626;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* 🔴 文本清理警告对话框样式 */
.cleaning-warning-modal {
    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: 10000;
    animation: fadeIn 0.3s ease;
}

.cleaning-warning-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-bottom: 2px solid #ffc107;
}

.warning-icon {
    font-size: 1.5em;
}

.warning-header h3 {
    margin: 0;
    flex: 1;
    color: #856404;
    font-size: 1.2em;
}

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

.close-btn:hover {
    background: rgba(133, 100, 4, 0.1);
}

.warning-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.warning-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9em;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.warning-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.ok-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 示例菜单按钮 */
.example-menu-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.example-menu-btn:hover {
    border-color: #667eea;
    background-color: #667eea;
    color: white;
}

/* 示例文本下拉菜单 */
.example-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

/* 新建页面项特殊样式 */
.example-item-new {
    background-color: #f0f9ff;
    border-bottom: 2px solid #e0e0e0;
}

.example-item-new:hover {
    background-color: #e0f2fe;
}

/* 🔴 游戏与应用示例分隔线 */
.example-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 8px 0;
}

/* 🔴 游戏与应用示例子标题 */
.example-menu-subtitle {
    padding: 6px 12px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

/* 确保 form-group 有相对定位 */
.form-group {
    position: relative;
}

.example-menu-title {
    padding: 12px 16px;
    font-weight: 600;
    color: #333;
    background-color: #f8f9ff;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    width: auto;
}

.example-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

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

.example-item:hover {
    background-color: #f8f9ff;
}

.example-icon {
    font-size: 1.4em;
    flex-shrink: 0;
}

.example-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .quick-presets-inline {
        flex-wrap: wrap;
    }
    
    .preset-btn-small {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .style-dropdown {
        left: 0;
        right: 0;
        min-width: unset;
    }
}

/* ========================================
   🔴 AI编辑区样式
   ======================================== */

.edit-mode-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    gap: 0;
    z-index: 1000;
    overflow: hidden;
}

/* 当进入编辑模式时，隐藏主容器 */
.edit-mode-active .container {
    display: none !important;
}

/* 左侧AI对话区 */
.chat-area {
    width: 30%;
    min-width: 350px;
    max-width: 500px;
    background: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.chat-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 聊天记录区 */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.welcome-message {
    text-align: center;
    padding: 30px 20px;
    color: #666;
    line-height: 1.8;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
    font-size: 14px;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-message.loading .message-content {
    background: #fff3cd;
    color: #856404;
}

.chat-message.error .message-content {
    background: #f8d7da;
    color: #721c24;
}

.chat-message.system .message-content {
    background: #d1ecf1;
    color: #0c5460;
    width: 100%;
    max-width: 100%;
}

/* 输入区 */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-area textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    margin-bottom: 10px;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-buttons {
    display: flex;
    gap: 10px;
}

.version-btn,
.send-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.version-btn:hover {
    background: #e0e0e0;
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 右侧预览区 */
.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.preview-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* 预览控制按钮组 */
.preview-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-mode-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-mode-btn:hover {
    background: #e8e8e8;
    border-color: #667eea;
    color: #667eea;
}

.preview-mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.refresh-preview-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.refresh-preview-btn:hover {
    background: #e8e8e8;
    border-color: #667eea;
    color: #667eea;
}

/* 预览容器 */
.preview-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background: #f5f5f5;
    overflow: auto;
}

.refresh-preview-btn:hover {
    background: #e0e0e0;
    transform: rotate(180deg);
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    transition: all 0.3s ease;
}

/* 手机模式下的iframe样式 */
.preview-container.mobile-mode .preview-iframe {
    width: 375px;
    height: 667px;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
}

/* 版本列表样式 */
.version-list {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.version-list h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 15px;
}

.version-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.version-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.version-time {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.version-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.restore-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restore-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

/* 版本操作按钮组 */
.version-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.view-version-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-version-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* ========================================
   🔴 版本预览覆层样式
   ======================================== */

.version-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.overlay-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.overlay-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.close-overlay-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-overlay-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.overlay-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

/* ========================================
   🔴 版本列表覆层样式
   ======================================== */

.version-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 400px; /* 与聊天窗口一样宽 */
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.3s ease;
}

/* 版本列表遮罩层（点击可关闭） */
.version-list-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 400px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.version-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.version-list-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.version-list-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.version-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.version-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.version-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.version-info {
    margin-bottom: 10px;
}

.version-time {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.version-preview {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .edit-mode-container {
        left: 0;
        flex-direction: column;
    }
    
    .chat-area {
        width: 100%;
        height: 40%;
        min-height: 300px;
    }
    
    .preview-area {
        height: 60%;
    }
}/**
 * FileUploader CSS Styles
 * 
 * 文件上传组件的样式定义
 * 包含：上传区域、文件列表、拖拽状态等样式
 */

/* ========== 文件上传容器 ========== */
.file-upload-container {
    width: 100%;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 5px;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
    position: relative;
}

/* ========== 上传区域 ========== */
.upload-area {
    width: 100%;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area.dragover {
    background-color: #f7f7f7;
    border-color: #999;
}

.upload-area:hover {
    background-color: #f7f7f7;
}

/* ========== 上传内容布局 ========== */
.upload-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.upload-icon {
    width: 32px;
    height: 32px;
    margin: 0;
}

/* ========== 文件上传选项（行内小样式）========== */
.file-upload-options-inline {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10;
}

.checkbox-label-small {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    user-select: none;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-label-small input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #4CAF50;
    margin: 0;
}

.checkbox-label-small:hover {
    color: #4CAF50;
    background-color: rgba(255, 255, 255, 1);
}

.upload-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.upload-area p {
    margin: 2px 0;
    color: #666;
    font-size: 14px;
    text-align: left;
}

.file-size-limit {
    font-size: 12px;
    color: #999;
}

/* ========== 文件列表 ========== */
.file-list {
    padding: 10px 20px;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

/* ========== 文件项 ========== */
.file-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    max-width: calc(50% - 8px);
    min-width: 200px;
    flex: 1 1 auto;
    margin: 4px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.file-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.file-size {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

/* ========== 文件操作按钮 ========== */
.file-actions {
    margin-left: 8px;
    flex-shrink: 0;
}

.file-action-btn.delete {
    color: #dc3545;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-action-btn.delete:hover {
    color: #c82333;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

.file-action-btn.delete i {
    font-size: 14px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .file-item {
        max-width: 100%;
        min-width: 100%;
    }

    .upload-content {
        flex-direction: column;
        gap: 10px;
    }

    .upload-text-container {
        align-items: center;
        text-align: center;
    }

    .upload-area p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 15px;
    }

    .upload-icon {
        width: 24px;
        height: 24px;
    }

    .upload-area p {
        font-size: 12px;
    }

    .file-list {
        padding: 8px 12px;
    }
}
