/* index.html 与 history.html 共用的样式：页面外壳 + 开奖记录模块。
   两个页面的开奖记录区块必须保持一致，改这里即可，不要在单个 html 里复制一份。
   各页面独有的样式（首页的导航/开奖卡/品牌墙、历史页的返回按钮）仍留在各自的 <style> 里。 */

/* ---------- 页面外壳 ---------- */
html, body {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    /* 关掉移动端点按时浏览器默认盖的那层浅蓝高亮，各元素的按下反馈自己写 */
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #eef1f8;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
}

/* ---------- 开奖记录：标题栏 ---------- */
.hist-title {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #1153F4 0%, #0A308E 100%);
    height: .38rem;
    padding: 0 .16rem;
}

.hist-title-text {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: .23rem;
    font-weight: 700;
}

.hist-subtitle {
    background: linear-gradient(180deg, #93CCE6 0%, #006FFF 100%);
    color: #fff;
    font-size: .2rem;
    font-weight: 400;
    text-align: center;
    height: .38rem;
    line-height: .38rem;
}

/* ---------- 开奖记录：容器与彩种 tab ---------- */
.history {
    display: flex;
    flex-direction: column;
    padding: .19rem .07rem;
    gap: .17rem;
}

.hist-tabs {
    display: flex;
    gap: .1rem;
}

.hist-tab {
    flex: none;
    text-align: center;
    padding: 0 .16rem;
    font-size: .14rem;
    font-weight: 400;
    height: .29rem;
    line-height: .29rem;
    color: #514E4E;
    background: #F0F8FF;
    border-radius: .05rem;
    cursor: pointer;
}

.hist-tab.active {
    background: linear-gradient(180deg, #1153F4 0%, #0A308E 100%);
    border-color: transparent;
    color: #fff;
}

/* ---------- 开奖记录：位置 / 生肖筛选 ---------- */
.filter-label {
    font-size: .12rem;
    font-weight: 700;
    color: #0C0319;
    border-left: .04rem solid #1153F4;
    padding-left: .08rem;
    margin-bottom: .1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .1rem;
}

.filter-btn {
    flex: none;
    min-width: .82rem;
    text-align: center;
    padding: 0 .1rem;
    font-size: .14rem;
    font-weight: 400;
    height: .28rem;
    line-height: .28rem;
    color: #514E4E;
    background: #F0F8FF;
    border-radius: .05rem;
    cursor: pointer;
}

.filter-btn.active {
    background: linear-gradient(180deg, #1153F4 0%, #0A308E 100%);
    color: #fff;
}

.reset-btn {
    flex: none;
    display: flex;
    align-items: center;
    gap: .04rem;
    padding: 0 .17rem;
    font-size: .14rem;
    font-weight: 400;
    height: .28rem;
    line-height: .28rem;
    color: #fff;
    background: linear-gradient(180deg, #93CCE6 0%, #006FFF 100%);
    border-radius: .13rem;
    cursor: pointer;
}

.divider {
    height: 3.57px;
    background: #ECECEC;
}

.year-row {
    display: flex;
}

.year-chip {
    padding: .06rem .18rem;
    font-size: .14rem;
    font-weight: 400;
    color: #fff;
    background: linear-gradient(180deg, #1153F4 0%, #0A308E 100%);
    border-radius: .06rem;
}

/* ---------- 开奖记录：记录列表 ---------- */
.record-item {
    margin-bottom: .11rem;
}

.record-head {
    font-size: .14rem;
    font-weight: 400;
    color: #7E7E7E;
    margin-bottom: .06rem;
}

.record-empty {
    text-align: center;
    color: #999;
    font-size: .16rem;
    padding: .4rem 0;
}

/* ---------- 号码球（首页开奖卡与历史列表共用） ---------- */
.balls-row {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
}

.ball-cell {
    flex: 1;
    min-width: 0;
    height: .41rem;
    display: flex;
    flex-direction: column;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: 1px solid #DDDDDD;
    border-radius: .05rem;
}

.ball-cell .num,
.ball-cell .zodiac {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: .17rem;
    font-weight: 700;
}

.ball-cell .num {
    color: #fff;
}

.history .ball-cell .num,
.history .ball-cell .zodiac {
    font-size: .16rem;
    font-weight: 400;
}

.record-list .ball-cell {
    height: .57rem;
}

/* 选中位置/生肖时，不匹配的球置灰 */
.ball-cell.dim {
    filter: grayscale(1);
    opacity: .45;
}
