* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #222;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.draw-board {
    max-width: 680px;
    margin: 8px auto;
    padding: 12px 14px 14px;
    border: 2px solid #2f7cf6;
    border-radius: 8px;
    background: #fff;
}

.draw-bar,
.draw-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.draw-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.draw-title span {
    color: #e42323;
    font-weight: 700;
}

.draw-time {
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    line-height: 1;
}

.draw-history {
    flex: 1;
    min-width: 0;
    color: #e42323;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    cursor: pointer;
    white-space: nowrap;
}

.draw-history:hover {
    color: #c41616;
}

.draw-balls {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) 18px minmax(0, 1fr);
    align-items: center;
    column-gap: 7px;
    margin: 12px 0 10px;
}

.ball {
    width: 100%;
    aspect-ratio: 1 / 1.12;
    border-radius: 6px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: clamp(11px, 2.5vw, 14px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.16);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.08));
}

.ball .num {
    font-size: 1.65em;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.ball .sub {
    margin-top: 3px;
    font-size: 0.86em;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.ball.bg-amage-1 {
    background-color: #ef2a2a;
}

.ball.bg-amage-2 {
    background-color: #2f7cf6;
}

.ball.bg-amage-3 {
    background-color: #1fbe4a;
}

.draw-plus {
    justify-self: center;
    font-size: 26px;
    font-weight: 500;
    color: #444;
    line-height: 1;
}

.draw-foot {
    color: #333;
    font-size: 14px;
    line-height: 1.3;
}

#next_issue_message {
    min-width: 0;
}

.draw-refresh {
    flex: 0 0 auto;
    border: 0;
    background: linear-gradient(180deg, #ff9d2e, #ff7a00);
    color: #fff;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(255, 122, 0, 0.35);
}

.draw-refresh:hover {
    background: linear-gradient(180deg, #ffab45, #ff8614);
}

.draw-refresh:active {
    transform: translateY(1px);
}

@media (max-width: 420px) {
    .draw-board {
        padding: 8px 8px 10px;
    }

    .draw-title,
    .draw-history {
        font-size: 14px;
    }

    .draw-time {
        font-size: 18px;
    }

    .draw-balls {
        column-gap: 4px;
        margin: 10px 0 8px;
    }

    .draw-plus {
        font-size: 20px;
    }

    .draw-foot {
        font-size: 13px;
    }
}
