/* 通用样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0; /* 柔和的亮灰色 */
    background-color: #1a1a1a; /* 深邃的背景色 */
    margin: 0;
    padding: 20px;
    background-image: url('https://i.imgur.com/your-apocalyptic-background-image.jpg'); /* 可替换为末日废土背景图 */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #00e676; /* 鲜绿色，代表晶核能量 */
    text-shadow: 0 0 5px rgba(0,230,118,0.5); /* 晶核发光效果 */
}

/* 链接样式 */
a {
    color: #00b0ff; /* 亮蓝色，科技感 */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #00c853; /* 鼠标悬停时的亮绿色 */
}

/* 主容器 */
.container {
    max-width: 1000px;
    margin: auto;
    background-color: rgba(42, 42, 42, 0.9); /* 半透明深灰色，突出内容 */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,230,118,0.5); /* 晶核边框光晕 */
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
}

/* Tab 导航 */
.tab-container {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #00e676;
    overflow-x: auto; /* 解决小屏幕下tab溢出问题 */
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    flex-shrink: 0; /* 防止按钮被压缩 */
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px 5px 0 0;
    margin-right: 5px; /* 按钮间距 */
}

.tab-button:hover {
    background-color: #4a4a4a;
}

.tab-button.active {
    background-color: #00e676;
    color: #1a1a1a;
    font-weight: bold;
    box-shadow: 0 -2px 10px rgba(0,230,118,0.7); /* 选中tab发光 */
}

/* Tab 内容 */
.tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #00e676;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #00e676;
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0,230,118,0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #00ff88;
    box-shadow: inset 0 0 8px rgba(0,255,136,0.5);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 预览框 */
.preview-box {
    background-color: #3a3a3a;
    border: 1px dashed #00e676; /* 虚线边框 */
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Monaco', monospace; /* 代码字体 */
    font-size: 0.9em;
    color: #90ee90; /* 浅绿色文本 */
    max-height: 300px; /* 限制高度并添加滚动条 */
    overflow-y: auto;
}

/* 复制按钮 */
.copy-button {
    background-color: #00e676;
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.copy-button:hover {
    background-color: #00c853;
    transform: translateY(-2px); /* 悬停上浮 */
}

.copy-button:active {
    transform: translateY(0); /* 点击下沉 */
}

/* 折叠面板 (Collapsible) */
.collapsible {
    background-color: #3a3a3a;
    color: #e0e0e0;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    margin-top: 8px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible:after {
    content: '\02795'; /* Unicode plus sign */
    font-size: 13px;
    color: #00e676;
    float: right;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.collapsible.active:after {
    content: '\2796'; /* Unicode minus sign */
    transform: rotate(180deg);
}

.collapsible.active, .collapsible:hover {
    background-color: #4a4a4a;
}

.content {
    padding: 0 18px;
    background-color: #2a2a2a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-radius: 0 0 5px 5px;
    margin-bottom: 8px;
}

.content p {
    margin-bottom: 10px;
    padding-top: 10px;
}

/* 按钮组 */
.button-group {
    margin-top: 15px;
    display: flex;
    gap: 10px; /* 按钮间距 */
    flex-wrap: wrap; /* 自动换行 */
}

.button-group button {
    background-color: #00e676;
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-grow: 1; /* 按钮填充空间 */
    min-width: 150px; /* 最小宽度 */
}

.button-group button:hover {
    background-color: #00c853;
    transform: translateY(-2px);
}

.button-group button:active {
    transform: translateY(0);
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #888;
}

/* 锻造师链接 */
.forge-link {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    color: #00e676;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,230,118,0.5);
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px;
    }
    .tab-container {
        flex-direction: column;
        border-bottom: none; /* 移除底部边框 */
    }
    .tab-button {
        border-radius: 5px;
        margin-bottom: 5px;
        width: 100%;
        margin-right: 0; /* 移除右侧间距 */
    }
    .tab-button.active {
        box-shadow: 0 0 10px rgba(0,230,118,0.7); /* 调整选中tab发光 */
    }
    .form-group input[type="text"],
    .form-group textarea,
    .form-group select {
        width: calc(100% - 20px); /* 调整宽度以适应内边距 */
    }
}

@media (max-width: 480px) {
    .button-group button {
        min-width: unset; /* 移除最小宽度限制 */
        width: 100%; /* 按钮宽度100% */
    }
}