/* style.css — 现磨咖啡答题系统样式（V1 扁平卡通风格） */

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

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: #FFF5F0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── 页面容器 ──────────────────────────────────────── */
.page {
    display: none;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 32px 20px 40px;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.page.active { display: flex; }

/* ── 欢迎页 ─────────────────────────────────────────── */
.welcome-page { text-align: center; background: #FFF5F0; }

/* ── 今日最受欢迎饮品跑马灯 ─────────────────────────── */
.popular-bar {
    width: 80%;
    background: linear-gradient(90deg, transparent 0%, rgba(232,48,42,0.75) 20%, rgba(232,48,42,0.9) 50%, rgba(232,48,42,0.75) 80%, transparent 100%);
    border-radius: 0;
    height: 32px;
    overflow: hidden;
    margin-bottom: 14px;
    margin-top: 12px;
    position: relative;
}
.popular-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    position: absolute;
    top: 0;
    left: 0;
}
.popular-track span {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: 0.5px;
    padding-right: 60px;
}

/* Logo 图片占位（替换 assets/logo.png 即可生效） */
.brand-logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}



/* 品牌徽章 */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E8302A;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 7px 22px;
    border-radius: 999px;
    margin-bottom: 20px;
    box-shadow: 0 3px 0 #B5201A;
}
.brand-badge .star { font-size: 13px; }

.welcome-title {
    font-size: 30px;
    color: #1A1A1A;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.welcome-subtitle {
    font-size: 15px;
    color: #888;
    margin-bottom: 40px;
    line-height: 1.6;
}
.welcome-subtitle b { color: #E8302A; }

/* ── 主按钮 ─────────────────────────────────────────── */
.btn-primary {
    background: #E8302A;
    color: white;
    border: none;
    padding: 18px 60px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 5px 0 #B5201A, 0 8px 24px rgba(232,48,42,0.3);
    letter-spacing: 2px;
}
.btn-primary:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #B5201A, 0 4px 12px rgba(232,48,42,0.2);
}

/* ── 答题页 ─────────────────────────────────────────── */
.quiz-page { padding-top: 48px; background: #FFF5F0; }

.progress-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}
.progress-bar {
    flex: 1;
    height: 10px;
    background: #FFD9D5;
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #E8302A;
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(.4,0,.2,1);
}
.progress-label {
    font-size: 13px;
    font-weight: 700;
    color: #E8302A;
    white-space: nowrap;
}

.question-card {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    padding: 24px 55px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 0 #F0C8C4, 0 8px 24px rgba(232,48,42,0.08);
}
.question-emoji {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}
.question-title {
    font-size: 20px;
    color: #1A1A1A;
    font-weight: 800;
    line-height: 1.5;
}

.options-container { width: 100%; }

