/* 布局样式 */
header {
    background: linear-gradient(135deg, #6a11cb 0%, var(--primary-color) 100%);
    color: white;
    padding: 15px 25px; /* 减少内边距 */
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px; /* 减少底部间距 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 减小阴影 */
}

h1 {
    font-size: 1.8rem; /* 减小字体大小 */
    margin-bottom: 0; /* 移除底部间距 */
    font-weight: 600;
}

.subtitle {
    display: none;
}
/* 导航按钮组 */
.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

/* 输出区域 */
/*.output-container {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    height: 500px;*/
/*    min-height: 400px;*/
/*}*/

/*.output-content {*/
/*    flex: 1;*/
/*    overflow: auto;*/
/*    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;*/
/*    white-space: pre-wrap;*/
/*    background: #f8fafc;*/
/*    padding: 20px;*/
/*    font-size: 0.95rem;*/
/*    line-height: 1.5;*/
/*}*/

/* 输出容器 - 固定高度 */
.output-container {
    display: flex;
    flex-direction: column;
    height: 500px; /* 固定高度 */
    min-height: 400px;
}

/* 输出内容 - 竖向滚动，横向自动换行 */
.output-content {
    flex: 1;
    overflow-x: hidden; /* 隐藏横向滚动 */
    overflow-y: auto;   /* 竖向滚动 */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    background: #f8fafc;
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-all;
    overflow-wrap: break-word;
}

.header-left {
    display: flex;
    align-items: center;
}

.control-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 编码工具 */
.encode-tools {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    display: none;
}

.encode-tools.active {
    display: block;
}

.encode-tool {
    margin-bottom: 20px;
}

.encode-tool:last-child {
    margin-bottom: 0;
}

.encode-tool label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
}

.encode-input-group {
    display: flex;
    gap: 10px;
}

.encode-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: monospace;
}

.encode-btn-small {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

.encode-btn-small:hover {
    background: var(--primary-dark);
}

/* 模块容器 */
#modules-container {
    position: relative;
    min-height: 120px;
}

.module-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.module-content.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .nav-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .encode-input-group {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .control-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        justify-content: center;
    }
}