/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #D1C4E9 0%, #FFFFFF 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.language-switch {
    position: absolute;
    top: 16px;
    right: 18px;
    color: #7E57C2;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 600;
}

.language-switch:hover {
    text-decoration: underline;
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
}

/* 步骤区域 */
.step {
    background: white;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.step-number {
    background: #7E57C2;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

.step-header h2 {
    color: #2c3e50;
    font-size: 1.5em;
}

.help-icon {
    background: #ecf0f1;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    cursor: help;
    font-weight: bold;
    color: #7f8c8d;
}

/* 上传区域 */
.upload-area {
    text-align: center;
}

.upload-btn {
    display: inline-block;
    padding: 30px 60px;
    background: #ecf0f1;
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #7E57C2;
    border-color: #673AB7;
    color: white;
}

.upload-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.1em;
    font-weight: bold;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.file-info .file-name {
    font-weight: bold;
    color: #2c3e50;
}

.file-info .file-size {
    color: #7f8c8d;
    margin-top: 5px;
}

.file-info .reupload-btn {
    margin-top: 10px;
    padding: 5px 15px;
    background: #7E57C2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.progress-container {
    margin-top: 20px;
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #2ecc71;
    width: 0%;
    transition: width 0.3s ease;
}

.upload-hint {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.privacy-note-upload {
    margin-top: 12px;
    padding: 8px 15px;
    background: #e8f5e9;
    border-radius: 6px;
    color: #2e7d32;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

/* 输入区域 */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.template-select {
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.gongwen-options-panel {
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.gongwen-options-panel.hidden {
    display: none;
}

.gongwen-options-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #2c3e50;
}

.gongwen-options-header strong {
    font-size: 1em;
}

.gongwen-options-header span {
    color: #7f8c8d;
    font-size: 0.86em;
}

.gongwen-option-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #34495e;
    font-size: 0.95em;
}

.gongwen-option-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7E57C2;
}

.gongwen-option-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding-left: 24px;
}

.gongwen-option-fields.hidden {
    display: none;
}

.gongwen-option-fields label {
    display: grid;
    gap: 5px;
    color: #34495e;
    font-size: 0.9em;
}

.gongwen-option-fields input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1.5px solid #dfe4ea;
    border-radius: 8px;
    font: inherit;
}

.gongwen-option-fields input:focus {
    outline: none;
    border-color: #7E57C2;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

#formatRequirements {
    padding: 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    min-height: 150px;
    resize: vertical;
}

#formatRequirements:focus {
    outline: none;
    border-color: #7E57C2;
}

.examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.examples h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.bad-example {
    color: #e74c3c;
    margin-bottom: 5px;
}

.good-example {
    color: #2ecc71;
}

.content-cleanup-panel {
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    background: #fff;
    padding: 0;
}

.content-cleanup-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 600;
}

.content-cleanup-panel summary small {
    color: #7f8c8d;
    font-weight: 400;
    font-size: 0.86em;
}

.cleanup-note {
    margin: 0 14px 10px 14px;
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.5;
}

.cleanup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 0 14px 14px 14px;
}

.cleanup-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 46px;
    color: #34495e;
    font-size: 0.95em;
}

.cleanup-options label > span {
    display: grid;
    gap: 3px;
}

.cleanup-options label strong {
    font-weight: 600;
    color: #2c3e50;
}

.cleanup-options label small,
.cleanup-confirm-option small {
    color: #7f8c8d;
    font-size: 0.88em;
    line-height: 1.45;
}

.cleanup-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #7E57C2;
    flex: 0 0 auto;
}

.content-cleanup-confirm-content {
    max-width: 560px;
}

.cleanup-confirm-desc {
    margin-bottom: 14px;
    color: #34495e;
    line-height: 1.6;
}

.cleanup-confirm-options {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.cleanup-confirm-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    color: #2c3e50;
    line-height: 1.45;
}

.cleanup-confirm-option > span {
    display: grid;
    gap: 3px;
}

.cleanup-confirm-option strong {
    font-weight: 600;
    color: #2c3e50;
}

.cleanup-confirm-option input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #7E57C2;
    flex: 0 0 auto;
}

