:root {
    --page-bg: #202226;
    --panel: #fff;
    --text: #1d232d;
    --muted: #667085;
    --line: #d8dee8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: var(--page-bg);
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-page {
    width: 100%;
    min-height: 100vh;
    padding: 10px 0 18px;
}

.site-wrapper {
    width: min(750px, 100%);
    margin: 0 auto;
    background: #f2f4f7;
    box-shadow: 0 0 24px rgba(0, 0, 0, .22);
}

.front-banner {
    position: relative;
    width: 100%;
    max-width: 750px;
    aspect-ratio: 750 / 240;
    overflow: hidden;
    background: #111;
}

.front-banner-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.front-banner-item {
    display: none;
    width: 100%;
    height: 100%;
}

.front-banner-item.active {
    display: block;
}

.front-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.front-banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
}

.front-banner-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    cursor: pointer;
}

.front-banner-dots button.active {
    background: #f1cd66;
}

.front-notice {
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #fff7df;
    border-bottom: 1px solid #ead9a6;
}

.front-notice-label {
    flex: 0 0 auto;
    margin: 8px 10px;
    padding: 4px 10px;
    border-radius: 14px;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    background: #d60012;
}

.front-notice-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.front-notice-text {
    display: inline-block;
    padding-left: 100%;
    animation-name: noticeScroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

@keyframes noticeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.front-config-image {
    padding: 10px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.front-config-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.draw-panel {
    width: 100%;
    margin: 8px 0 10px;
    overflow: hidden;
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.draw-game-tabs {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
    border-top: 1px solid #e1d5b8;
    border-bottom: 1px solid #e1d5b8;
    background: #fff5d8;
}

.draw-game-tabs.many-games {
    flex-wrap: wrap;
}

.draw-game-tab {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 11px 6px;
    color: #c40016;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #e1d5b8;
    border-bottom: 1px solid #e1d5b8;
}

.draw-game-tabs.many-games .draw-game-tab {
    flex-basis: 33.333%;
}

.draw-game-tab.active {
    background: #c40016;
    color: #fff;
}

.draw-main-card {
    background: #fff;
    padding: 24px 20px 26px;
}

.draw-inner {
    width: 100%;
    max-width: 690px;
    margin: 0 auto;
}

.draw-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
}

.draw-title-main {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draw-game-name,
.draw-issue-prefix,
.draw-issue-suffix {
    color: #0066ff;
    font-size: 32px;
}

.draw-issue-number {
    color: #f00000;
    font-size: 32px;
}

.draw-history-link {
    flex: 0 0 auto;
    color: #f00000;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.draw-number-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    margin-top: 14px;
}

.draw-number-item {
    text-align: center;
    flex: 0 0 auto;
}

.draw-square-ball {
    width: 66px;
    height: 66px;
    border-radius: 8px;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    line-height: 66px;
    text-align: center;
    font-family: Tahoma, Arial, sans-serif;
}

.draw-square-ball.color-red {
    background: #f60000;
}

.draw-square-ball.color-blue {
    background: #0000ff;
}

.draw-square-ball.color-green {
    background: #008a00;
}

.draw-square-ball.is-empty {
    background: #d8d8d8;
    color: #666;
}

.draw-square-ball.is-text {
    background: #d8d8d8;
    color: #333;
    font-size: 22px;
}

.draw-number-attr {
    margin-top: 6px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.draw-plus-sign {
    width: 32px;
    flex: 0 0 32px;
    text-align: center;
    font-size: 34px;
    font-weight: 900;
    color: #222;
    line-height: 66px;
    padding: 0;
}

.draw-next-row {
    margin-top: 26px;
    display: flex;
    align-items: center;
    gap: 34px;
    flex-wrap: nowrap;
}

.draw-next-issue span,
.draw-countdown span {
    color: #0066ff;
    font-size: 26px;
    font-weight: 900;
}

.draw-next-issue strong,
.draw-countdown strong {
    color: #f00000;
    font-size: 26px;
    font-weight: 900;
}

.draw-refresh-btn {
    margin-left: auto;
    border: 0;
    background: #ff9900;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
}

.front-pagination {
    padding: 10px 0 4px;
    overflow-x: auto;
}

.front-pagination nav {
    display: flex;
    justify-content: center;
}

.front-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.front-pagination a,
.front-pagination span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d8d8d8;
    color: #333;
    background: #fff;
    font-size: 13px;
}

.history-panel {
    margin: 8px 0 10px;
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.history-title {
    padding: 10px 12px;
    color: #c40016;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    background: #fff7e0;
    border-bottom: 1px solid #e1d5b8;
}

.history-list {
    width: 100%;
}

.history-item {
    padding: 10px 10px 12px;
    border-bottom: 1px solid #e5e5e5;
}

.history-item:last-child {
    border-bottom: 0;
}

.history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
    line-height: 1.35;
}

.history-meta strong {
    color: #c40016;
    font-size: 17px;
    white-space: nowrap;
}

.history-meta span {
    color: #666;
    font-size: 13px;
    text-align: right;
}

.history-number-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    width: 100%;
}

.history-number-item {
    flex: 0 0 auto;
    text-align: center;
}

.history-ball {
    width: 58px;
    height: 58px;
    color: #fff;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 28px;
    font-weight: 900;
    line-height: 58px;
    text-align: center;
    border-radius: 7px;
}

.history-ball.color-red {
    background: #f60000;
}

.history-ball.color-blue {
    background: #0000ff;
}

.history-ball.color-green {
    background: #008a00;
}

.history-ball.is-empty {
    background: #d8d8d8;
    color: #666;
}

.history-attr {
    margin-top: 5px;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.history-plus {
    width: 26px;
    flex: 0 0 26px;
    color: #222;
    font-size: 30px;
    font-weight: 900;
    line-height: 58px;
    text-align: center;
}

.history-empty {
    padding: 24px 12px;
    color: #777;
    font-size: 15px;
    text-align: center;
}

.history-pagination {
    padding: 12px 8px 14px;
    border-top: 1px solid #e5e5e5;
    overflow-x: auto;
}

.history-pagination nav > div:first-child {
    display: none;
}

.history-pagination nav > div:last-child {
    display: flex;
    justify-content: center;
}

.history-pagination nav > div:last-child > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.history-pagination a,
.history-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 5px 9px;
    color: #333;
    font-size: 13px;
    line-height: 1;
    background: #fff;
    border: 1px solid #d8d8d8;
}

.history-pagination span[aria-current="page"] span {
    color: #fff;
    background: #138a3d;
    border-color: #138a3d;
}

.history-pagination svg {
    width: 16px;
    height: 16px;
}

.history-page {
    min-height: 100vh;
    padding: 10px 0 20px;
    background: #f2f2f2;
}

.history-wrapper {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
}

.history-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #c40016;
    color: #fff;
}

.history-site-name {
    font-size: 18px;
    font-weight: 800;
}

.history-home-link {
    flex: 0 0 auto;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}

.history-game-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e1d5b8;
    background: #fff5d8;
}

