/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: '微软雅黑', 'Microsoft YaHei', Consolas, Monaco, 'Courier New', monospace;
    background-color: #F5F5F5;
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部头部 */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img { 
    width: 35px;
    height: 35px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #2E7D32;
}

/* 导航栏 */
.nav {
    background-color: transparent;
    border: none;
}

.nav-content {
    display: flex;
    gap: 4px;
}

.nav-item {
    padding: 18px 24px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.nav-item:hover {
    background-color: transparent;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
}

.nav-item.active {
    background-color: transparent;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
}

.nav-item[href]:hover {
    background-color: transparent;
    color: #2E7D32;
    border-bottom: 2px solid #2E7D32;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin: 0;
    width: 100%;
    padding: 0;
}

.tab-content {
    display: none;
    min-height: calc(100vh - 180px);
    width: 100%;
}


.tab-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* 板块标题外层容器 */
.section-title-wrapper {
    width: 100%;
}

/* 板块标题 */
.section-title {
    text-align: center;
    padding: 30px;
}

.section-title h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #333333;
    font-weight: 600;
}

.section-title .section-desc {
    margin: 0;
    font-size: 14px;
    color: #666666;
    font-weight: 400;
}

/* 卡片样式 */
.card {
    background-color: transparent;
    border-radius: 6px;
    margin-bottom: 0;
}

.card-header {
    padding: 20px 24px 0px 0px;
    /* border-bottom: 1px solid #F0F0F0; */
    display: flex;
    /* justify-content: center; */
}

.card-body {
    background-color: transparent;
}

.card-header h2 {
    font-size: 24px;
    color: #333333;
    font-weight: 600;
    margin: 20px 0;
}

.label-row label,
.code-container-label label {
    font-size: 24px;
    color: #333333;
    font-weight: 600;
}

.help-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #4CAF50;
    background-color: #FFFFFF;
    color: #4CAF50;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-btn:hover {
    background-color: #4CAF50;
    color: #FFFFFF;
}

/* .card-body {
    padding: 24px;
} */

/* 输入组 */
.input-group {
    margin-bottom: 20px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.format-options-inline {
    display: flex;
    align-items: center;
}

.label-row label {
    font-size: 1.2em;
    color: #374151;
    font-weight: 600;
}

.compress-toggle-btn {
    padding: 8px 30px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
}
.compress-toggle-btn:hover {
    background-color: #0b7dda;
}

.compress-btn,
.clear-btn {
    padding: 8px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    border: none;
}
.compress-btn {
    background-color: #2196F3;
    color: white;
}
.compress-btn:hover {
    background-color: #0b7dda;
}
.clear-btn {
    background-color: #d32f2f;
    color: white;
}
.clear-btn:hover {
    background-color: #b71c1c;
}

.text-input-container {
    position: relative;
}

.code-container-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.code-container-label label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 0;
}

.input-group textarea,
.input-group input[type="text"],
.text-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #FFFFFF;
    font-family: '微软雅黑', 'Microsoft YaHei';
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5em;
}

.input-group textarea:focus,
.input-group input[type="text"]:focus,
.text-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #2E7D32;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #0f1a31;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.btn-secondary {
    background-color: #4CAF50;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background-color: #0f1a31;
}

.btn-outline {
    background-color: #FFFFFF;
    color: #2E7D32;
    border: 1px solid #2E7D32;
}

.btn-outline:hover {
    background-color: #E8F5E9;
    border-color: #0f1a31;
    color: #0f1a31;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* justify-content: center; */
}

/* 选项行 */
.options-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.encrypt-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-group label {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    white-space: nowrap;
}

.option-group button {
    align-self: center;
}

.option-group select {
    padding: 8px 4px 8px 4px;
    border: none;
    border-radius: 6px;
    background-color: #FFFFFF;
    cursor: pointer;
    outline: none;
}

/* 自定义下拉框样式 */
.custom-select {
    position: relative;
    min-width: 120px;
    display: inline-block;
}

.select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 3px 5px 6px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.select-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.selected-value {
    font-size: 14px;
    color: #333333;
}

