/* 基础布局样式 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0 0 0;
    width: 100%;
    display: block;
}

.tool-main-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    padding-left: 20px;
}

/* 侧边栏样式 */
.sidebar-section {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 16px;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section ul li {
    margin-bottom: 8px;
}

.sidebar-section ul li a {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-section ul li a:hover {
    background-color: #f0f9ff;
    color: #1890ff;
    border-color: #91d5ff;
}

.sidebar-section ul li a i {
    color: #1890ff;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* 输入区域样式 */
.input-section {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    /*background-color: #fafafa;*/
    /* border-bottom: 1px solid #e0e0e0; */
    border-radius: 8px 8px 0 0;
}

.section-header h1 {
    margin: 0;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

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

.clearfix label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin: 0;
}

.section-title {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.section-tools {
    display: flex;
    gap: 8px;
}

/* 代码容器样式 */
.code-container {
    display: flex;
    height: 400px;
    overflow: hidden;
    width: 100%;
    background-color: #fff;
    box-sizing: border-box;
}

.line-numbers {
    width: 50px;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 12px 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #999;
    user-select: none;
    text-align: right;
    overflow: hidden;
    white-space: pre;
    display: block;
    box-sizing: border-box;
    flex-shrink: 0;
}

.code-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    min-height: 200px;
    padding: 12px 16px;
    border: none;
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background-color: #fff;
    outline: none;
    box-sizing: border-box;
}

.code-output {
    flex: 1;
    min-width: 0;
    height: 100%;
    min-height: 200px;
    padding: 12px 16px;
    border: none;
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background-color: #fafafa;
    outline: none;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    box-sizing: border-box;
}

/* 工具专用样式 */
.tool-container {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    /* gap: 20px; */
    /* margin-bottom: 20px; */
}

.tool-panel {
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    border: none;
}

.tool-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 0;
    padding: 16px 20px;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    align-items: center;
}

.tool-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.btn-default {
    background-color: #e9ecef;
    color: #495057;
}

.btn-default:hover {
    background-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-top: 20px;
    }
    
    .tool-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .code-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .code-input,
    .code-output {
        font-size: 13px;
        padding: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tool-actions button {
        padding: 12px;
    }
}

/* 代码输入框聚焦样式 */
.code-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 单区域样式 */
.single-section {
    background-color: #fff;
    /* border: 1px solid #e0e0e0; */
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* 工具介绍区域样式 */
.tool-intro {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.tool-intro h3 {
    margin-bottom: 24px;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

.tool-intro h4 {
    margin: 32px 0 16px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.tool-intro p {
    margin-bottom: 20px;
    color: #666666;
    font-size: 16px;
    line-height: 1.8;
}

.tool-intro ul {
    margin-bottom: 24px;
    padding-left: 32px;
    color: #666666;
}
.tool-intro ol {
    margin-bottom: 24px;
    padding-left: 32px;
    color: #666666;
}
.tool-intro li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.7;
}

.tool-intro a {
    color: #00c48c;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.tool-intro a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00c48c;
    transition: width 0.3s ease;
}

.tool-intro a:hover {
    color: #00b07c;
    text-decoration: none;
}

.tool-intro a:hover::after {
    width: 100%;
}
/* 提示区域 */
.note {
    background-color: #f8f9fa;
    border-radius: 8px;
    border-top: 1px solid #e0e0e0;
    padding: 0 0 20px 0;
    /* margin-top: 25px; */
    border-left: 4px solid #00c48c;
    transition: all 0.3s ease;
}

.note:hover {
    background-color: #f0f7f5;
    box-shadow: 0 2px 10px rgba(0, 196, 140, 0.1);
}

/* 功能按钮区域 */
.function-buttons {
    margin: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 输出框样式 */
.output-text {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background-color: #f8f9fa;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    resize: none;
    transition: all 0.3s ease;
}

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

.btn-success {
    background-color: #00c48c;
    color: #fff;
}

.btn-success:hover {
    background-color: #00b37d;
    box-shadow: 0 4px 12px rgba(0, 196, 140, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ff7875;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
    transform: translateY(-1px);
}

/* 单区域样式增强 */
.tool-intro h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.tool-intro p {
    margin-bottom: 16px;
    color: #666;
    line-height: 1.7;
}

.tool-intro ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.tool-intro li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.6;
}

/* 文本工具专用样式 */

/* 工具栏样式 */
.toolbar {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
}

.toolbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.toolbar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.toolbar-left a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.toolbar-left a:hover,
.toolbar-left a.active {
    color: #007bff;
    font-weight: 500;
}

/* 选项设置区域样式 */
.input-section .options-section {
    padding: 16px 20px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    display: block;
}

.input-section .options-section .options-title {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 12px;
}

.input-section .options-section .option-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.input-section .options-section .option-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.input-section .options-section .option-item input[type="checkbox"] {
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

.input-section .options-section .option-item label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
}

/* 响应式设计 - 文本工具 */
@media (max-width: 768px) {
    .tool-main-content {
        flex-direction: column;
    }
    
    .input-section {
        width: 100%;
        margin-right: 0;
    }
    
    .input-section .options-section .option-group {
        flex-direction: column;
        gap: 12px;
    }
}
  /* 特效预览区域 */
        .preview-section {
            background-color: #f8f9fa;
            border: 1px solid #e0e0e0;
            /* border-radius: 8px; */
            padding: 40px;
            text-align: center;
            margin-bottom: 20px;
            min-height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .preview-text {
            font-size: 48px;
            font-weight: bold;
            text-align: center;
            line-height: 1.5;
        }
        
        /* 选项设置区域 */
      
        
        .effect-tabs {
            display: flex;
            border-bottom: 1px solid #e0e0e0;
            margin-bottom: 20px;
            overflow-x: auto;
        }
        
        .effect-tab {
            padding: 10px 20px;
            background-color: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #666;
            transition: all 0.3s ease;
            white-space: nowrap;
        }
        
        .effect-tab.active {
            color: #007bff;
            border-bottom-color: #007bff;
            background-color: #f0f9ff;
        }
        
        .effect-options {
            display: none;
        }
        
        .effect-options.active {
            display: block;
        }
      
        
        .option-label {
            min-width: 120px;
            margin-right: 12px;
            color: #333;
            font-size: 14px;
        }
        
        .option-control {
            flex: 1;
        }
        
        input[type="number"]{
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 14px;
            width: 100px;
        }
        
        select {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 14px;
            background-color: #fff;
        }
        
        input[type="color"] {
            width: 50px;
            height: 36px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            cursor: pointer;
        }
        
        /* CSS代码输出区域 */
        .css-output-section {
            background-color: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
        }
        
        .css-output-section .section-header {
            background-color: #f8f9fa;
        }
        
        .css-output {
            padding: 16px 20px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 14px;
            background-color: #f8f9fa;
            border-radius: 0 0 8px 8px;
            white-space: pre-wrap;
            overflow-x: auto;
            color: #333;
        }

                /* 间隔设置区域样式 */
        .spacing-options {
            background-color: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
        }
      
        /* 选项标签样式 */
        .option-checkbox-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-size: 14px;
            color: #333;
        }


        /* ASCII艺术字设置区域样式 */
        .ascii-options {
            background-color: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
        }
        

        
        /* 字体选择区域样式 */
        .font-selector {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-height: 200px;
            overflow-y: auto;
            padding: 8px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            background-color: #f8f9fa;
        }
        
        .font-option {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            background-color: #fff;
            transition: all 0.3s ease;
            flex: 0 0 auto;
        }
        
        .font-option:hover {
            background-color: #e9ecef;
            border-color: #adb5bd;
        }
        
        .font-option.active {
            background-color: #007bff;
            color: #fff;
            border-color: #007bff;
        }
        
        /* ASCII艺术字输出样式 */
        .ascii-output {
            font-family: 'Courier New', Courier, monospace;
            white-space: pre;
            line-height: 1.2;
            overflow-x: auto;
            padding: 16px;
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 4px;
            min-height: 200px;
            max-height: 400px;
            overflow-y: auto;
        }

         .CodeMirror {
            height: 100% !important;
            width: 100% !important;
            border: 1px solid #e1e5e9;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.6;
            background-color: #ffffff;
            border-radius: 0;
        }
        
        .CodeMirror-linenumber {
            color: #666;
            padding: 0 8px;
            background-color: #fafafa;
            border-right: 1px solid #e1e5e9;
        }
        
        .CodeMirror-focused {
            outline: none;
            border-color: #007bff;
            box-shadow: inset 0 0 0 2px rgba(0, 123, 255, 0.25);
        }
        
        .CodeMirror-scroll {
            overflow: auto;
        }
        
        /* 确保CodeMirror的内容区域背景也是白色 */
        .CodeMirror-gutters {
            background-color: #fafafa;
            border-right: 1px solid #e1e5e9;
        }
        
        .CodeMirror-viewport {
            background-color: #ffffff;
        }