* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #eeeeee;
    color: #555555;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 16px;
}

button,
input {
    font: inherit;
}

.history-page {
    width: min(100%, 640px);
    min-height: 100vh;
    margin: 0 auto;
    background: #f7f7f7;
}

.history-titlebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 92px 1fr 48px;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    background: #666666;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.history-back {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.history-titlebar h1 {
    margin: 0;
    text-align: center;
    font-size: 27px;
    line-height: 40px;
    letter-spacing: 0;
    font-weight: 800;
}

.history-collapse {
    width: 38px;
    height: 34px;
    display: grid;
    place-items: center;
    justify-self: end;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-13px);
    cursor: pointer;
}


.history-filterbar {
    padding: 6px 10px 7px;
    border-bottom: 1px solid #dddddd;
    background:
        radial-gradient(circle at 0 0, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 4px 4px,
        #f4f4f4;
    color: #8b8b8b;
    transition: max-height 0.2s ease, padding 0.2s ease, border-width 0.2s ease;
    overflow: hidden;
}

.history-filterbar.is-collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
}

.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 11px;
    min-height: 22px;
    line-height: 20px;
}

.filter-label {
    color: #ff7b00;
    font-weight: 700;
    white-space: nowrap;
}

.filter-row label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #8a8a8a;
    font-size: 12px;
    white-space: nowrap;
}

.filter-row input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: #2789ff;
}

.attribute-map-btn {
    min-height: 20px;
    padding: 0 8px;
    border: 0;
    border-radius: 2px;
    background: #ffdf25;
    color: #e53116;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.history-content {
    background: #ffffff;
}

.history-list {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.history-empty {
    padding: 28px 12px;
    text-align: center;
    color: #999999;
    font-size: 14px;
}

.lishi_item {
    padding: 12px 10px;
    border-bottom: 1px solid #dddddd;
    background: #ffffff;
}

.lishi_biaoti {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555555;
}

.qishu-number {
    color: #00a6c8;
}

.qiu_hang {
    display: flex;
    gap: 38px;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.qiu_rongqi {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.qiu_tubiao {
    width: 60px;
    height: 60px;
}

.qiu_biaoqian {
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid #eeeeee;
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
    color: #555555;
    text-align: center;
}

.qiu_biaoqian_jiahe {
    font-size: 12px;
}

.wuxing-金 {
    color: #d49a12;
}

.wuxing-木 {
    color: #46a83f;
}

.wuxing-水 {
    color: #168add;
}

.wuxing-火 {
    color: #e13c36;
}

.wuxing-土 {
    color: #c9882a;
}

.bose-red {
    color: #e13c36;
}

.bose-blue {
    color: #168add;
}

.bose-green {
    color: #46a83f;
}

.danshuang-text {
    color: #8b4bd6;
}

.hedanshuang-text {
    color: #f19728;
}

.jiaqin-yeshou-text {
    color: #9a806d;
}

.zonghe-danshuang-text {
    color: #8cc63f;
}

.qiu_jiahao {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: bold;
    line-height: 60px;
    color: #999999;
}

.history-record {
    border-bottom: 8px solid #eeeeee;
    background: #ffffff;
}

.record-title {
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eeeeee;
    color: #9a9a9a;
    font-size: 13px;
}

.record-title strong {
    color: #1b8dff;
    font-weight: 700;
}

.record-balls {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: start;
    gap: 0;
    border-bottom: 1px solid #eeeeee;
}

.record-ball {
    min-width: 0;
    padding: 5px 1px 7px;
    text-align: center;
    border-right: 1px solid #eeeeee;
}

.record-ball:last-child {
    border-right: 0;
}

.ball-number {
    width: 32px;
    height: 32px;
    margin: 0 auto 4px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 3px solid #2682c7;
    background: #ffffff;
    color: #333333;
    font-size: 16px;
    line-height: 1;
    font-weight: 800;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.ball-red .ball-number {
    border-color: #e52822;
}

.ball-green .ball-number {
    border-color: #4d9d3b;
}

.ball-blue .ball-number {
    border-color: #2682c7;
}

.ball-meta {
    display: grid;
    gap: 6px;
    font-size: 13px;
    line-height: 1.15;
}

.meta-green {
    color: #6dbb3d;
}

.meta-blue {
    color: #168add;
}

.meta-red {
    color: #e13c36;
}

.meta-orange {
    color: #f19728;
}

.meta-purple {
    color: #8f49d6;
}

.meta-brown {
    color: #9a806d;
}

@media (max-width: 460px) {
    .history-titlebar {
        grid-template-columns: 76px 1fr 42px;
        min-height: 38px;
        padding: 0 8px;
    }

    .history-titlebar h1 {
        font-size: 24px;
        line-height: 38px;
    }

    .history-filterbar {
        padding-left: 8px;
        padding-right: 8px;
    }

    .filter-row {
        gap: 3px 8px;
    }

    .filter-row label {
        font-size: 11px;
    }

    .record-balls {
        grid-template-columns: repeat(7, minmax(42px, 1fr));
        overflow-x: auto;
    }

    .lishi_item {
        padding: 8px 4px;
        font-size: 13px;
    }

    .lishi_biaoti {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .qiu_hang {
        gap: 5px;
        flex-wrap: wrap;
    }

    .qiu_rongqi {
        width: 40px;
    }

    .qiu_tubiao {
        width: 35px;
        height: 35px;
    }

    .qiu_biaoqian {
        font-size: 14px;
        margin-top: 2px;
    }

    .qiu_biaoqian_jiahe {
        font-size: 11px;
    }

    .qiu_jiahao {
        font-size: 30px;
        line-height: 35px;
    }
}