.cleanup-confirm-warning {
    margin: 10px 0 0 0;
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.5;
}

.cleanup-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.cleanup-confirm-primary,
.cleanup-confirm-secondary {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
}

.cleanup-confirm-primary {
    border: none;
    background: #7E57C2;
    color: white;
}

.cleanup-confirm-secondary {
    border: 1px solid #dfe4ea;
    background: white;
    color: #34495e;
}

/* 处理区域 */
.process-area {
    text-align: center;
}

.process-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.process-btn {
    background: linear-gradient(135deg, #7E57C2, #673AB7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(126, 87, 194, 0.3);
    flex: 1;
}

.process-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #673AB7, #7E57C2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(126, 87, 194, 0.4);
}

.process-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.test-doc-btn {
    background: white;
    color: #7E57C2;
    border: 2px solid #7E57C2;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.test-doc-btn:hover {
    background: #F3E5F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(126, 87, 194, 0.2);
}

.status-display {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-waiting-tip {
    padding: 12px 15px;
    background: #FFF9C4;
    border-left: 4px solid #FBC02D;
    border-radius: 5px;
    margin-bottom: 15px;
    color: #5d4037;
    font-size: 14px;
    line-height: 1.6;
}

.status-waiting-tip .icon {
    font-size: 16px;
    margin-right: 5px;
}

.status-step {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #7E57C2;
}

.status-step.active {
    background: #F3E5F5;
}

.status-step.completed {
    border-left-color: #2ecc71;
}

.status-step.completed::before {
    content: "✓ ";
    color: #2ecc71;
    font-weight: bold;
}

.error-message {
    color: #e74c3c;
    background: #fbe9e7;
    border: 1px solid #e74c3c;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#clarificationInput {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
}

#clarificationInput:focus {
    outline: none;
    border-color: #7E57C2;
}

.modal-buttons {
    text-align: right;
}

#clarificationSubmit {
    padding: 8px 20px;
    background: #7E57C2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 结果区域 */
.result-area {
    margin-top: 30px;
    padding: 30px;
    background: #e8f5e9;
    border-radius: 10px;
}

.success-icon {
    font-size: 3em;
    color: #2ecc71;
    margin-bottom: 15px;
}

.result-area h3 {
    color: #27ae60;
    margin-bottom: 20px;
}

.download-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #2ecc71;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #27ae60;
}

.rating-tip {
    margin-top: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 8px;
    color: #667eea;
    font-size: 0.95em;
    font-weight: 500;
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* 格式调整对比样式 */
.comparison-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    text-align: left;
}

/* 参照文档排版 - 提示框 */
.format-tip-box {
    text-align: center;
    background: linear-gradient(135deg, #f5f0ff 0%, #eef2ff 100%);
    border: 1px solid #d4c8ef;
    border-radius: 10px;
    padding: 18px 24px;
    margin-bottom: 18px;
}

.format-tip-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 6px 0;
}

.format-tip-desc {
    font-size: 0.88em;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.comparison-result h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 2px solid #7E57C2;
}

.comparison-category {
    margin-bottom: 16px;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.comparison-category-title {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f5f0ff 0%, #f8f9fa 100%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
    border-bottom: 1px solid #e8e8e8;
}

.comparison-category-title .category-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.comparison-category-title .item-count {
    margin-left: auto;
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: normal;
}

.comparison-category-content {
    padding: 12px 15px;
}

.comparison-item.single {
    color: #34495e;
    font-size: 0.9em;
    line-height: 1.5;
}

.comparison-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comparison-items-list li {
    position: relative;
    padding: 6px 0 6px 20px;
    color: #34495e;
    font-size: 0.9em;
    line-height: 1.5;
    border-bottom: 1px dashed #eee;
}

.comparison-items-list li:last-child {
    border-bottom: none;
}

.comparison-items-list li::before {
    content: "•";
    position: absolute;
    left: 6px;
    color: #7E57C2;
    font-weight: bold;
}

.comparison-empty {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.comparison-error {
    color: #e74c3c;
    background: #fbe9e7;
    border: 1px solid #e74c3c;
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: bold;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #7f8c8d;
}

.privacy-note {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.feedback-link {
    margin: 10px 0;
    font-size: 0.95em;
}

.feedback-link a {
    color: #7E57C2;
    text-decoration: none;
    font-weight: 500;
}

.feedback-link a:hover {
    text-decoration: underline;
    color: #673AB7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .step {
        padding: 20px;
    }
    
    .upload-btn {
        padding: 20px 40px;
    }
    
    .upload-icon {
        font-size: 2em;
    }

    .process-buttons {
        flex-direction: column;
    }
}

/* 辅助类 */
.hidden {
    display: none;
}

/* 大纲列表样式 */
#outlineList {
    list-style-type: none;
    max-height: 250px; 
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    text-align: left;
}

#outlineList li {
    padding: 4px 8px;
    margin-bottom: 3px;
    border-radius: 4px;
    transition: background-color 0.2s;
    line-height: 1.4;
    position: relative; 
}

