.hiwawa-lottery {
    --brand: #ff6b35;
    --brand-2: #ff9f1c;
}

.hiwawa-lottery__disabled { text-align: center; padding: 80px 20px; color: #94a3b8; font-size: 18px; }
.hiwawa-lottery__disabled i { font-size: 48px; display: block; margin-bottom: 16px; color: #cbd5e1; }

.hiwawa-lottery__header { text-align: center; margin-bottom: 36px; }
.hiwawa-lottery__title {
    font-size: 32px; font-weight: 800; margin: 0 0 12px;
    background: linear-gradient(135deg, var(--brand, #ff6b35) 0%, var(--brand-2, #ff9f1c) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hiwawa-lottery__info { display: flex; justify-content: center; gap: 24px; font-size: 15px; color: #475569; }
.hiwawa-lottery__coins i { color: #f59e0b; }
.hiwawa-lottery__coins strong, .hiwawa-lottery__cost strong { color: var(--brand, #ff6b35); font-weight: 700; }
.hiwawa-lottery__guarantee {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px; padding: 6px 16px; border-radius: 20px;
    background: #fff7ed; color: #c2410c; font-size: 13px;
}

.hiwawa-lottery__main { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 40px; }
.hiwawa-lottery__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    max-width: 420px; width: 100%;
}
.hiwawa-lottery__card {
    aspect-ratio: 1; perspective: 600px; cursor: pointer;
}
.hiwawa-lottery__card-inner {
    width: 100%; height: 100%; position: relative;
    transition: transform .6s; transform-style: preserve-3d;
}
.hiwawa-lottery__card.flipped .hiwawa-lottery__card-inner { transform: rotateY(180deg); }
.hiwawa-lottery__card-front, .hiwawa-lottery__card-back {
    position: absolute; inset: 0; backface-visibility: hidden;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.hiwawa-lottery__card-front {
    background: linear-gradient(135deg, var(--brand, #ff6b35) 0%, var(--brand-2, #ff9f1c) 100%);
    background-size: cover; background-position: center;
    color: #fff;
}
.hiwawa-lottery__card-qmark { font-size: 36px; font-weight: 800; opacity: .75; }
.hiwawa-lottery__card-back {
    transform: rotateY(180deg);
    background: #fff; border: 2px solid #e2e8f0;
    flex-direction: column; padding: 8px; text-align: center;
}
.hiwawa-lottery__card-prize { font-size: 13px; color: #334155; font-weight: 600; }
.hiwawa-lottery__card-prize img { max-width: 60%; height: auto; border-radius: 6px; margin-bottom: 4px; }
.hiwawa-lottery__start-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 40px; font-size: 16px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand, #ff6b35) 0%, var(--brand-2, #ff9f1c) 100%);
    border: none; border-radius: 50px;
    cursor: pointer; transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(255, 107, 53, .28);
    text-decoration: none;
}
.hiwawa-lottery__start-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255, 107, 53, .35); }
.hiwawa-lottery__start-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.hiwawa-lottery__notifications {
    width: 100%; max-width: 420px; background: #f8fafc;
    border-radius: 12px; padding: 16px; margin-top: 8px;
}
.hiwawa-lottery__notif-title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 10px; }
.hiwawa-lottery__notif-title i { color: #f59e0b; }
.hiwawa-lottery__notif-list { max-height: 120px; overflow: hidden; font-size: 13px; color: #64748b; }
.hiwawa-lottery__notif-item { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.hiwawa-lottery__notif-empty { color: #94a3b8; font-size: 13px; padding: 8px 0; }

/* —— 奖品展示（领奖台）—— */
.hiwawa-lottery__prizes { margin-bottom: 48px; }
.hiwawa-lottery__prizes-showcase {
    position: relative;
    margin-top: 8px;
    padding: 40px 28px 48px;
    border-radius: 20px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 200, 120, 0.18) 0%, transparent 55%),
        linear-gradient(180deg, #fffefb 0%, #faf8f5 45%, #f5f3f0 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.06),
        0 24px 48px -12px rgba(180, 83, 9, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}
.hiwawa-lottery__prizes-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 215, 120, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(129, 140, 248, 0.07) 0%, transparent 45%);
    pointer-events: none;
}
.hiwawa-lottery__prizes-head {
    position: relative;
    text-align: center;
    margin-bottom: 36px;
}
.hiwawa-lottery__prizes-title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #1c1917;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.hiwawa-lottery__prizes-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--brand, #ff6b35), var(--brand-2, #ff9f1c), transparent);
    opacity: 0.85;
}
.hiwawa-lottery__prizes-sub {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #78716c;
    letter-spacing: 0.12em;
}
.hiwawa-lottery__podium {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(16px, 2.5vw, 32px);
    flex-wrap: wrap;
}
.hiwawa-lottery__podium-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(280px, 28vw);
    min-width: 200px;
    padding: 28px 22px 32px;
    border-radius: 20px;
    text-align: center;
    background: #fff;
    border: 2px solid #e7e5e4;
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hiwawa-lottery__podium-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
}
.hiwawa-lottery__podium-item--first {
    order: 2;
    z-index: 2;
    min-width: 240px;
    width: min(320px, 32vw);
    padding: 32px 26px 40px;
    border-width: 3px;
    border-color: #f59e0b;
    background: linear-gradient(165deg, #fffdf7 0%, #fff 40%, #fffbeb 100%);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.25),
        0 16px 48px -10px rgba(217, 119, 6, 0.35),
        0 8px 24px -8px rgba(15, 23, 42, 0.1);
    transform: translateY(-12px) scale(1.04);
}
.hiwawa-lottery__podium-item--first:hover {
    transform: translateY(-18px) scale(1.05);
}
.hiwawa-lottery__podium-item--second {
    order: 1;
    border-color: #818cf8;
    background: linear-gradient(165deg, #f8faff 0%, #fff 50%, #eef2ff 100%);
    box-shadow: 0 12px 36px -10px rgba(79, 70, 229, 0.2);
}
.hiwawa-lottery__podium-item--third {
    order: 3;
    border-color: #f472b6;
    background: linear-gradient(165deg, #fff8fc 0%, #fff 50%, #fdf2f8 100%);
    box-shadow: 0 12px 36px -10px rgba(219, 39, 119, 0.18);
}
.hiwawa-lottery__podium-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.hiwawa-lottery__podium-item--first .hiwawa-lottery__podium-rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}
.hiwawa-lottery__podium-item--second .hiwawa-lottery__podium-rank {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
}
.hiwawa-lottery__podium-item--third .hiwawa-lottery__podium-rank {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 50%, #db2777 100%);
}
.hiwawa-lottery__podium-media {
    width: 100%;
    aspect-ratio: 1;
    max-width: 200px;
    margin: 0 auto 18px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #f5f5f4 0%, #e7e5e4 100%);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(15, 23, 42, 0.08);
}
.hiwawa-lottery__podium-item--first .hiwawa-lottery__podium-media {
    max-width: 220px;
    border-radius: 18px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05), 0 8px 28px rgba(217, 119, 6, 0.2);
}
.hiwawa-lottery__podium-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.hiwawa-lottery__podium-item:hover .hiwawa-lottery__podium-img {
    transform: scale(1.05);
}
.hiwawa-lottery__podium-placeholder {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(40px, 8vw, 56px);
    color: #d6d3d1;
    background: linear-gradient(160deg, #fafaf9 0%, #e7e5e4 100%);
}
.hiwawa-lottery__podium-name {
    margin: 0;
    font-size: clamp(15px, 1.35vw, 18px);
    font-weight: 800;
    line-height: 1.45;
    color: #292524;
    max-width: 100%;
    word-break: break-word;
}
.hiwawa-lottery__podium-item--first .hiwawa-lottery__podium-name {
    font-size: clamp(17px, 1.5vw, 20px);
}

.hiwawa-lottery__modal, .hiwawa-lottery__tip-modal {
    position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.hiwawa-lottery__modal[hidden], .hiwawa-lottery__tip-modal[hidden] {
    display: none;
}
.hiwawa-lottery__modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hiwawa-lottery__modal-box {
    position: relative; z-index: 1; background: #fff; border-radius: 16px; padding: 32px;
    text-align: center; min-width: 300px; max-width: 400px;
    animation: lotteryModalIn .3s ease;
}
@keyframes lotteryModalIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.hiwawa-lottery__modal-icon { font-size: 48px; margin-bottom: 12px; }
.hiwawa-lottery__modal-icon.win { color: #f59e0b; }
.hiwawa-lottery__modal-icon.lose { color: #94a3b8; }
.hiwawa-lottery__modal-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: #1e293b; }
.hiwawa-lottery__modal-msg { color: #64748b; margin: 0 0 20px; }
.hiwawa-lottery__modal-btn {
    padding: 10px 32px; font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--brand, #ff6b35) 0%, var(--brand-2, #ff9f1c) 100%);
    border: none; border-radius: 50px; cursor: pointer;
}
.hiwawa-lottery__modal-box--tip { padding: 24px; min-width: 260px; }

.hiwawa-lottery--pc {
    max-width: var(--max, 1280px);
    margin: 0 auto;
    padding: 24px var(--page-gutter-x, 12px) 32px;
    box-sizing: border-box;
    width: 100%;
    min-height: calc(100dvh - 140px);
    display: flex;
    flex-direction: column;
}

.hiwawa-lottery--pc .hiwawa-lottery__container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.hiwawa-lottery--pc .hiwawa-lottery__header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.hiwawa-lottery--pc .hiwawa-lottery__columns {
    flex: 0 0 auto;
    display: grid;
    /* 三轨：左占位 | 抽牌 | 播报（与原先三栏视觉节奏一致，奖品展示在底部） */
    grid-template-columns: minmax(0, 1fr) minmax(260px, 500px) minmax(160px, 1fr);
    gap: 20px 12px;
    align-items: start;
}

.hiwawa-lottery--pc .hiwawa-lottery__col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hiwawa-lottery--pc .hiwawa-lottery__col--spacer {
    min-width: 0;
    pointer-events: none;
}

.hiwawa-lottery--pc .hiwawa-lottery__col--play {
    align-items: stretch;
    justify-content: flex-start;
}

.hiwawa-lottery--pc .hiwawa-lottery__col--notif {
    justify-content: flex-start;
}

.hiwawa-lottery--pc .hiwawa-lottery__prizes {
    margin-top: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
}

.hiwawa-lottery--pc .hiwawa-lottery__podium {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 20px;
}

.hiwawa-lottery--pc .hiwawa-lottery__play {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.hiwawa-lottery--pc .hiwawa-lottery__col--play .hiwawa-lottery__grid {
    max-width: 100%;
    width: 100%;
}

.hiwawa-lottery--pc .hiwawa-lottery__notifications {
    max-width: none;
    width: 100%;
    margin: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 16px;
    padding: 16px;
    box-sizing: border-box;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-viewport {
    flex: 0 0 auto;
    min-height: 180px;
    height: min(420px, calc(100dvh - 320px));
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eef2f6;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-marquee {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-marquee.is-animated {
    animation: hiwawaLotteryNotifMarquee var(--notif-marquee-duration, 22s) linear infinite;
    /* 由 JS 写入 --notif-marquee-end（单轨像素高度负值），避免百分比取整导致循环时卡顿 */
}

@keyframes hiwawaLotteryNotifMarquee {
    0% { transform: translateY(0); }
    100% { transform: translateY(var(--notif-marquee-end, -50%)); }
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-track {
    padding: 10px 12px;
    font-size: 13px;
    color: #64748b;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* 无缝轮播：双轨时去掉接缝处上下各 10px 的内边距叠层，避免出现「空白一行」 */
.hiwawa-lottery--pc .hiwawa-lottery__notif-track:first-child:not(:only-child) {
    padding-bottom: 0;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-track--dup {
    padding-top: 0;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-track--dup .hiwawa-lottery__notif-item:first-child {
    border-top: 1px solid #f1f5f9;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-track .hiwawa-lottery__notif-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.hiwawa-lottery--pc .hiwawa-lottery__notif-track .hiwawa-lottery__notif-item:last-child {
    border-bottom: none;
}

@media (prefers-reduced-motion: reduce) {
    .hiwawa-lottery--pc .hiwawa-lottery__notif-marquee.is-animated {
        animation: none;
    }
}