/* Vue component styles - de-scoped for PHP usage */
* { margin: 0; padding: 0; }

.new-KJ-TabBox-box {
    font-size: 16px;
    min-height: 130px;
    box-sizing: border-box;
    color: #333;
    padding: 8px;
    font-family: "PingFang SC", "microsoft yahei", arial, "helvetica neue", "hiragino sans gb", sans-serif;
    max-width: 100%;
    margin: 0 auto;
}
.new-KJ-TabBox-box a { text-decoration: none; }
.new-KJ-TabBox-box .kj-font-red { color: red !important; }

.new-KJ-TabBox-box-tit {
    display: flex;
    align-items: center;
    min-height: 30px;
    line-height: 30px;
    font-size: 17px;
    margin-bottom: 5px;
}
.new-KJ-TabBox-box-tit-l { font-weight: 600; }
.new-KJ-TabBox-box-tit-m { flex: 1; text-align: center; font-weight: 700; }
.new-KJ-TabBox-box-tit-r { display: flex; align-items: center; gap: 0; }
.new-KJ-TabBox-box-tit-r span { margin: 0; padding: 0; display: inline-block; }

.new-KJ-TabBox-box-foot-r-history {
    display: inline-block;
    padding: 0 10px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    color: #fff;
    border-radius: 4px;
    background: #4caf50;
    cursor: pointer;
    white-space: nowrap;
}

.new-KJ-TabBox-box-con {
    display: flex;
    margin: 10px 0;
    padding: 0 8px;
    font-weight: 700;
    justify-content: center;
    align-items: center;
}

.kj-left-group { display: flex; align-items: center; gap: 1px; flex-shrink: 0; }
.kj-right-group { display: flex; align-items: center; gap: 1px; margin-left: 4px; flex-shrink: 0; }

.new-KJ-TabBox-box-con .kj-ball {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 11.5vw;
    text-align: center;
    border-radius: 4px;
    box-sizing: border-box;
    flex-direction: column;
}

.ball-number {
    width: 11vw;
    height: 11vw;
    font-size: 5vw;
    line-height: 1;
    text-align: center;
    background-size: 100% 100% !important;
    background-repeat: no-repeat;
    background-position: center center;
    color: #333;
    font-weight: 900;
    font-family: Tahoma, Geneva, sans-serif;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ball-number.ball-empty { background: transparent; border: 2px dashed #ddd; }

.new-KJ-TabBox-box-con .kj-ball .whsx {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    margin-top: 4px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    color: #f60;
    font-weight: 600;
}

.new-KJ-TabBox-box-con .kj-add {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex: 0 0 auto;
    padding: 0;
    margin: 0 !important;
    line-height: 1;
    color: #888;
    height: auto;
    align-self: center;
}

.new-KJ-TabBox-box-foot {
    display: flex;
    align-items: center;
    font-size: 16px;
    margin-top: 5px;
}
.new-KJ-TabBox-box-foot-l { flex: 1; }
.new-KJ-TabBox-box-foot-r { display: flex; gap: 8px; }

@media screen and (min-width: 768px) {
    .new-KJ-TabBox-box { margin-top: 5px; padding: 20px 8px; }
    .new-KJ-TabBox-box-tit { min-height: 35px; line-height: 35px; margin-bottom: 10px; }
    .new-KJ-TabBox-box-con { margin: 20px 0; padding: 0 5px; }
    .kj-left-group { gap: 2px; }
    .kj-right-group { gap: 2px; margin-left: 6px; }
    .new-KJ-TabBox-box-con .kj-add { font-size: 22px; }
    .ball-number { width: 68px; height: 68px; font-size: 32px; line-height: 1; }
    .new-KJ-TabBox-box-con .kj-ball { width: 85px; max-width: 85px; height: 75px; }
    .new-KJ-TabBox-box-foot { margin-top: 10px; }
}

@media screen and (max-width: 650px) {
    .new-KJ-TabBox-box { font-size: 14px; }
    .new-KJ-TabBox-box-tit { font-size: 16px; }
    .new-KJ-TabBox-box-con { padding: 0; overflow: hidden; }
    /* 球组整体用 scale 缩放，保持不换行不变形 */
    .kj-balls-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        transform-origin: center center;
        transform: scale(0.82);
        white-space: nowrap;
    }
    .new-KJ-TabBox-box-con .kj-ball { margin-right: 0; width: 11.5vw; height: auto; }
    .ball-number { width: 11vw; height: 11vw; font-size: 4.5vw; line-height: 1; }
    .new-KJ-TabBox-box-con .kj-ball .whsx { margin-top: 3px; padding: 0 2px; font-size: 12px; font-weight: 600; height: 20px; line-height: 20px; }
    .new-KJ-TabBox-box-con .kj-add { font-size: 18px; padding: 0; margin: 0 2px !important; }
    .kj-left-group { gap: 1px; }
    .kj-right-group { gap: 1px; margin-left: 3px; }
    .new-KJ-TabBox-box-foot { font-size: 15px; }
}

/* Page layout overrides for non-BUI-JS usage */
html { overflow: auto !important; height: auto !important; }
body { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; -webkit-user-select: text; user-select: text; cursor: default; }
#app { height: auto; }

/* 开奖号码逐个显示动画 */
.kj-ball.ball-hidden {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.kj-ball.ball-revealed {
    opacity: 1;
    transform: scale(1);
}
.kj-ball.ball-reveal-anim {
    animation: ballPopIn 0.4s ease-out forwards;
}
@keyframes ballPopIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    70% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}
.bui-page { height: auto; display: flex; flex-direction: column; }
.bui-page main { flex: 1; overflow: visible; }

/* 开奖前5分钟文字球 */
.ball-number.ball-pre-reveal {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    color: #fff !important;
    font-size: 5vw;
    font-weight: 900;
    border: none;
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
    animation: preRevealPulse 1.5s ease-in-out infinite;
}
.ball-number.ball-pre-reveal.special {
    font-size: 5.5vw;
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
    box-shadow: 0 4px 16px rgba(217,119,6,0.5);
}
@keyframes preRevealPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.88; }
}

