/* 代码格式化样式 */
.formatter-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.language-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lang-tab {
    padding: 8px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-tab:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.lang-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.code-textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #f7fafc;
}

.code-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.option-item label {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.option-item input[type="checkbox"],
.option-item input[type="number"] {
    cursor: pointer;
}

.option-item input[type="number"] {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.result-code {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    color: #2d3748;
    white-space: pre-wrap;
    word-break: break-all;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    max-height: 500px;
    overflow-y: auto;
}

.stats-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .language-tabs {
        gap: 5px;
    }

    .lang-tab {
        flex: 1;
        min-width: 80px;
        text-align: center;
        padding: 8px 10px;
        font-size: 13px;
    }

    }