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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: #1890ff;
    margin-bottom: 30px;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

/* 上传区域样式 */
.upload-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.upload-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.word-list-status {
    color: #666;
    font-size: 14px;
}

.default-status {
    color: #1890ff;
    margin-left: 10px;
    font-style: italic;
}

/* 检测区域样式 */
.check-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    margin-bottom: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 结果区域样式 */
.result-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.stat-item {
    flex: 1;
    background: #f8f8f8;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.results {
    min-height: 100px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
    margin-top: 15px;
}

.placeholder {
    color: #999;
    text-align: center;
}

/* 违禁词结果样式 */
.violation-item {
    padding: 10px;
    margin: 5px 0;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
}

.violation-word {
    color: #ff4d4f;
    font-weight: bold;
}

.violation-position {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

/* 按钮样式 */
button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

#uploadBtn, #checkBtn {
    background-color: #1890ff;
    color: white;
}

#clearBtn {
    background-color: #f5f5f5;
    color: #666;
}

button:hover {
    opacity: 0.8;
}

/* 文件输入框样式 */
input[type="file"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1890ff;
    margin-top: 5px;
}

.result-area {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.banned {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
}

.sensitive {
    background-color: #fff7e6;
    border: 1px solid #ffe7ba;
}

.word-type {
    font-weight: bold;
}

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

.file-upload {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-upload h3 {
    margin-bottom: 10px;
}

.file-format-note {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.category-block {
    margin-bottom: 20px;
    background-color: white;
    border-radius: 4px;
    padding: 15px;
}

.category-title {
    font-size: 16px;
    color: #1890ff;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e8e8e8;
}

.general {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
}

.topic {
    background-color: #fff7e6;
    border: 1px solid #ffe7ba;
}

.behavior {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
}

.marketing {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
}

/* 原文显示样式 */
.original-text {
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 2;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 违禁词高亮样式 */
.highlight {
    background-color: #ff4d4f;
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    margin: 0 2px;
    cursor: pointer;
    position: relative;
}

/* 违禁词提示 */
.highlight:hover::after {
    content: attr(data-position);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.violation-summary {
    margin-bottom: 15px;
    padding: 10px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
}

.violation-summary-title {
    font-weight: bold;
    color: #ff4d4f;
    margin-bottom: 5px;
}

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

.violation-list li {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
} 