/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* 区块 */
.section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #2c3e50;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

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

.btn-outline {
    background: transparent;
    color: #007AFF;
    border: 2px solid #007AFF;
}

.btn-outline:hover {
    background: #007AFF;
    color: white;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #d0d7de;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: #007AFF;
    background: #f6f8ff;
}

.upload-area.dragover {
    border-color: #007AFF;
    background: #f6f8ff;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-area p {
    margin-bottom: 8px;
    font-size: 16px;
    color: #24292f;
}

.upload-hint {
    color: #656d76 !important;
    font-size: 14px !important;
}

/* 标签页 */
.input-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #e1e4e8;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #656d76;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #007AFF;
    border-bottom-color: #007AFF;
}

.tab-btn:hover {
    color: #007AFF;
}

.tab-content {
    display: none;
}

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

/* 文本输入区域 */
.text-input-area {
    position: relative;
}

/* 输入框头部 */
.input-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    min-height: 20px;
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#textInput:focus {
    outline: none;
    border-color: #007AFF;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.char-count {
    color: #656d76;
    font-size: 14px;
}

/* 信息显示 */
.words-info, .excel-info {
    background: #f6f8ff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.words-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.words-info-header p {
    margin: 0;
}

.words-preview {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    color: #656d76;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    height: auto;
}

/* 检测控制 */
.detection-controls {
    text-align: center;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    color: #656d76;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* 结果显示 */
.result-summary {
    background: #e8f5e8;
    border: 1px solid #a7d9a7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.result-summary p {
    font-size: 18px;
    font-weight: 500;
    color: #2d5e2d;
}

/* 高亮文本 */
#highlightedText {
    width: 100%;
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    min-height: 200px;
    font-size: 16px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
}

#highlightedText:focus {
    outline: none;
    border-color: #007AFF;
}

.sensitive-highlight {
    background: #ffebee;
    color: #c62828;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.sensitive-highlight.current {
    background: #e53e3e;
    color: white;
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2);
}

/* 导航控制 */
.navigation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

#currentIndex {
    color: #656d76;
    font-size: 14px;
}

/* 敏感词列表 */
.sensitive-words-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.sensitive-words-list h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

#sensitiveWordsList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sensitive-word-tag {
    background: #ffebee;
    color: #c62828;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* 处理选项 */
.process-options h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.option-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: #007AFF;
    background: #f6f8ff;
}

.option-item input[type="radio"] {
    margin-bottom: 8px;
}

.option-text {
    font-weight: 500;
    margin-bottom: 4px;
}

.option-example {
    color: #656d76;
    font-size: 14px;
}

.option-item input[type="radio"]:checked + .option-text {
    color: #007AFF;
}

/* 综合处理模式特殊样式 */
.comprehensive-mode {
    border-left: 4px solid #FF9500;
    background: linear-gradient(135deg, #fff7e6 0%, #fff2d9 100%);
}

.comprehensive-mode .option-text {
    color: #FF9500;
    font-weight: 600;
}

.comprehensive-mode .option-example {
    color: #B8860B;
    font-weight: 500;
}

/* 处理控制 */
.process-controls {
    text-align: center;
    margin-bottom: 24px;
}

/* 处理结果 */
.process-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.process-result h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.result-area {
    background: white;
    border-radius: 8px;
    padding: 16px;
}

#processedContent {
    min-height: 100px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 固定导航栏 */
.fixed-navigation {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #e1e4e8;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-content .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.nav-content #currentIndex {
    color: #656d76;
    font-size: 14px;
    white-space: nowrap;
}

/* 固定处理控制栏 */
.fixed-process-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #e1e4e8;
}

.action-content {
    display: flex;
    gap: 12px;
}

.action-content .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* 展开/收起按钮 */
.toggle-btn {
    margin-top: 12px;
    font-size: 14px;
    padding: 8px 16px;
}

/* 结果内容区域 */
.result-content {
    margin-top: 16px;
}

/* 结果底部操作 */
.result-bottom-actions {
    text-align: center;
    margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 24px 16px;
        margin-bottom: 24px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .upload-area {
        padding: 24px 16px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .fixed-navigation {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        padding: 10px 16px;
    }
    
    .nav-content {
        justify-content: center;
        gap: 12px;
    }
    
    .fixed-process-actions {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        padding: 10px 16px;
    }
    
    .action-content {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .input-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e1e4e8;
        border-radius: 0;
    }
    
    .tab-btn.active {
        background: #f6f8ff;
    }
} 