.select-arrow {
    font-size: 10px;
    color: #666666;
    transition: transform 0.2s ease;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 0 0 6px 6px;
    z-index: 9999;
    display: none;
    margin-top: -2px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-select.open .select-dropdown {
    display: block;
}

.select-option {
    padding: 8px 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333333;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.select-option:hover {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.select-option.selected {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2E7D32;
    font-weight: 500;
}

.option-group input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* 代码展示区域 */
.code-container pre {
    font-size: 14px;
    font-family: Consolas, '微软雅黑', Monaco, 'Courier New', monospace;
    padding: 16px;
    margin: 0;
    color: #000000;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* URL结果区域 */
.url-result {
    margin-top: 20px;
}

.url-result h3,
.url-result h4 {
    margin-bottom: 12px;
    color: #333333;
}

.info-group {
    margin-bottom: 16px;
}

.info-group label {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    display: block;
    margin-bottom: 4px;
}

.params-table {
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.param-row {
    display: grid;
    grid-template-columns: 2fr 2fr 120px;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #F0F0F0;
    align-items: center;
}

.param-row:last-child {
    border-bottom: none;
}

.param-header {
    background-color: #F5F5F5;
    font-weight: 600;
}

.param-name,
.param-value {
    padding: 8px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    font-size: 13px;
}

.param-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.param-actions button {
    padding: 4px 12px;
    font-size: 12px;
}

/* IP结果区域 */
.ip-result {
    flex: 1;
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    overflow: auto;
}

.ip-result h3 {
    margin-bottom: 16px;
    color: #333333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}


.info-item {
    background-color: #FFFFFF;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item label {
    font-size: 13px;
    color: #666666;
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.info-item .info-value {
    font-size: 14px;
    font-family: Consolas, 微软雅黑, Monaco, "Courier New", monospace;
    color: #333333;
    border: none;
    padding: 0;
    background: none;
    font-weight: 500;
    border-radius: 4px;
}

/* 页脚 */
.footer {
    background-color: #FFFFFF;
    border-top: 1px solid #E0E0E0;
    padding: 11px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 4px;
}

.footer-content p a {
    color: #666666;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.footer-content p a:hover {
    color: #2E7D32;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #F3F3F3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    right: 43%;
    padding: 16px 24px;
    background-color: #4CAF50;
    color: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background-color: #f44336;
}

.toast.success {
    background-color: #4CAF50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        height: auto;
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .nav-content {
        flex-direction: row;
        padding: 0 12px;
    }
    
    .nav-item {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 20px 12px;
    }
    
    .card-header h2 {
        font-size: 20px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .param-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .options-row {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .user-area {
        flex-direction: column;
        width: 100%;
    }
    
    .user-area .btn {
        width: 100%;
    }
    
    .input-group textarea {
        font-size: 13px;
    }
    
    .code-container pre {
        font-size: 12px;
    }
}

/* ========== 子页面样式 ========== */

/* 关于我们页面 */
.about-content {
    padding: 20px 0;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h3 {
    font-size: 20px;
    color: #2E7D32;
    margin-bottom: 16px;
    font-weight: 600;
}

.about-section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    font-size: 14px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.feature-list li:before {
    content: "✓";
    left: 0;
    margin-right: 4px;
    color: #2E7D32;
    font-weight: bold;
}

.contact-info {
    background-color: #F8F9FA;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #2E7D32;
    font-size: 14px;
}

.contact-item {
    margin-bottom: 16px;
    line-height: 1.8;
    color: #555;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item a {
    color: #2E7D32;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* 知识分享页面 */
.knowledge-list {
    padding: 20px 0;
}

.knowledge-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E0E0E0;
    overflow: hidden;
}

.knowledge-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.knowledge-link {
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.knowledge-link:hover {
    transform: translateX(8px);
}

.knowledge-link h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.knowledge-link:hover h3 {
    color: #2E7D32;
}

.knowledge-link p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.knowledge-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 文章详情页面 */
.article-content {
    padding: 20px 0;
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}

.article-intro {
    background-color: #F8F9FA;
    padding: 16px;
    border-left: 4px solid #2E7D32;
    border-radius: 4px;
    margin-bottom: 24px;
}

.article-content h3 {
    font-size: 20px;
    color: #2E7D32;
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
}

.article-steps,
.feature-list {
    padding-left: 24px;
    margin-bottom: 24px;
}

.article-steps li,
.feature-list li {
    margin-bottom: 12px;
    padding-left: 8px;
    line-height: 1.7;
    font-size: 14px;
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.code-block {
    background-color: #2D2D2D;
    color: #F8F8F2;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
    line-height: 1.6;
}

.code-block code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.warning-box {
    background-color: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
}

.warning-box p,
.warning-box ul {
    margin-bottom: 12px;
}

.warning-box ul {
    padding-left: 24px;
    margin-bottom: 0;
}

.article-tip {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    line-height: 1.7;
}

.article-tip ul {
    padding-left: 24px;
    margin-bottom: 0;
}

.back-link {
    text-align: center;
    margin: 32px 0;
}

.back-link a {
    display: inline-block;
    padding: 10px 24px;
    background-color: #2E7D32;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-link a:hover {
    background-color: #1B5E20;
}

/* 表格样式 */
.aes-table,
.json-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.aes-table thead,
.json-table thead {
    background-color: #2E7D32;
    color: white;
}

.aes-table th,
.aes-table td,
.json-table th,
.json-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #E0E0E0;
}

.aes-table tbody tr:nth-child(even),
.json-table tbody tr:nth-child(even) {
    background-color: #F8F9FA;
}

.aes-table tbody tr:hover,
.json-table tbody tr:hover {
    background-color: rgba(46, 125, 50, 0.1);
}

/* ==================== JSON树形视图样式 ==================== */
.json-tree-container {
    font-family: 'Consolas', '微软雅黑', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #000000;
    padding: 16px;
    white-space: pre;
}

.json-node {
    position: relative;
    display: block;
}

/* .json-node-inline {
    position: relative;
    display: inline-block;
} */

.json-toggle {
    position: absolute;
    left: -1.3em;
    width: 1em;
    height: 1.6em;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #717171;
    z-index: 10;
    transition: all 0.2s ease;
}

/* 根节点的折叠符号，不使用负偏移 */

.json-node-inline .json-toggle {
    float: left;;
}

.json-item {
    position: relative;
    padding: 2px 0;
}

.json-toggle::before {
    content: '▼';
    font-size: 15px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.json-toggle-collapsed::before {
    content: '▼';
    font-size: 15px;
    transform: rotate(-90deg);
}

.json-children {
    display: block;
    margin-left: 1.5em;
}

.json-children.json-collapsed {
    display: none;
}

.json-item {
    position: relative;
    padding: 2px 0;
}

.json-key {
    color: #313131;
    font-family: Consolas, 微软雅黑, Monaco, "Courier New", monospace;;
    font-weight: 500;
    float: left;
}

.json-colon {
    color: #666;
    margin-right: 0.3em;
    float: left;
}

.json-string {
    color: #0c9712;
}

.json-number {
    color: #ff6600;
}

.json-boolean {
    color: #d32f2f;
    font-weight: 600;
}

.json-null {
    color: #999;
    font-style: italic;
}

.json-bracket {
    color: #333;
    font-weight: 600;
}

.json-bracket-open:first-child {
    margin-left: 1.5em !important;
}

.json-bracket-open {
    color: #333;
    font-weight: 600;
}

.json-bracket-close {
    color: #333;
    font-weight: 600;
}

.json-comma {
    color: #666;
}

/* ==================== Python语法高亮样式 ==================== */
.python-keyword,.python-builtin {
    color: #50a14f;
}

.python-string {
    color: #a31515;
    /* e45649 */
}

.python-number {
    color: #e45649;
}

.python-comment {
    color: #9E9E9E;
    font-style: italic;
}

.python-function {
    color: #4CAF50;
    font-weight: 600;
}

.python-class {
    color: #4CAF50;
    font-weight: 600;
}

.python-decorator {
    color: #FF8A65;
    font-weight: 600;
}

.python-variable {
    color: #2E7D32;
}

/* 悬停高亮 */
/* .json-item:hover {
    background-color: rgba(46, 125, 50, 0.03);
} */

/* 折叠状态的括号样式 */
.json-toggle-collapsed + .json-bracket-open {
    color: #2E7D32;
}

/* 折叠时隐藏结束括号和逗号 */
.json-node[data-collapsed="true"] .json-bracket-close,
.json-node[data-collapsed="true"] .json-comma,
.json-node-inline[data-collapsed="true"] .json-bracket-close,
.json-node-inline[data-collapsed="true"] .json-comma {
    display: none !important;
}

/* 确保最外层容器适应父容器 */
.code-container #pythonOutput.json-tree-container {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

/* 加密结果算法名称样式 */
.algorithm-name {
    color: #2E7D32;
    font-weight: 600;
}

.three-column-layout {
            display: flex;
            height: calc(100vh - 50px);
            width: 100%;
            min-height: 0;
        }

        .left-panel {
            width: 220px;
            background-color: #ffffff;
            border-right: 1px solid #e0e0e0;
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .logo-section {
            padding: 20px;
            border-bottom: 1px solid #e0e0e0;
            text-align: center;
        }

        .logo-section .logo-link {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo-section .logo-text {
            font-size: 20px;
            font-weight: bold;
            color: #2E7D32;
        }

        .nav-section {
            flex: 1;
            padding: 20px 0;
            overflow-y: auto;
        }

        .nav-section .nav-content {
            flex-direction: column;
            gap: 2px;
        }

        .nav-section .nav-item {
            width: 100%;
            padding: 12px 20px;
            text-align: left;
            border-bottom: none;
            border-left: 3px solid transparent;
        }

        .nav-section .nav-item:hover {
            border-left-color: #2E7D32;
            border-bottom: none;
            background-color: #f5f5f5;
        }

        .nav-section .nav-item.active {
            border-left-color: #2E7D32;
            border-bottom: none;
            background-color: #e8f5e9;
            color: #2E7D32;
        }

        .center-panel {
            flex: 1;
            background-color: #fafafa;
            padding: 10px 10px 0 10px;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .right-panel {
            flex: 1;
            background-color: #fafafa;
            padding: 10px 10px 0 10px;
            display: flex;
            flex-direction: column;
            min-width: 0;
            border-left: 1px solid #e0e0e0;
        }

        .tab-content {
            display: none;
            height: 100%;
        }

        .tab-content.active {
            display: flex;
            flex-direction: column;
        }

        .code-container-label label {
            font-weight: 600;
            color: #333;
            font-size: 14px;
        }

        #compare .center-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-height: 0;
        }

        /* 文本对比专用右侧面板布局 */
        #comparePanel {
            display: flex;
            flex-direction: column;
            height: 100%;
            gap: 12px;
            overflow: hidden;
            border-top: 1px solid #e0e0e0;
        }

        /* 对比数据输入区域 (右侧上半部) */
        .compare-right-input-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            background: #fff;
            border-radius: 6px;
            /* border: 1px solid #e0e0e0; */
            overflow: hidden;
        }

        .compare-right-input-area .label-row {
            padding: 8px 12px;
            background: #f8f8f8;
            /* border-bottom: 1px solid #e0e0e0; */
            margin-bottom: 0;
        }

        /* 对比数据编辑区域 */
        .compare-editor-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
        }

        .compare-editor-wrapper .compare-editor-container {
            flex: 1;
            display: flex;
            border: 1px solid #ddd;
            border-radius: 4px;
            overflow: hidden;
            background-color: #ffffff;
            position: relative;
            min-height: 0;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .compare-editor-wrapper .compare-editor-container:focus-within {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
        }

        .compare-editor-wrapper textarea {
            flex: 1;
            padding: 12px;
            border: none;
            resize: none;
            outline: none;
            overflow: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 13px;
            line-height: 1.5;
            color: #333;
            background: transparent;
            font-family: inherit;
        }

        /* 编辑区行号 */
        .compare-editor-wrapper .editor-line-numbers {
            width: 50px;
            background-color: #f5f5f5;
            border-right: 1px solid #ddd;
            padding: 12px 8px;
            text-align: right;
            font-size: 13px;
            color: #999;
            line-height: 1.5;
            user-select: none;
            overflow: hidden;
            flex-shrink: 0;
        }

        .editor-line-numbers {
            width: 50px;
            background-color: #f5f5f5;
            border-right: 1px solid #ddd;
            padding: 12px 8px;
            text-align: right;
            font-size: 13px;
            color: #999;
            line-height: 1.5;
            user-select: none;
            overflow: hidden;
            flex-shrink: 0;
        }

        .compare-editor-container textarea {
            flex: 1;
            padding: 12px;
            border: none;
            resize: none;
            outline: none;
            overflow: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 13px;
            line-height: 1.5;
            color: #333;
            background: transparent;
            font-family: inherit;
        }

        /* 差异显示区域 (右侧下半部) */
        .compare-diff-area {
            flex: 1.5;
            display: flex;
            flex-direction: column;
            min-height: 0;
            background: #fff;
            border-radius: 6px;
            overflow: hidden;
        }

        .diff-header {
            justify-content: space-between;
            text-align: right;
            padding: 13px 12px;
            background: #f8f8f8;
            border-bottom: 1px solid #e0e0e0;
        }

        .diff-legend {
            gap: 15px;
            font-size: 12px;
            color: #666;
        }

        .diff-legend span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .diff-display-wrapper {
            flex: 1;
            display: flex;
            overflow: hidden;
            min-height: 0;
        }

        .diff-display-wrapper .compare-input-container {
            flex: 1;
            display: flex;
            border: none;
            border-radius: 0;
            overflow: auto;
            background-color: #ffffff;
        }

        .diff-display-wrapper .line-numbers {
            width: 50px;
            background-color: #f5f5f5;
            border-right: 1px solid #ddd;
            padding: 12px 8px;
            text-align: right;
            font-size: 13px;
            color: #999;
            line-height: 1.5;
            user-select: none;
            overflow: hidden;
            flex-shrink: 0;
        }

        #diffDisplay {
            flex: 1;
            padding: 12px;
            margin: 0;
            overflow: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 13px;
            line-height: 1.5;
            color: #333;
            background: #ffffff;
            outline: none;
        }

        #diffDisplay .diff-line {
            display: block;
            min-height: 1.5em;
            line-height: 1.5;
            padding: 0;
        }

        #diffDisplay .diff-line.different {
            background-color: rgba(211, 47, 47, 0.3);
        }

        #diffDisplay .diff-line.missing-line {
            background-color: rgba(255, 152, 0, 0.3);
            min-height: 1.5em;
            line-height: 1.5;
        }

        /* 原始数据输入区域样式 (保持与其他输入框一致) */
        .compare-input-container {
            flex: 1;
            display: flex;
            border: 1px solid #ddd;
            border-radius: 4px;
            overflow: hidden;
            background-color: #ffffff;
            position: relative;
            min-height: 0;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .compare-input-container:focus-within {
            outline: none;
            border-color: #4CAF50;
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
        }

        .compare-input-container .line-numbers {
            width: 50px;
            background-color: #f5f5f5;
            border-right: 1px solid #ddd;
            padding: 12px 8px;
            text-align: right;
            font-size: 13px;
            color: #999;
            line-height: 1.5;
            user-select: none;
            overflow: hidden;
            flex-shrink: 0;
        }

        .input-wrapper {
            flex: 1;
            position: relative;
            overflow: hidden;
            min-height: 0;
        }

        .input-wrapper #compareInput1 {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            padding: 12px;
            margin: 0;
            border: none;
            resize: none;
            outline: none;
            background: transparent;
            overflow: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            font-size: 13px;
            line-height: 1.5;
            color: #333;
        }

        /* 通用样式 */
        .input-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            margin-bottom: 0;
            min-height: 0;
        }

        .label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .label-row label {
            font-weight: 600;
            color: #333;
            font-size: 14px;
        }

        .copy-btn,
        .clear-btn,
        .compress-btn {
            padding: 8px 30px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }

        .copy-btn {
            background-color: #2E7D32;
            color: white;
        }

        .copy-btn:hover {
            background-color: #1B5E20;
        }

        .clear-btn {
            background-color: #d32f2f;
            color: white;
        }

        .clear-btn:hover {
            background-color: #b71c1c;
        }

        .compress-btn {
            background-color: #6e56cf;
            color: white;
            margin-right: 8px;
        }

        .compress-btn:hover {
            background-color: #5432dd;
        }

        textarea {
            flex: 1;
            border: none;
            outline: none;
        }

        .code-container-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            flex-direction: row-reverse;
        }

        .code-container {
            flex: 1;
            background-color: #ffffff;
            border-radius: 4px;
            overflow: auto;
            min-height: 0;
        }

        /* 加密工具选项 */
        .encrypt-options {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 10px;
        }

        .option-group {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .option-group label {
            font-size: 13px;
            color: #666;
            font-weight: 500;
        }

        .option-group input[type="text"] {
            padding: 8px 0px 8px 4px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 150px;
            outline: none;
        }

        #operationType, #encryptMode {
            min-width: 70px;
            width: 85px;
        }

        .custom-select {
            position: relative;
            min-width: 120px;
            display: inline-block;
        }

        .select-arrow {
            font-size: 10px;
            color: #999;
        }

        .select-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            z-index: 9999;
            max-height: 250px;
            overflow-y: auto;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .custom-select.open .select-dropdown {
            display: block;
        }

        .select-option {
            padding: 8px 10px;
            cursor: pointer;
            font-size: 13px;
        }

        .select-option:hover {
            background-color: #f5f5f5;
        }

        .select-option.selected {
            background-color: #e8f5e9;
            color: #2E7D32;
        }

        .timestamp-result {
            flex: 1;
            background-color: #fff;
            border-radius: 4px;
            padding: 20px;
            overflow: auto;
        }

        #compareResult {
            display: none;
        }