* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

.lc-body {
    margin: 0;
    background: #f3f4f6;
    color: #2d2f34;
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    overflow-x: hidden;
}

.lc-page {
    min-height: 100vh;
    padding-bottom: 0;
}

.lc-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 430px;
    min-height: 78px;
    margin: 0 auto;
    padding: 12px 8px 8px;
    background: #fff;
}

.lc-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    color: #2d2f34;
    letter-spacing: 0;
    white-space: nowrap;
}

.lc-calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 34px;
    padding: 0 5px;
    border: 1px solid #f44336;
    border-radius: 7px;
    background: #fff;
    color: #f44336;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}

.lc-calendar-btn .fa {
    font-size: 14px;
}

.lc-date-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lc-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 5px 10px;
    background: #fff;
}

.lc-award-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lc-award-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 58px;
    align-items: center;
    min-height: 85px;
    margin-bottom: 10px;
    padding: 6px 18px 6px 12px;
    background: #fff url("images/back_index.png") center / 100% 100% no-repeat;
}

.lc-award-name {
    min-width: 0;
    padding-left: 2px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    color: #303238;
    overflow-wrap: anywhere;
}

.lc-award-name.is-highlight {
    color: #be1625;
}

.lc-local-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #be1625;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
}

.lc-award-main {
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lc-countdown {
    color: #6b7280;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
}

.lc-balls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
}

.lc-ball-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 28px;
}

.lc-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    color: #000;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
}

.lc-ball-red {
    background-image: url("images/red.png");
}

.lc-ball-blue {
    background-image: url("images/blue.png");
}

.lc-ball-green {
    background-image: url("images/green.png");
}

.lc-zodiac {
    margin-top: 1px;
    color: #303238;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.lc-plus {
    color: #303238;
    font-size: 18px;
    font-weight: 800;
}

.lc-history {
    color: #2563ff;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: underline;
    text-align: right;
    white-space: nowrap;
}

.lc-history:hover,
.lc-history:focus {
    color: #1d4ed8;
}

.lc-loading,
.lc-empty {
    padding: 28px 12px;
    color: #6b7280;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.lc-error {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
}

.lc-history-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 60;
}

.lc-history-modal.is-open {
    display: flex;
}

.lc-history-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.46);
}

.lc-history-panel {
    position: relative;
    width: 100%;
    max-width: 430px;
    max-height: 78vh;
    border-radius: 8px 8px 0 0;
    background: #fff;
    overflow: hidden;
    z-index: 1;
}

.lc-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 12px;
    border-bottom: 1px solid #ececec;
    color: #303238;
    font-size: 18px;
}

.lc-history-close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #60646c;
    font-size: 30px;
    line-height: 1;
}

.lc-history-content {
    max-height: calc(78vh - 48px);
    padding: 8px 8px 14px;
    overflow-y: auto;
}

.lc-history-row {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid #f1f1f1;
}

.lc-history-meta {
    min-width: 0;
    padding-right: 6px;
}

.lc-history-meta strong,
.lc-history-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-history-meta strong {
    color: #303238;
    font-size: 14px;
    line-height: 1.4;
}

.lc-history-meta span {
    color: #8a8f99;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 360px) {
    .lc-header h1 {
        font-size: 23px;
    }

    .lc-calendar-btn {
        min-height: 30px;
        font-size: 17px;
    }

    .lc-award-card {
        grid-template-columns: 70px minmax(0, 1fr) 46px;
        padding-right: 14px;
    }

    .lc-countdown {
        font-size: 17px;
    }

    .lc-history,
    .lc-award-name {
        font-size: 16px;
    }

    .lc-ball {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .lc-ball-wrap {
        min-width: 24px;
    }

    .lc-history-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}