.history-game-tab {
    flex: 1 1 33.333%;
    min-width: 33.333%;
    padding: 10px 4px;
    color: #c40016;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-right: 1px solid #e1d5b8;
}

.history-game-tab.active {
    background: #c40016;
    color: #fff;
}

.history-current-summary {
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.history-summary-title {
    margin-bottom: 6px;
    color: #c40016;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.history-summary-time {
    margin-bottom: 10px;
    color: #666;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.history-summary-numbers {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.history-summary-number-item {
    flex: 0 0 auto;
    text-align: center;
}

.history-summary-empty {
    padding: 10px 0;
    color: #777;
    font-size: 15px;
    text-align: center;
}

.history-page-panel {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    border-top: 1px solid #ddd;
}

.history-page-head {
    background: #c40016;
    color: #fff;
    padding: 10px 12px;
    text-align: center;
}

.history-page-head h2 {
    margin: 0;
    font-size: 20px;
}

.history-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.history-filter-form select,
.history-filter-form input {
    width: auto;
    max-width: 100%;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 8px;
    background: #fff;
    color: #222;
    font-size: 14px;
}

.history-filter-form input {
    flex: 1 1 220px;
    min-width: 160px;
}

.history-filter-form button,
.history-filter-form a {
    height: 34px;
    padding: 0 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    font-size: 14px;
}

.history-filter-form button {
    background: #c40016;
    color: #fff;
    cursor: pointer;
}

.history-filter-form a {
    background: #eee;
    color: #333;
}

.history-draw-item {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
}

.history-draw-meta {
    display: grid;
    gap: 4px;
    text-align: center;
    font-weight: bold;
    color: #c40016;
    margin-bottom: 8px;
}

.history-draw-meta span {
    color: #666;
    font-size: 13px;
    font-weight: 700;
}

.history-page-panel .history-number-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.history-page-panel .history-number-item {
    flex: 0 0 auto;
    text-align: center;
}

.history-page-panel .history-ball {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    color: #fff;
    font-weight: bold;
    line-height: 42px;
    font-size: 20px;
}

.history-page-panel .history-attr {
    font-size: 13px;
    color: #333;
    margin-top: 3px;
    white-space: nowrap;
}

.history-page-panel .history-plus {
    width: auto;
    flex: 0 0 auto;
    color: #222;
    font-size: 24px;
    font-weight: bold;
    line-height: 42px;
    padding: 0 2px;
}

.history-page-panel .history-empty {
    padding: 24px 0;
    text-align: center;
    color: #777;
}

.history-page-panel .history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 8px 14px;
    border-top: 1px solid #e5e5e5;
    overflow-x: auto;
}

