/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a2e; /* 深蓝色背景 */
    color: #e0e0e0; /* 亮灰色文字 */
    line-height: 1.6;
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 容器样式 */
.container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #16213e; /* 较深的蓝色背景 */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); /* 阴影效果 */
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #e94560; /* 亮红色标题 */
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 8px #e94560; /* 标题发光效果 */
}

.header p {
    color: #c0c0c0; /* 浅灰色副标题 */
    font-size: 1.1em;
}

/* 底部链接样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    color: #888;
}

.footer a {
    color: #e94560; /* 链接颜色 */
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Tab导航样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap; /* 适应小屏幕 */
}

.tab-button {
    background-color: #0f3460; /* 深蓝色按钮 */
    color: #e0e0e0;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    margin: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.tab-button:hover {
    background-color: #e94560; /* 悬停亮红色 */
    color: #fff;
}

.tab-button.active {
    background-color: #e94560; /* 激活亮红色 */
    color: #fff;
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.7); /* 激活发光效果 */
}

/* Tab内容样式 */
.tab-content {
    display: none;
    animation: fadeIn 0.5s forwards; /* 淡入动画 */
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 标题样式 */
h2 {
    color: #e94560;
    border-bottom: 2px solid #0f3460;
    padding-bottom: 10px;
    margin-top: 30px;
    text-shadow: 0 0 5px rgba(233, 69, 96, 0.5);
}

h3 {
    color: #e94560;
    margin-top: 20px;
}

/* 段落、列表样式 */
p, ul, ol {
    margin-bottom: 10px;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
}

ol {
    list-style-type: decimal;
    margin-left: 20px;
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #c0c0c0;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: calc(100% - 22px); /* 减去padding和border的宽度 */
    padding: 10px;
    border: 1px solid #0f3460;
    border-radius: 5px;
    background-color: #0f3460;
    color: #e0e0e0;
    font-size: 1em;
    box-sizing: border-box; /* 确保padding和border不增加额外宽度 */
}

.form-group input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #e94560; /* 改变checkbox颜色 */
}

/* 预览区样式 */
.preview-area {
    background-color: #0f3460;
    border: 1px solid #e94560; /* 亮红色边框 */
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    white-space: pre-wrap; /* 保留空白符和换行 */
    word-wrap: break-word; /* 自动换行 */
    max-height: 400px;
    overflow-y: auto; /* 溢出时显示滚动条 */
    color: #00ff00; /* 终端绿色文字 */
    font-family: 'Consolas', 'Monaco', monospace; /* 等宽字体 */
}

/* 按钮组样式 */
.button-group {
    text-align: center;
    margin-top: 20px;
}

.action-button {
    background-color: #e94560;
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin: 5px;
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.5);
}

.action-button:hover {
    background-color: #d43c52;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    .header h1 {
        font-size: 2em;
    }
    .tab-button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .form-group input[type="text"],
    .form-group textarea,
    .form-group select {
        width: calc(100% - 20px); /* 调整宽度 */
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    .tabs {
        flex-direction: column; /* 垂直排列按钮 */
    }
    .tab-button {
        width: calc(100% - 10px); /* 按钮占满宽度 */
        margin: 5px 0;
    }
}