* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.result {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0;
    background-color: transparent;
    border: none;
}

.bazi-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bazi-header {
    background-color: #f8f9fa;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.bazi-tabs {
    display: flex;
    justify-content: space-around;
    background-color: #333;
    color: #fff;
    padding: 0;
}

.bazi-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid #444;
}

.bazi-tabs .tab:last-child {
    border-right: none;
}

.bazi-tabs .active {
    background-color: #000;
    color: #f0c66a;
    font-weight: bold;
}

.bazi-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.bazi-name-age {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.bazi-date-line {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.bazi-gender-type {
    font-size: 16px;
    font-weight: bold;
    color: #d32f2f;
}

.bazi-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.bazi-table th {
    background-color: #fdfdfd;
    font-weight: normal;
    font-size: 14px;
    color: #888;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f0f0;
}

.bazi-table td {
    padding: 12px 5px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.shishen-row td {
    font-size: 14px;
    color: #555;
    background-color: #fafafa;
}

.wangxiang-row td {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background-color: #fff;
}

.hidden-row td, .substar-row td {
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 2px;
}

.hidden-cell div, .substar-cell div {
    margin-bottom: 2px;
}

.zhangsheng-row td, .selfsheng-row td {
    font-size: 15px;
    color: #333;
}

.kw-row td {
    font-size: 14px;
    color: #666;
}

.nayin-row td {
    color: #888;
}

.shensha-row td {
    font-size: 12px;
    line-height: 1.6;
    padding: 12px 2px;
    vertical-align: top;
    min-height: 60px; /* 增加最小高度 */
}

.shensha-item {
    margin-bottom: 6px;
    white-space: nowrap;
    font-weight: 500;
}

.shensha-good {
    color: #b8860b; /* 金金色/暗金色 */
}

.shensha-bad {
    color: #d32f2f; /* 红色 */
}

.shensha-item:last-child {
    margin-bottom: 0;
}

.shishen-row td:first-child,
.gan-row td:first-child,
.zhi-row td:first-child,
.wangxiang-row td:first-child,
.hidden-row td:first-child,
.zhangsheng-row td:first-child,
.substar-row td:first-child,
.selfsheng-row td:first-child,
.kw-row td:first-child,
.nayin-row td:first-child,
.shensha-row td:first-child {
    color: #999;
    font-size: 13px;
    background-color: #fdfdfd;
}

.gan-row td, .zhi-row td {
    font-family: "楷体", "STKaiti", "Serif";
}

.char-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.char-icon {
    font-size: 14px;
    margin-left: 2px;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.1));
}

.zs-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.zs-icon {
    font-size: 11px;
    opacity: 0.8;
}

.bazi-footer {
    padding: 20px;
    text-align: center;
    background-color: #fdfdfd;
}

.btn-back {
    padding: 10px 30px;
    background-color: #666;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #333;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        margin: 10px auto;
        padding: 15px;
    }
    .bazi-name-age {
        font-size: 16px;
    }
    .bazi-date-line {
        font-size: 12px;
    }
}