.history-page-panel .history-pagination a,
.history-page-panel .history-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    color: #333;
    text-decoration: none;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}

.history-page-panel .history-pagination a:hover {
    background: #fff3f3;
    border-color: #c40016;
}

.history-page-panel .history-pagination .active {
    color: #fff;
    background: #c40016;
    border-color: #c40016;
    font-weight: 700;
}

.history-page-panel .history-pagination .disabled {
    color: #aaa;
    background: #f7f7f7;
    cursor: not-allowed;
}

.history-page-panel .history-pagination .ellipsis {
    border-color: transparent;
    background: transparent;
    color: #777;
}

.history-footer {
    padding: 14px 10px 18px;
    color: #777;
    font-size: 13px;
    text-align: center;
    border-top: 1px solid #eee;
}

.library-panel {
    width: 100%;
    max-width: 750px;
    margin: 10px auto 0;
    background: #fff;
}

.library-content-block {
    width: 100%;
    margin-bottom: 0;
    overflow: hidden;
    background: #fff;
}

.library-content-block:last-child {
    margin-bottom: 0;
}

.library-content-frame {
    display: block;
    width: 1px;
    min-width: 100%;
    max-width: 100%;
    min-height: 1px;
    overflow: hidden;
    background: #fff;
    border: 0;
}

.zodiac-card-panel {
    width: 100%;
    max-width: 750px;
    margin: 10px auto 0;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #d8d8d8;
}

.zodiac-card-panel img {
    max-width: 100%;
    height: auto;
}

.zodiac-card-panel table {
    max-width: 100%;
}

.zodiac-card-panel .sx-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.zodiac-card-panel .sx-table td {
    width: 33.33%;
    padding: 8px;
    text-align: center;
    vertical-align: top;
    word-break: break-word;
}