/* Fix header */
header.bui-bar, header .bui-bar { background: #fff; min-height: .9rem; }
header.bui-bar .bui-bar-main, header .bui-bar .bui-bar-main {
    color: #c41230; font-size: .38rem; font-weight: 700; overflow: visible; width: auto;
}
header.bui-bar .bui-bar-left, header.bui-bar .bui-bar-right { width: 0; min-width: 0; overflow: hidden; }

/* Nav toggle */
.nav-toggle-btn {
    background: linear-gradient(to bottom, #c41230, #c41230);
    color: #fff;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 2px solid #c41230;
    user-select: none;
}

/* Countdown */
.countdown-box {
    text-align: center;
    padding: .2rem .1rem;
    font-size: .28rem;
    color: #666;
}
.countdown-box .countdown-timer {
    display: flex;
    justify-content: center;
    gap: .15rem;
    margin-top: .1rem;
}
.countdown-box .countdown-item {
    background: #c41230;
    color: #fff;
    border-radius: .08rem;
    padding: .08rem .15rem;
    min-width: .6rem;
    text-align: center;
}
.countdown-box .countdown-item .num {
    font-size: .36rem;
    font-weight: 700;
}
.countdown-box .countdown-item .unit {
    font-size: .2rem;
}
.countdown-box .countdown-colon {
    font-size: .36rem;
    font-weight: 700;
    line-height: .8rem;
    color: #333;
}

/* Announcement override */
.bui-slide-notice { height: auto; min-height: .6rem; display: flex; align-items: center; padding: .1rem .2rem; }
.bui-slide-notice:before { display: none; }

/* Marquee */
.marquee-container {
    height: 28px;
    width: 100%;
    overflow: hidden;
    position: relative;
    line-height: 28px;
    font-size: .26rem;
    color: #666;
}
.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Navigation cards */
.nav-card-list {
    padding: .1rem 0;
}
.nav-card-item {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}
.nav-card-item .open-log {
    margin-bottom: .1rem;
    width: 100% !important;
    min-height: 1.8rem;
    box-sizing: border-box;
}
.nav-card-item .open-log > .content {
    min-height: 1.2rem;
    width: 100%;
}
.nav-card-item .open-log > .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .1rem .15rem;
}
.nav-card-item .open-log > .title .nav-name {
    font-size: .32rem;
}
.nav-card-item .open-log > .title .nav-arrow {
    color: #ff0;
    font-size: .28rem;
}
.nav-card-item .open-log > .content .text {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-card-item .open-log > .content .text .period-label {
    color: #c41230;
    font-weight: 600;
}
.nav-card-item .open-log > .content .text .result-badge {
    padding: .02rem .1rem;
    border-radius: .05rem;
    font-size: .24rem;
    font-weight: 600;
}
.result-correct { background: #c41230; color: #fff; }
.result-wrong { background: #f44336; color: #fff; }
.result-pending { background: #ff9800; color: #fff; }

/* Footer */
.site-footer {
    text-align: center;
    padding: .3rem .2rem;
    font-size: .24rem;
    color: #999;
    background: #fff;
    margin-top: .2rem;
    border-radius: .1rem;
}