#outlineList li:hover {
    background-color: #e9ecef;
}

#outlineList li::before {
    content: none !important; 
}

.outline-l1 {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.05em;
    padding-left: 8px;
}

.outline-l2 {
    color: #34495e;
    padding-left: 25px;
}

.outline-l3 {
    color: #7f8c8d;
    font-size: 0.95em;
    padding-left: 45px;
}

.outline-l4 {
    color: #95a5a6;
    font-size: 0.9em;
    padding-left: 65px;
}

.outline-info {
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9em;
    text-align: left;
    padding: 10px;
}

.outline-warning {
    margin-top: 20px;
    padding: 15px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
}

.outline-warning p {
    margin: 5px 0 0 0;
}

/* 大纲识别方式选择器样式 */
.outline-mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.outline-mode-selector label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.outline-mode-selector select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.outline-mode-selector select:hover {
    border-color: #7E57C2;
}

.outline-mode-selector select:focus {
    outline: none;
    border-color: #7E57C2;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

.outline-mode-selector .mode-hint {
    font-size: 12px;
    color: #7f8c8d;
    white-space: normal;
    flex-shrink: 1;
    min-width: 0;
}

.gongwen-outline-hint {
    margin: -4px 0 14px;
    padding: 10px 12px;
    background: #f4f8ff;
    border: 1px solid #d8e6ff;
    border-radius: 8px;
    color: #3b5f8f;
    font-size: 13px;
    line-height: 1.5;
}

/* 支持功能区域样式 */
.features-section {
    background: linear-gradient(135deg, #f3e5f5 0%, #ffffff 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.feature-category {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #7E57C2;
}

.feature-category h3 {
    display: flex;
    align-items: center;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.feature-category h3 .icon {
    margin-right: 10px;
    font-size: 1.3em;
}

.feature-category ul {
    list-style-type: none;
    padding-left: 5px;
}

.feature-item {
    color: #34495e;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    font-size: 0.95em;
}

.feature-item::before {
    content: "✓";
    color: #2ecc71;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* 星级评分样式 */
.rating-area-beautiful {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.5s ease-out;
}

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

.rating-header {
    margin-bottom: 20px;
}

.rating-header .rating-emoji {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

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

.rating-header h4 {
    color: white;
    font-size: 1.4em;
    margin-bottom: 5px;
    font-weight: 600;
}

.rating-header .rating-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
}

.star-rating-container {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.star-rating-beautiful {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.star-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.star-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.star-btn .star-icon {
    font-size: 2.2em;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.star-btn:hover .star-icon,
.star-btn.active .star-icon {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
}

.star-btn .star-label {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    font-weight: 500;
}

.star-btn:hover .star-label,
.star-btn.active .star-label {
    color: white;
}

.rating-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
    margin-top: 12px;
    transition: all 0.3s;
}

.rating-hint.selected {
    color: #FFD700;
    font-weight: 500;
}

.rating-feedback-area {
    display: none;
    animation: fadeIn 0.3s ease;
}

.rating-feedback-area.show {
    display: block;
}

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

.rating-feedback-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.rating-feedback-area textarea:focus {
    outline: none;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.rating-feedback-area textarea::placeholder {
    color: #999;
}

.submit-rating-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.submit-rating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.submit-rating-btn .btn-icon {
    transition: transform 0.3s;
}

.submit-rating-btn:hover .btn-icon {
    transform: translateX(5px);
}

.rating-thanks {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1.1em;
    font-weight: 500;
    animation: scaleIn 0.4s ease;
}

.rating-thanks.show {
    display: flex;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rating-thanks .thanks-icon {
    font-size: 1.5em;
    animation: bounce 1s ease infinite;
}

/* 侧边栏评分组件 */
.side-rating-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 12px;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -3px 3px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.side-rating-trigger:hover {
    padding-right: 18px;
    box-shadow: -5px 5px 20px rgba(102, 126, 234, 0.5);
}

.side-rating-trigger .trigger-icon {
    font-size: 1.5em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.side-rating-trigger .trigger-text {
    font-size: 0.75em;
    font-weight: 600;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
}

.side-rating-panel {
    position: fixed;
    right: -350px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background: white;
    border-radius: 16px 0 0 16px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.side-rating-panel.open {
    right: 0;
}

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

.side-rating-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.side-rating-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.side-rating-body {
    padding: 25px 20px;
}

.side-rating-desc {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.side-star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.side-star {
    font-size: 2.2em;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-star:hover,
.side-star.active {
    color: #FFD700;
    transform: scale(1.15);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.side-rating-label {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
    min-height: 24px;
    transition: all 0.3s;
}

.side-rating-label.selected {
    color: #667eea;
    font-weight: 500;
}

.side-feedback-area {
    display: none;
    animation: fadeIn 0.3s ease;
}

.side-feedback-area.show {
    display: block;
}

.side-feedback-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9em;
    resize: none;
    transition: border-color 0.3s;
    margin-bottom: 12px;
}

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

.side-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.side-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.side-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.side-rating-thanks {
    display: none;
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-size: 1.1em;
    font-weight: 500;
    animation: scaleIn 0.4s ease;
}

.side-rating-thanks.show {
    display: block;
}

.side-rating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.side-rating-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式：小屏幕优化 */
@media (max-width: 600px) {
    .star-rating-beautiful {
        gap: 5px;
    }
    
    .star-btn {
        padding: 8px;
    }
    
    .star-btn .star-icon {
        font-size: 1.8em;
    }
    
    .star-btn .star-label {
        font-size: 0.65em;
    }
    
    .rating-header h4 {
        font-size: 1.2em;
    }
    
    .comparison-category-title {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .comparison-category-content {
        padding: 10px 12px;
    }
    
    .comparison-items-list li {
        padding: 5px 0 5px 18px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .side-rating-trigger {
        top: auto;
        bottom: 100px;
        padding: 12px 10px;
    }
    
    .side-rating-trigger .trigger-text {
        display: none;
    }
    
    .side-rating-panel {
        width: 100%;
        right: -100%;
        top: auto;
        bottom: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
    }
    
    .side-rating-panel.open {
        right: 0;
    }
}

/* 新功能公告弹窗样式 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-modal.hidden {
    display: none;
}

.announcement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.announcement-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 540px;
    width: 90%;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: announcementSlideIn 0.4s ease;
}

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

.announcement-header {
    text-align: center;
    margin-bottom: 20px;
}

.announcement-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 12px;
}

.announcement-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #2c3e50;
}

.announcement-subtitle {
    margin: 0 0 12px 0;
    font-size: 1.4em;
    color: #2c3e50;
    text-align: center;
}

.announcement-body {
    color: #555;
    line-height: 1.7;
}

.announcement-body p {
    margin: 0 0 12px 0;
}

.announcement-body ul {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

.announcement-body li {
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #7E57C2;
}

.announcement-body li strong {
    color: #7E57C2;
}

.announcement-tip {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    color: #2e7d32;
    margin-top: 15px;
}

.announcement-divider {
    border: none;
    border-top: 1px dashed #ddd;
    margin: 20px 0;
}

.announcement-footer {
    margin-top: 24px;
    text-align: center;
}

.announcement-btn {
    background: linear-gradient(135deg, #7E57C2 0%, #5E35B1 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.announcement-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(126, 87, 194, 0.4);
}

/* ============== 预览功能样式 ============== */

/* 结果区域按钮组 */
.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.preview-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #7E57C2, #673AB7);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(126, 87, 194, 0.3);
}

.preview-btn:hover {
    background: linear-gradient(135deg, #673AB7, #5E35B1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(126, 87, 194, 0.4);
}

/* 预览模态框 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal.hidden {
    display: none;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.preview-container {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 95vw;
    height: 90vh;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: previewSlideIn 0.3s ease;
}

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

/* 预览头部 */
.preview-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f5f0ff 0%, #f8f9fa 100%);
    border-radius: 12px 12px 0 0;
}

.preview-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2c3e50;
}

.preview-mode-tabs {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 20px;
}

.preview-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.preview-tab:hover {
    border-color: #7E57C2;
    color: #7E57C2;
}

.preview-tab.active {
    background: linear-gradient(135deg, #7E57C2, #673AB7);
    color: white;
    border-color: transparent;
}

.preview-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preview-close-btn:hover {
    background: #e74c3c;
    color: white;
}

/* 预览提示 */
.preview-notice {
    text-align: center;
    color: #888;
    font-size: 12px;
    padding: 6px 0;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

/* 预览主体 */
.preview-body {
    flex: 1;
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow: hidden;
    background: #f5f5f5;
}

.preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.preview-pane-header {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

.preview-original .preview-pane-header {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.preview-processed .preview-pane-header {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.preview-content {
    flex: 1;
    overflow: auto;
    background: #fafafa;
    position: relative;
}

.preview-content iframe,
.preview-content embed,
.preview-content object {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-pdf-fallback {
    display: none;
}

.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
    font-size: 1.1em;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
}

.preview-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #7E57C2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.preview-loading-text {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 8px;
}

.preview-loading-hint {
    font-size: 0.85em;
    color: #999;
}

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

.preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

.preview-error::before {
    content: "⚠️";
    font-size: 2em;
    margin-bottom: 10px;
}

/* 预览模式切换 */
.preview-modal[data-mode="original"] .preview-processed {
    display: none;
}

.preview-modal[data-mode="original"] .preview-original {
    flex: 1;
}

.preview-modal[data-mode="processed"] .preview-original {
    display: none;
}

.preview-modal[data-mode="processed"] .preview-processed {
    flex: 1;
}

/* 预览底部 */
.preview-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.preview-changes-summary {
    margin-bottom: 15px;
    max-height: 100px;
    overflow-y: auto;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-changes-summary:empty {
    display: none;
}

.preview-changes-summary h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #7E57C2;
}

.preview-changes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-change-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3e5f5;
    color: #7E57C2;
    border-radius: 12px;
    font-size: 0.85em;
}

.preview-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.preview-action-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.preview-action-btn.secondary {
    background: white;
    color: #7f8c8d;
    border: 1px solid #ddd;
}

.preview-action-btn.secondary:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.preview-action-btn.primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
}

.preview-action-btn.primary:hover {
    background: linear-gradient(135deg, #27ae60, #219a52);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* 预览底部操作栏 */
.preview-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-top: 1px solid #eee;
    gap: 20px;
}

/* 预览内评分 */
.preview-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-rating-icon {
    font-size: 1.2em;
}

.preview-rating-label {
    font-size: 0.95em;
    color: #555;
    font-weight: 500;
}

.preview-star-rating {
    display: flex;
    gap: 2px;
}

.preview-star {
    font-size: 1.6em;
    cursor: pointer;
    color: #ddd;
    transition: all 0.15s ease;
    user-select: none;
}

.preview-star:hover,
.preview-star.active {
    color: #f1c40f;
    transform: scale(1.15);
}

.preview-star.active {
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
}

.preview-rating-text {
    font-size: 0.9em;
    color: #7E57C2;
    font-weight: 600;
    min-width: 60px;
}

.preview-rating-thanks {
    color: #27ae60;
    font-weight: 600;
    font-size: 0.95em;
}

.preview-rating-thanks.hidden {
    display: none;
}

/* 已评分状态 */
.preview-rating.rated .preview-star-rating,
.preview-rating.rated .preview-rating-label,
.preview-rating.rated .preview-rating-icon,
.preview-rating.rated .preview-rating-text {
    display: none;
}

/* 评分区域隐藏 */
.preview-rating.hidden {
    display: none;
}

/* 评分区域弹出动画 */
@keyframes ratingShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* 反馈输入区 */
.preview-feedback-area {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.preview-feedback-area.hidden {
    display: none;
}

.preview-feedback-area textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.preview-feedback-area textarea:focus {
    outline: none;
    border-color: #7E57C2;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

.preview-submit-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #7E57C2, #9575CD);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-submit-btn:hover {
    background: linear-gradient(135deg, #6A4AAA, #7E57C2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(126, 87, 194, 0.3);
}

.preview-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式：小屏幕 */
@media (max-width: 768px) {
    .preview-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .preview-header {
        flex-wrap: wrap;
        gap: 10px;
        border-radius: 0;
    }

    .preview-mode-tabs {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
        justify-content: center;
    }

    .preview-body {
        flex-direction: column;
    }

    .preview-pane {
        min-height: 40%;
    }

    .preview-modal[data-mode="compare"] .preview-pane {
        min-height: 45%;
    }

    .result-buttons {
        flex-direction: column;
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-action-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============== 附件功能样式（ChatGPT 风格） ============== */

/* textarea 容器：接管边框 */
.textarea-wrapper {
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s;
}

.textarea-wrapper:focus-within {
    border-color: #7E57C2;
}

/* textarea 自身去掉边框，宽度撑满 */
.textarea-wrapper #formatRequirements {
    border: none !important;
    outline: none !important;
    width: 100%;
    padding: 15px 15px 10px 15px;
    min-height: 130px;
    resize: vertical;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.6;
    color: #333;
    box-sizing: border-box;
    display: block;
}

/* 底部工具栏 */
.textarea-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.toolbar-left {
    display: flex;
    align-items: center;
}

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

/* 附件按钮 */
.attachment-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 18px;
    background: white;
    color: #555;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
}

.attachment-btn:hover {
    border-color: #7E57C2;
    color: #7E57C2;
    background: #f3e5f5;
}

.attachment-icon {
    flex-shrink: 0;
}

.attachment-btn-text {
    white-space: nowrap;
}

.attachment-hint {
    font-size: 0.8em;
    color: #aaa;
}

/* 附件预览区域 */
.attachment-preview {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-preview.hidden {
    display: none;
}

/* 附件卡片 */
.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85em;
    max-width: 100%;
}

.attachment-item-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.attachment-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.attachment-item-name {
    font-weight: 500;
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #888;
}

.attachment-item-size {
    color: #999;
}

.attachment-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 1.2em;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.attachment-item-remove:hover {
    color: #e74c3c;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .attachment-btn-text {
        display: none;
    }

    .attachment-btn {
        padding: 8px;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }

    .attachment-hint {
        display: none;
    }

    .attachment-item-name {
        max-width: 120px;
    }
}

/* ==================== Tab 切换样式 ==================== */

.tabs-container {
    margin-bottom: 20px;
    overflow: hidden;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-button.active {
    color: #673AB7;
    background: #f8f9fa;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #673AB7;
}

.tab-content {
    display: none;
}

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

/* ==================== 格式修改输入区样式 ==================== */

.format-modify-input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease;
}

.format-modify-input:focus {
    outline: none;
    border-color: #7E57C2;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

/* 确认按钮区域 */
.format-confirm-area {
    margin-top: 20px;
    text-align: center;
    padding-bottom: 5px;
}

.format-confirm-btn {
    width: 55%;
    max-width: 320px;
}

/* 修改规则折叠区域 */
.format-modify-toggle {
    text-align: center;
    margin-top: 12px;
}

.format-modify-link {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.format-modify-link:hover {
    color: #7E57C2;
}

.format-modify-area {
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 14px;
}

/* 单选按钮组样式*/

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-label:hover {
    background: #e9ecef;
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-label input[type="radio"]:checked + span {
    color: #673AB7;
    font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
    background: #f3e5f5;
    border-color: #673AB7;
}

/*响应式调整*/

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }

    .tab-button {
        padding: 15px;
        font-size: 14px;
    }

    .format-category-header {
        font-size: 14px;
    }

    .format-items li {
        font-size: 13px;
    }
}