.option-item {
    background: #fff;
    border: 2.5px solid #FFD9D5;
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 3px 0 #F0C8C4;
}
.option-item:active { transform: translateY(2px); box-shadow: 0 1px 0 #F0C8C4; }
.option-item.selected {
    background: #E8302A;
    border-color: #E8302A;
    box-shadow: 0 3px 0 #B5201A;
}
.option-letter {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: #FFD9D5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    color: #E8302A;
    transition: all 0.15s;
}
.option-item.selected .option-letter {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.option-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    font-weight: 600;
}
.option-item.selected .option-text { color: #fff; }

/* ── 过渡页 ─────────────────────────────────────────── */
.loading-page {
    text-align: center;
    background: linear-gradient(160deg, #E8302A 0%, #FF6040 60%, #FF8C42 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    position: fixed;   /* fixed 确保铺满整个视口 */
    inset: 0;
    width: 100vw;
    max-width: 100vw;  /* 覆盖 .page 的 max-width: 480px */
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    z-index: 10;
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 背景大光晕 */
.loading-page::before {
    content: '';
    position: absolute;
    top: -100px; left: 50%;
    transform: translateX(-50%);
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50%       { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}

/* ── 浮动气泡粒子 ─── */
.bubbles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.bubble {
    position: absolute;
    bottom: -40px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.35);
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0%   { transform: translateY(0) scale(1);   opacity: 0.7; }
    80%  { opacity: 0.4; }
    100% { transform: translateY(-110vh) scale(0.6); opacity: 0; }
}

/* 过渡页 Logo 跳动 */
.loading-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 28px;
    display: block;
    animation: logoBounce 1.5s ease-in-out infinite;
}
@keyframes logoBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    40%       { transform: scale(1.1); }
}

.loading-text {
    font-size: 24px;
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: textPop 0.5s cubic-bezier(.36,.07,.19,.97) 0.2s both;
}
@keyframes textPop {
    0%   { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
.loading-subtext {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 28px;
}

.keywords-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.keyword-pill {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 22px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.55);
    backdrop-filter: blur(6px);
    animation: pillBounce 0.5s cubic-bezier(.36,.07,.19,.97) both;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.keyword-pill:nth-child(1) { animation-delay: 0.1s; }
.keyword-pill:nth-child(2) { animation-delay: 0.28s; }
.keyword-pill:nth-child(3) { animation-delay: 0.46s; }
@keyframes pillBounce {
    0%   { opacity: 0; transform: translateY(16px) scale(0.8); }
    60%  { transform: translateY(-4px) scale(1.08); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 扫描进度条 ─── */
.loading-scan-wrap {
    position: absolute;
    bottom: 32px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    overflow: hidden;
}
.loading-scan-bar {
    height: 100%;
    width: 40%;
    background: rgba(255,255,255,0.75);
    border-radius: 999px;
    animation: scanSlide 1.6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
@keyframes scanSlide {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

/* ── 结果页 ─────────────────────────────────────────── */
.result-page {
    text-align: center;
    background: #FFF5F0;
    padding: 28px 20px 40px;
    justify-content: flex-start;
    position: relative;
    overflow: visible;  /* 不裁剪光晕 box-shadow */
}

/* ── 全屏闪光 overlay ── */
.hidden-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,220,50,0.95) 0%, rgba(255,160,0,0.6) 40%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
}
.hidden-flash.fire {
    animation: flashBurst 1.1s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes flashBurst {
    0%   { opacity: 0;    transform: scale(0.3); }
    15%  { opacity: 1;    transform: scale(1.15); }
    40%  { opacity: 0.85; transform: scale(1); }
    100% { opacity: 0;    transform: scale(1.4); }
}

/* ── 隐藏款：粒子容器公共（fixed 置顶，不被任何元素遮挡） ── */
.stars-container,
.fireworks-container,
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 99999;
}

/* ── 两侧持续礼花容器 ── */
.side-fireworks-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 99998;
}

/* ── 星星粒子 ── */
.star-particle {
    position: absolute;
    top: -30px;
    animation: starFall linear forwards;
    opacity: 0;
    filter: drop-shadow(0 0 4px rgba(255,200,0,0.9));
}
@keyframes starFall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    70%  { opacity: 0.9; }
    100% { transform: translateY(115vh) rotate(480deg) scale(0.3); opacity: 0; }
}

/* ── 彩带纸屑 ── */
.confetti-piece {
    position: absolute;
    top: -16px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg) skewX(0deg); opacity: 1; }
    50%  { opacity: 0.9; }
    100% { transform: translateY(115vh) rotate(720deg) skewX(20deg); opacity: 0; }
}

/* ── 隐藏款徽章 ── */
.hidden-badge {
    display: none;
    background: linear-gradient(135deg, #FFE44D 0%, #FFB300 50%, #FF8C00 100%);
    color: #5A2D00;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 4px;
    padding: 10px 32px;
    border-radius: 999px;
    margin-bottom: 14px;
    /* 多层 box-shadow 从内到外逐渐消散，消除硬切边缘 */
    box-shadow:
        0 4px 0 #B86000,
        0 0 6px  3px  rgba(255,200,0,0.90),
        0 0 16px 6px  rgba(255,180,0,0.65),
        0 0 32px 12px rgba(255,160,0,0.38),
        0 0 56px 22px rgba(255,140,0,0.18),
        0 0 90px 38px rgba(255,120,0,0.07);
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.hidden-badge.show {
    display: inline-block;
    animation: badgePop 0.7s cubic-bezier(.36,.07,.19,.97) both, badgeGlow 1.8s ease-in-out 0.7s infinite;
}
@keyframes badgePop {
    0%   { opacity: 0; transform: scale(0.3) rotate(-8deg); }
    55%  { transform: scale(1.18) rotate(3deg); }
    75%  { transform: scale(0.94) rotate(-1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes badgeGlow {
    0%, 100% {
        box-shadow:
            0 4px 0 #B86000,
            0 0 6px  3px  rgba(255,200,0,0.85),
            0 0 18px 7px  rgba(255,180,0,0.55),
            0 0 38px 16px rgba(255,160,0,0.28),
            0 0 65px 28px rgba(255,140,0,0.12),
            0 0 95px 44px rgba(255,120,0,0.05);
    }
    50% {
        box-shadow:
            0 4px 0 #B86000,
            0 0 10px 4px  rgba(255,210,0,1.00),
            0 0 26px 10px rgba(255,190,0,0.72),
            0 0 52px 22px rgba(255,165,0,0.42),
            0 0 85px 38px rgba(255,140,0,0.20),
            0 0 120px 55px rgba(255,120,0,0.08);
    }
}

/* ── 超级隐藏款标签（钻石紫色，覆盖金色隐藏款样式） ── */
.hidden-badge.ultra-hidden-badge {
    background: linear-gradient(135deg, #E0C3FC 0%, #A855F7 40%, #7C3AED 70%, #4F46E5 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    box-shadow:
        0 4px 0 #3730A3,
        0 0 6px  3px  rgba(168,85,247,0.90),
        0 0 16px 6px  rgba(139,92,246,0.65),
        0 0 32px 12px rgba(124,58,237,0.38),
        0 0 56px 22px rgba(109,40,217,0.18),
        0 0 90px 38px rgba(91,33,182,0.07);
}
.hidden-badge.ultra-hidden-badge.show {
    animation: badgePop 0.7s cubic-bezier(.36,.07,.19,.97) both, ultraBadgeGlow 1.8s ease-in-out 0.7s infinite;
}
@keyframes ultraBadgeGlow {
    0%, 100% {
        box-shadow:
            0 4px 0 #3730A3,
            0 0 6px  3px  rgba(168,85,247,0.85),
            0 0 18px 7px  rgba(139,92,246,0.55),
            0 0 38px 16px rgba(124,58,237,0.28),
            0 0 65px 28px rgba(109,40,217,0.12),
            0 0 95px 44px rgba(91,33,182,0.05);
    }
    50% {
        box-shadow:
            0 4px 0 #3730A3,
            0 0 10px 4px  rgba(196,132,252,1.00),
            0 0 26px 10px rgba(168,85,247,0.72),
            0 0 52px 22px rgba(139,92,246,0.42),
            0 0 85px 38px rgba(124,58,237,0.20),
            0 0 120px 55px rgba(109,40,217,0.08);
    }
}

/* ── 隐藏款：图片金色光晕 + 弹入 ── */
.drink-image-wrap.hidden-glow {
    animation: imgPopIn 0.6s cubic-bezier(.36,.07,.19,.97) both, glowPulseGold 2s ease-in-out 0.6s infinite;
}
@keyframes imgPopIn {
    0%   { transform: scale(0.7); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    80%  { transform: scale(0.97); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes glowPulseGold {
    0%, 100% { box-shadow: 0 0 0 3px #FFD700, 0 0 24px 6px rgba(255,200,0,0.5), 0 6px 0 #F0C8C4; }
    50%       { box-shadow: 0 0 0 5px #FFA500, 0 0 48px 14px rgba(255,160,0,0.75), 0 6px 0 #F0C8C4; }
}

/* ── 隐藏款：优惠框金色 ── */
.coupon-box.hidden-gold {
    background: linear-gradient(135deg, #FFE44D 0%, #FFB300 60%, #FF8C00 100%);
    /* 多层渐散光晕，消除平切边缘 */
    box-shadow:
        0 5px 0 #B86000,
        0 0 8px  4px  rgba(255,200,0,0.80),
        0 0 20px 8px  rgba(255,180,0,0.50),
        0 0 40px 18px rgba(255,155,0,0.28),
        0 0 70px 32px rgba(255,130,0,0.13),
        0 0 105px 50px rgba(255,110,0,0.05);
    color: #5A2D00;
    animation: couponShine 2.5s ease-in-out infinite;
}
.coupon-box.hidden-gold .coupon-title { color: rgba(90,45,0,0.75); }
.coupon-box.hidden-gold .coupon-content { color: #3A1800; font-size: 19px; }
@keyframes couponShine {
    0%, 100% {
        box-shadow:
            0 5px 0 #B86000,
            0 0 6px  3px  rgba(255,195,0,0.75),
            0 0 16px 7px  rgba(255,175,0,0.45),
            0 0 34px 16px rgba(255,150,0,0.22),
            0 0 60px 28px rgba(255,130,0,0.10),
            0 0 90px 44px rgba(255,110,0,0.04);
    }
    50% {
        box-shadow:
            0 5px 0 #B86000,
            0 0 12px 5px  rgba(255,210,0,0.95),
            0 0 28px 12px rgba(255,185,0,0.62),
            0 0 55px 24px rgba(255,160,0,0.35),
            0 0 88px 40px rgba(255,135,0,0.16),
            0 0 125px 60px rgba(255,115,0,0.06);
    }
}

/* 饮品图片区域（750×564 横向图，宽高比约 4:3） */
.drink-image-wrap {
    width: 72%;
    max-width: 280px;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 16px;
    box-shadow: 0 6px 0 #F0C8C4, 0 10px 30px rgba(232,48,42,0.12);
    background: #fff;
    aspect-ratio: 750 / 564;   /* 保持原图比例 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.drink-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.personality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1A1A1A;
    color: #fff;
    padding: 8px 24px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.drink-name {
    font-size: 38px;
    color: #E8302A;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.why-section {
    background: #fff;
    border-radius: 20px;
    padding: 20px 22px;
    margin-bottom: 16px;
    width: 100%;
    text-align: left;
    box-shadow: 0 4px 0 #F0C8C4;
}
.why-title {
    font-size: 13px;
    color: #E8302A;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.why-dot {
    width: 8px; height: 8px;
    background: #E8302A;
    border-radius: 50%;
    display: inline-block;
}
.why-content {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.coupon-box {
    background: #E8302A;
    border-radius: 18px;
    padding: 20px 28px;
    margin-bottom: 24px;
    width: 100%;
    color: white;
    box-shadow: 0 5px 0 #B5201A;
    position: relative;
    overflow: hidden;
}
.coupon-box::before {
    content: '🎁';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    opacity: 0.3;
}
.coupon-title {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.8;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.coupon-content {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.4;
}

/* ── 次要按钮 ───────────────────────────────────────── */
.result-btn-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}
.btn-secondary {
    flex: 1;
    background: #fff;
    color: #E8302A;
    border: 3px solid #E8302A;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 800;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 0 #F0C8C4;
    letter-spacing: 1px;
}
.btn-secondary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #F0C8C4;
}
.btn-home {
    flex: 1;
    background: #fff;
    color: #888;
    border: 2.5px solid #ddd;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 3px 0 #eee;
    letter-spacing: 1px;
    transition: all 0.15s;
}
.btn-home:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #eee;
}

.auto-return-hint {
    font-size: 12px;
    color: #bbb;
    margin-top: 16px;
}

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 400px) {
    .welcome-title  { font-size: 26px; }
    .question-title { font-size: 18px; }
    .drink-name     { font-size: 30px; }
}

/* ── SW 图片缓存进度条 ───────────────────────────────── */
.sw-cache-bar {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    background: rgba(20, 20, 20, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 18px 12px;
    z-index: 99998;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.sw-cache-bar.visible {
    transform: translateY(0);
}
.sw-cache-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}
.sw-cache-bar-label {
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.2px;
    opacity: 0.9;
}
.sw-cache-bar-count {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}
.sw-cache-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.18);
    border-radius: 3px;
    overflow: hidden;
}
.sw-cache-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E8302A, #ff7043);
    border-radius: 3px;
    transition: width 0.35s ease;
}
.sw-cache-bar-fill.done {
    background: linear-gradient(90deg, #4caf50, #81c784);
}

/* ── SW 缓存/更新 Toast 提示 ─────────────────────────── */
.sw-toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(30, 30, 30, 0.82);
    color: #fff;
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    z-index: 99999;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 80vw;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.sw-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.sw-toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}
