/* 基础样式重置 */
* {
    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, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 主体内容区域 */
main {
    padding: 40px;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-description {
    color: #666;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

/* 差异对比区域 */


.file-stat i {
    margin-right: 5px;
}





/* 转换工具区域 */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
}

.converter-panel {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
}

.converter-panel h3 {
    background: #2ecc71;
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-container, .output-container {
    padding: 20px;
    background: white;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #4b6cb7;
}

.input-stats, .output-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.converter-controls, .output-controls {
    padding: 20px;
    background: #f1f3f5;
    border-top: 1px solid #e1e5eb;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 进度条 */
.progress-container {
    flex-grow: 1;
    background: #e1e5eb;
    border-radius: 8px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4b6cb7, #2ecc71);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* 输出显示区域 */
.output-display {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 200px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5eb;
    max-height: 400px;
    overflow-y: auto;
}

/* 规则说明区域 */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.rule-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e1e5eb;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.rule-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.rule-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.rule-card p {
    color: #666;
    font-size: 0.95rem;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: white;
    padding: 25px 40px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin: 8px 0;
    font-size: 0.95rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 差异高亮样式 */


/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .converter-controls, .output-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .progress-container {
        width: 100%;
    }
}