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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 50%, #ecfeff 100%);
    min-height: 100vh;
    color: #334155;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(2, 132, 199, 0.1);
    padding: 0.85rem 2rem;
    box-shadow: 0 2px 20px rgba(15, 118, 110, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f766e;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
}

.left-panel, .right-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 1000px;
    padding: 1.5rem;
}

.right-panel {
    width: 400px;
}

/* 输入区域样式 */
.input-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* 操作按钮区域 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-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;
}

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

.primary-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.primary-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.secondary-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.secondary-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.action-btn.disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-icon {
    font-size: 1rem;
}

/* 富文本编辑器区域 */
.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.rich-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

/* Quill编辑器样式定制 */
.rich-editor .ql-container {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    border: none;
    height: auto;
}

.rich-editor .ql-editor {
    padding: 1.5rem;
    min-height: 400px;
    height: auto;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.rich-editor .ql-editor p {
    margin: 0;
    padding: 0;
}

.rich-editor .ql-editor[contenteditable="true"] {
    outline: none;
}

/* 确保字体和字号正确显示 */
.rich-editor .ql-editor span[style*="font-family"] {
    font-family: inherit;
}

.rich-editor .ql-editor span[style*="font-size"] {
    font-size: inherit;
}

/* 保持粘贴内容的格式 */
.rich-editor .ql-clipboard {
    left: -100000px;
    height: 1px;
    overflow-y: hidden;
    position: absolute;
    top: 50%;
}

/* 确保格式正确显示 */
.rich-editor .ql-editor strong {
    font-weight: bold;
}

.rich-editor .ql-editor em {
    font-style: italic;
}

.rich-editor .ql-editor u {
    text-decoration: underline;
}

.rich-editor .ql-editor s {
    text-decoration: line-through;
}

/* 自定义字体大小类 */
.rich-editor .ql-editor .ql-size-small {
    font-size: 0.75em;
}

.rich-editor .ql-editor .ql-size-large {
    font-size: 1.5em;
}

.rich-editor .ql-editor .ql-size-huge {
    font-size: 2.5em;
}

/* 错误高亮样式 */
.error-highlight {
    background-color: #fed7d7;
    border-bottom: 2px wavy #e53e3e;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.error-highlight:hover {
    background-color: #fbb6ce;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.error-highlight-hover {
    background-color: #fbb6ce !important;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.error-blink {
    animation: errorBlink 0.6s ease-in-out;
}

@keyframes errorBlink {
    0%, 100% {
        background-color: #fed7d7;
    }
    50% {
        background-color: #fc8181;
    }
}

/* 右侧结果区域 */
.results-section {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 占位区域 */
.placeholder-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.placeholder-content {
    color: #a0aec0;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.placeholder-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.placeholder-desc {
    line-height: 1.6;
}

/* 结果内容区域 */
.results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 勘误结果标题（居中） */
.results-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-title h3 {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 600;
}

/* 统计和操作按钮（同一行） */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.total-errors {
    font-weight: 600;
    color: #4a5568;
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-cancel, .btn-accept {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #edf2f7;
    transform: translateY(-1px);
}

.btn-accept {
    background: #38a169;
    color: white;
}

.btn-accept:hover {
    background: #2f855a;
    transform: translateY(-1px);
}

.corrections-list {
    flex: 1;
    overflow-y: auto;
    margin-right: -0.5rem;
    padding-right: 0.5rem;
}

.correction-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.correction-item:first-child {
    margin-top: 0;
}

.correction-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.correction-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.error-text {
    color: #e53e3e;
    font-weight: 600;
}

.arrow {
    color: #a0aec0;
}

.correct-text {
    color: #38a169;
    font-weight: 600;
}

.correction-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-accept-single, .btn-reject-single {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-accept-single {
    background: #38a169;
    color: white;
}

.btn-reject-single {
    background: #e53e3e;
    color: white;
}

.btn-reject-single:hover {
    background: #c53030;
}

.correction-reason {
    background: #edf2f7;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #4a5568;
    margin-top: 0.75rem;
    border-left: 3px solid #0ea5e9;
}

/* 新增错误项动画 */
.new-correction {
    animation: slideInFromTop 0.3s ease-out;
}

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

/* 检查状态消息 */
.checking-message {
    text-align: center;
    padding: 2rem;
    color: #4a5568;
    font-style: italic;
}

.checking-message::before {
    content: '🔍 ';
    font-style: normal;
    margin-right: 0.5rem;
}

.no-errors {
    text-align: center;
    padding: 2rem;
    color: #38a169;
    font-weight: 600;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 错误项交互高亮 */
.correction-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.correction-item-hover {
    background: #e6fffa !important;
    border-color: #4fd1c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 209, 199, 0.3);
}

.correction-item-blink {
    animation: correctionBlink 0.6s ease-in-out;
}

@keyframes correctionBlink {
    0%, 100% {
        background: #f7fafc;
        border-color: #e2e8f0;
    }
    50% {
        background: #e6fffa;
        border-color: #4fd1c7;
    }
}

/* 进度指示器 */
.progress-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.progress-bar {
    width: 300px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #14b8a6);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* 底部备案 */
.footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
}

.icp {
    color: #94a3b8;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.icp:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* 通用样式 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .right-panel {
        width: 100%;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .total-errors {
        text-align: center;
    }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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