/* 资料网页面 */
.resource-page {
    background: #fff;
    min-height: 100vh;
}

.resource-banner img {
    width: 100%;
    display: block;
    vertical-align: top;
}

.resource-nav {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    background: var(--rs-nav-bg, #008040);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.resource-nav::-webkit-scrollbar {
    display: none;
}

.resource-nav-item {
    flex: 1 0 auto;
    min-width: max-content;
    padding: 10px 12px;
    color: var(--rs-nav-text, #fff);
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
}

.resource-nav-item:active {
    opacity: 0.85;
}

.resource-nav-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

.resource-draw-wrap {
    padding: 0 10px 8px;
    background: #fff;
}

.resource-draw-wrap .draw-card {
    margin-top: 8px;
}

.resource-draw-wrap .draw-card-head {
    flex-wrap: wrap;
    gap: 6px;
}

.resource-sections {
    padding: 0 0 16px;
}

.resource-section {
    margin-bottom: 10px;
    scroll-margin-top: var(--resource-nav-height, 40px);
}

.resource-section-head {
    margin: 0 8px;
    padding: 8px 10px;
    background: var(--rs-header-bg, #009944);
    color: var(--rs-header-text, #ffff00);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.resource-section-body {
    margin: 0 8px;
    border: 1px solid var(--rs-row-border, #b8dfc8);
    border-top: none;
    background: #fff;
}

.resource-entry-row {
    padding: 8px 10px;
    border-bottom: 1px solid var(--rs-row-border, #b8dfc8);
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    word-break: break-word;
}

.resource-entry-row:last-child {
    border-bottom: none;
}

.resource-entry-empty {
    color: #999;
}

.resource-section-html {
    padding: 0;
    color: #333;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    word-break: break-word;
}

.resource-section-html p {
    margin: 0;
    padding: 8px 10px;
    border-bottom: 1px solid var(--rs-row-border, #b8dfc8);
}

.resource-section-html p:last-child {
    border-bottom: none;
}

.resource-section-html div {
    padding: 8px 10px;
    border-bottom: 1px solid var(--rs-row-border, #b8dfc8);
}

.resource-section-html div:last-child {
    border-bottom: none;
}

.resource-section-html table {
    width: calc(100% - 20px);
    margin: 8px auto;
    border-collapse: collapse;
    font-size: 13px;
}

.resource-section-html th,
.resource-section-html td {
    border: 1px solid var(--rs-row-border, #b8dfc8);
    padding: 6px 8px;
}

.resource-section-html img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.resource-section-html ul,
.resource-section-html ol {
    margin: 0;
    padding: 8px 10px 8px 28px;
    text-align: left;
    border-bottom: 1px solid var(--rs-row-border, #b8dfc8);
}

.resource-section-html a {
    color: #1565c0;
}

/* 资料网底部参考图（图一、图二） */
.resource-ref-block {
    margin: 0 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
}

.resource-ref-chart2 {
    margin-top: 12px;
}

.resource-ref-title {
    padding: 8px 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #ddd;
    background: #fafafa;
}

.ref-zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #ddd;
}

.ref-zodiac-cell {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 6px 4px 8px;
    min-height: 88px;
}

.ref-zodiac-cell:nth-child(4n) {
    border-right: none;
}

.ref-zodiac-cell:nth-last-child(-n+4) {
    border-bottom: none;
}

.ref-zodiac-head {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 4px;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.2;
}

.ref-zodiac-name {
    font-weight: 700;
    color: #222;
}

.ref-zodiac-icon {
    font-size: 14px;
}

.ref-zodiac-clash {
    color: #666;
    font-size: 11px;
}

.ref-ball-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
}

.ref-ball {
    --ref-ball-size: 24px;
    width: var(--ref-ball-size);
    height: var(--ref-ball-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: center / 100% 100% no-repeat;
    font-size: 11px;
    font-weight: 800;
    color: #111;
    flex-shrink: 0;
}

.ref-ball.ball-red {
    background-image: url('../images/balls/ball-red.png');
}

.ref-ball.ball-blue {
    background-image: url('../images/balls/ball-blue.png');
}

.ref-ball.ball-green {
    background-image: url('../images/balls/ball-green.png');
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ref-table th,
.ref-table td {
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    padding: 8px 6px;
}

.ref-table tr:last-child th,
.ref-table tr:last-child td {
    border-bottom: none;
}

.ref-wuxing-table th,
.ref-wave-table th,
.ref-heshu-table th {
    width: 52px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: #fafafa;
}

.ref-wuxing-table td,
.ref-wave-table td,
.ref-heshu-table td {
    text-align: center;
}

.ref-heshu-table th {
    font-size: 14px;
}

.wave-red,
.attr-red,
.el-fire {
    color: #e0101a;
}

.wave-blue,
.attr-blue,
.attr-blue-dark,
.el-water {
    color: #1565c0;
}

.wave-green,
.attr-green,
.attr-green-dark,
.el-wood {
    color: #1a9a4a;
}

.el-metal {
    color: #c9a227;
}

.el-earth {
    color: #8b6914;
}

.attr-cyan {
    color: #0099cc;
}

.ref-attr-list {
    padding: 0;
}

.ref-attr-row,
.ref-attr-inline-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    line-height: 1.5;
}

.ref-attr-row:last-child,
.ref-attr-inline-row:last-child {
    border-bottom: none;
}

.ref-attr-label {
    flex-shrink: 0;
    font-weight: 700;
    min-width: 58px;
}

.ref-attr-value {
    flex: 1;
    color: #333;
    word-break: break-word;
}

.ref-attr-inline-row {
    flex-wrap: wrap;
}

.ref-attr-inline-item {
    flex: 1 1 45%;
    min-width: 0;
}

.ref-attr-inline-item .ref-attr-label {
    min-width: auto;
    margin-right: 4px;
}

@media (max-width: 360px) {
    .ref-zodiac-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-zodiac-cell:nth-child(4n) {
        border-right: 1px solid #ddd;
    }

    .ref-zodiac-cell:nth-child(2n) {
        border-right: none;
    }

    .ref-ball {
        --ref-ball-size: 22px;
        font-size: 10px;
    }
}
