/* ==========================================================================
   Lottery - Lottery card, numbers, countdown, badges
   ========================================================================== */

/* --- Lottery Card --- */
.lottery-card {
    position: relative;
}

.lottery-card::before {
    content: "";
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            color(xyz-d65 0.264 0.326 0.77),
            color(xyz-d65 0.144 0.232 0.276) 33.33%,
            color(xyz-d65 0.155 0.234 0.3),
            rgb(27, 148, 150) 37.5%,
            rgb(65, 144, 163) 41.67%,
            rgb(105, 136, 187) 50%,
            rgb(161, 112, 235),
            rgb(113, 142, 231) 83.33%,
            rgb(74, 155, 228) 91.67%,
            rgb(38, 161, 227) 95.83%,
            rgb(21, 163, 227),
            color(xyz-d65 0.27 0.321 0.773) 97.92%,
            color(xyz-d65 0.264 0.326 0.77)
        ) 0px 0px / 200% 100%;
    height: 3px;
    animation: 4s ease 0s infinite normal none running gradientShift;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* --- Countdown --- */
.countdown-wrapper {
    flex-shrink: 0;
    min-width: 200px;
    max-width: 280px;
}

.countdown-unit {
    letter-spacing: 0px;
    font-family: "Microsoft YaHei", 微软雅黑, -apple-system, BlinkMacSystemFont, sans-serif;
}

.countdown-urgent-text {
    animation: 2s ease-in-out 0s infinite normal none running countdown-breathe;
}

.countdown-refresh {
    animation: 1.5s ease-out 0s 1 normal none running countdown-refresh-pulse;
}

/* --- Keyframes --- */
@keyframes countdown-breathe {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes countdown-refresh-pulse {
    0% {
        transform: scale(1.02);
        box-shadow: rgba(34, 197, 94, 0.4) 0px 0px;
    }
    30% {
        transform: scale(1.03);
        box-shadow: rgba(34, 197, 94, 0.25) 0px 0px 12px 4px;
    }
    100% {
        transform: scale(1);
        box-shadow: rgba(34, 197, 94, 0) 0px 0px;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* --- PC Mode: Lottery Overrides --- */
body.device-pc .lottery-number {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 2rem;
}

body.device-pc .lottery-sum {
    min-width: 3.75rem;
    height: 3.75rem;
    font-size: 2rem;
}

body.device-pc .lottery-badge {
    min-width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
}

body.device-pc .countdown-wrapper {
    min-width: 260px;
    max-width: 340px;
}

body.device-pc .lottery-title {
    font-size: 1.125rem;
}

body.device-pc .lottery-subtitle {
    font-size: 0.95rem;
}
