* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(160deg, #f5f7fa 0%, #e8ecf1 100%);
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
}

.new-KJ-TabBox-box {
    font-size: 15px;
    color: #2c3e50;
    margin: 6px 4px;
    padding: 12px 12px 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.new-KJ-TabBox-box a { text-decoration: none; transition: opacity 0.2s; }
.new-KJ-TabBox-box a:hover { opacity: 0.85; }
.new-KJ-TabBox-box .kj-font-red { color: #c41e3a !important; font-weight: 700; }

.new-KJ-TabBox-box-tit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.4;
    font-size: 15px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.new-KJ-TabBox-box-tit-l {
    flex: 0 0 auto;
    color: #1a1a2e;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.new-KJ-TabBox-box-tit-c {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.new-KJ-TabBox-box-tit-c .kj-font-red {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.new-KJ-TabBox-box-tit-r { flex: 0 0 auto; }
.new-KJ-TabBox-box-tit-r a {
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
}

.new-KJ-TabBox-box-con {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3px;
    margin: 6px 0 14px;
    padding: 12px 4px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, rgba(241, 245, 249, 0.3) 100%);
    border-radius: 12px;
}

.kj-ball-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kj-ball-num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-family: 'DIN Alternate', 'Arial Black', Tahoma, sans-serif;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 6px rgba(255, 255, 255, 0.45),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kj-ball-item:not(.kj-wait) .kj-ball-num:hover {
    transform: translateY(-2px) scale(1.04);
}

.kj-wave-red {
    background: linear-gradient(145deg, #ff6b6b 0%, #e63946 45%, #b91c1c 100%) !important;
    box-shadow:
        0 5px 16px rgba(185, 28, 28, 0.45),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2) !important;
}

.kj-wave-green {
    background: linear-gradient(145deg, #4ade80 0%, #22c55e 45%, #15803d 100%) !important;
    box-shadow:
        0 5px 16px rgba(21, 128, 61, 0.4),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.18) !important;
}

.kj-wave-blue {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 45%, #1d4ed8 100%) !important;
    box-shadow:
        0 5px 16px rgba(29, 78, 216, 0.4),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.18) !important;
}

#w7 .kj-ball-num.kj-wave-red,
#w7 .kj-ball-num.kj-wave-green,
#w7 .kj-ball-num.kj-wave-blue {
    box-shadow:
        0 0 0 3px #fbbf24,
        0 0 0 5px rgba(251, 191, 36, 0.35),
        0 6px 20px rgba(0, 0, 0, 0.25),
        inset 0 2px 6px rgba(255, 255, 255, 0.4),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2) !important;
}

.kj-ball-item .whsx {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

.kj-add {
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #94a3b8;
    margin-top: 12px;
    padding: 0 2px;
}

.new-KJ-TabBox-box-foot {
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    padding: 10px 8px 4px;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.06), transparent);
    border-radius: 8px;
}

.new-KJ-TabBox-box-foot-l { width: 100%; }

@keyframes kjPulseGlow {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(196, 30, 58, 0.35),
            0 4px 12px rgba(0, 0, 0, 0.12),
            inset 0 2px 6px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(196, 30, 58, 0),
            0 4px 16px rgba(196, 30, 58, 0.25),
            inset 0 2px 6px rgba(255, 255, 255, 0.5);
    }
}

@keyframes kjWaitFlash {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(251, 191, 36, 0.55),
            0 4px 12px rgba(0, 0, 0, 0.12),
            inset 0 2px 6px rgba(255, 255, 255, 0.5);
        background: linear-gradient(145deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%) !important;
    }
    50% {
        transform: scale(1.08);
        box-shadow:
            0 0 0 10px rgba(251, 191, 36, 0),
            0 6px 20px rgba(245, 158, 11, 0.45),
            inset 0 2px 8px rgba(255, 255, 255, 0.65);
        background: linear-gradient(145deg, #fff7cc 0%, #fcd34d 45%, #f59e0b 100%) !important;
    }
}

@keyframes kjBallReveal {
    0% {
        transform: scale(0.55);
        opacity: 0.35;
        filter: brightness(1.4);
    }
    45% {
        transform: scale(1.18);
        opacity: 1;
        filter: brightness(1.25);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
    }
}

.kj-ball-item.kj-wait .kj-ball-num {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    animation: kjPulseGlow 1.2s ease-in-out infinite;
}

.kj-ball-item.kj-wait-active .kj-ball-num {
    animation: kjWaitFlash 0.75s ease-in-out infinite !important;
}

.kj-ball-item.kj-ball-flash .kj-ball-num {
    animation: kjBallReveal 0.85s ease-out !important;
}

@media (prefers-reduced-motion: reduce) {
    .kj-ball-item.kj-wait .kj-ball-num,
    .kj-ball-item.kj-wait-active .kj-ball-num,
    .kj-ball-item.kj-ball-flash .kj-ball-num {
        animation: none;
    }
}

@media screen and (max-width: 650px) {
    .new-KJ-TabBox-box { font-size: 14px; padding: 12px 10px 10px; margin: 6px 4px; }
    .new-KJ-TabBox-box-tit { font-size: 13px; margin-bottom: 10px; padding-bottom: 10px; }
    .new-KJ-TabBox-box-tit-c { font-size: 12px; }
    .new-KJ-TabBox-box-con { padding: 10px 2px; gap: 2px; }
    .kj-ball-num { width: 40px; height: 40px; font-size: 16px; }
    .kj-ball-item .whsx { font-size: 10px; margin-top: 4px; }
    .kj-add { font-size: 16px; margin-top: 10px; }
    .new-KJ-TabBox-box-foot { font-size: 12px; padding: 8px 4px 2px; }
}