.zodiac-card-panel .sx-table td span {
    display: inline-block;
    min-width: 24px;
    margin: 2px;
    padding: 2px 5px;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.zodiac-card-panel .sx-table td span.red {
    background: red;
}

.zodiac-card-panel .sx-table td span.green {
    background: green;
}

.zodiac-card-panel .sx-table td span.blue {
    background: blue;
}

.front-footer {
    padding: 14px 12px 18px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    background: #edf0f4;
    border-top: 1px solid var(--line);
}

.maintenance-page {
    display: flex;
    align-items: center;
    min-height: 100vh;
}

.maintenance-page .site-wrapper {
    background: transparent;
    box-shadow: none;
}

.maintenance-card {
    margin: 0 10px;
    padding: 28px 18px;
    border-radius: 8px;
    color: #eef3fb;
    text-align: center;
    background: #151b25;
    border: 1px solid #303b4f;
}

.maintenance-card h1 {
    margin: 0 0 10px;
    font-size: 24px;
}

.maintenance-card p {
    margin: 0;
    color: #b8c3d3;
}

@media (max-width: 760px) {
    .history-filter-form select,
    .history-filter-form input,
    .history-filter-form button,
    .history-filter-form a {
        flex: 1 1 auto;
    }

    .history-page-panel .history-number-row {
        justify-content: space-between;
        gap: 0;
    }

    .history-page-panel .history-ball {
        width: 38px;
        height: 38px;
        line-height: 38px;
        font-size: 18px;
    }

    .history-page-panel .history-attr {
        font-size: 12px;
    }

    .history-page-panel .history-plus {
        font-size: 22px;
        line-height: 38px;
    }

    .site-page {
        padding: 0;
    }

    .site-wrapper {
        width: 100%;
        box-shadow: none;
    }

    .draw-main-card {
        padding: 16px 10px 18px;
    }

    .draw-inner {
        max-width: none;
        width: 100%;
    }

    .draw-title-row {
        align-items: center;
        gap: 6px;
    }

    .draw-title-main {
        white-space: nowrap;
    }

    .draw-game-name,
    .draw-issue-prefix,
    .draw-issue-suffix,
    .draw-issue-number {
        font-size: 20px;
        line-height: 1.15;
    }

    .draw-history-link {
        font-size: 16px;
        line-height: 1.15;
    }

    .draw-number-row {
        width: 100%;
        gap: 0;
        justify-content: space-between;
        flex-wrap: nowrap;
        margin-top: 12px;
    }

    .draw-number-item {
        flex: 0 0 auto;
        text-align: center;
    }

    .draw-square-ball {
        width: 46px;
        height: 46px;
        line-height: 46px;
        font-size: 23px;
        border-radius: 6px;
    }

    .draw-square-ball.is-text {
        font-size: 18px;
    }

    .draw-number-attr {
        font-size: 13px;
        margin-top: 4px;
    }

    .draw-plus-sign {
        width: 18px;
        flex: 0 0 18px;
        text-align: center;
        font-size: 24px;
        line-height: 46px;
        padding: 0;
    }

    .draw-next-row {
        margin-top: 20px;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .draw-next-issue,
    .draw-countdown {
        white-space: nowrap;
    }

    .draw-next-issue span,
    .draw-countdown span,
    .draw-next-issue strong,
    .draw-countdown strong {
        font-size: 16px;
    }

    .draw-refresh-btn {
        flex: 0 0 auto;
        margin-left: 0;
        font-size: 17px;
        padding: 7px 10px;
        border-radius: 8px;
    }

    .draw-game-tab {
        padding: 9px 2px;
        font-size: 13px;
        line-height: 1.2;
    }

    .history-title {
        padding: 9px 10px;
        font-size: 17px;
    }

    .history-item {
        padding: 9px 8px 11px;
    }

    .history-meta {
        gap: 6px;
        margin-bottom: 7px;
        font-size: 14px;
    }

    .history-meta strong {
        font-size: 15px;
    }

    .history-meta span {
        font-size: 12px;
    }

    .history-ball {
        width: 44px;
        height: 44px;
        font-size: 22px;
        line-height: 44px;
        border-radius: 6px;
    }

    .history-attr {
        margin-top: 4px;
        font-size: 12px;
    }

    .history-plus {
        width: 18px;
        flex-basis: 18px;
        font-size: 23px;
        line-height: 44px;
    }

    .library-content-block {
        padding: 0;
        font-size: 13px;
        line-height: 1.2;
    }

}

@media (max-width: 390px) {
    body {
        font-size: 14px;
    }

    .front-notice-label {
        margin: 7px 8px;
        padding: 3px 8px;
        font-size: 13px;
    }

    .draw-main-card {
        padding-left: 8px;
        padding-right: 8px;
    }

    .draw-title-row {
        gap: 6px;
    }

    .draw-game-name,
    .draw-issue-prefix,
    .draw-issue-suffix,
    .draw-issue-number {
        font-size: 18px;
    }

    .draw-history-link {
        font-size: 15px;
    }

    .draw-number-row {
        gap: 0;
    }

    .draw-square-ball {
        width: 42px;
        height: 42px;
        line-height: 42px;
        font-size: 21px;
        border-radius: 6px;
    }

    .draw-square-ball.is-text {
        font-size: 17px;
    }

    .draw-number-attr {
        font-size: 12px;
    }

    .draw-plus-sign {
        width: 16px;
        flex-basis: 16px;
        font-size: 22px;
        line-height: 42px;
        padding: 0;
    }

    .draw-next-issue span,
    .draw-countdown span,
    .draw-next-issue strong,
    .draw-countdown strong,
    .draw-refresh-btn {
        font-size: 16px;
    }

    .history-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-meta span {
        text-align: left;
    }

    .history-ball {
        width: 40px;
        height: 40px;
        font-size: 20px;
        line-height: 40px;
    }

    .history-plus {
        width: 15px;
        flex-basis: 15px;
        font-size: 21px;
        line-height: 40px;
    }

}

@media (max-width: 360px) {
    .draw-next-row {
        flex-wrap: wrap;
    }
}
