/* lucky-bag.css — 福袋样式，从 index.html 分离 */
/* Lucky Bag Modal */
.lucky-bag-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 500;
    display: flex; align-items: center; justify-content: center;
}
.lucky-bag-modal {
    background: #1a1a1a; border-radius: 12px; width: 320px; max-width: 90vw;
    padding: 20px; border: 1px solid #333;
}
.lucky-bag-modal h3 { margin: 0 0 16px; font-size: 16px; color: #fff; text-align: center; }
.lucky-bag-modal .lb-type-tabs {
    display: flex; gap: 8px; margin-bottom: 14px;
}
.lucky-bag-modal .lb-type-tab {
    flex: 1; padding: 8px 0; border-radius: 8px; border: 1px solid #444;
    background: #2a2a2a; color: #aaa; font-size: 13px; cursor: pointer; font-weight: 500;
}
.lucky-bag-modal .lb-type-tab.active {
    background: rgba(255,77,106,0.15); border-color: #ff4d6a; color: #ff4d6a; font-weight: 700;
}
.lucky-bag-modal .lb-form-group { margin-bottom: 12px; }
.lucky-bag-modal .lb-form-group label {
    display: block; font-size: 13px; color: #aaa; margin-bottom: 4px;
}
.lucky-bag-modal .lb-form-group input {
    width: 100%; padding: 8px 12px; background: #333; border: 1px solid #444;
    border-radius: 8px; color: #fff; font-size: 14px; outline: none; box-sizing: border-box;
}
.lucky-bag-modal .lb-form-group input:focus { border-color: #ff4d6a; }
.lucky-bag-modal .lb-form-group input::placeholder { color: #666; }
.lucky-bag-modal-btns {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px;
}
.lucky-bag-modal-btns button {
    padding: 8px 20px; border-radius: 20px; border: none;
    font-size: 13px; cursor: pointer; font-weight: 500;
}
.lucky-bag-modal-btns .btn-cancel { background: #333; color: #ccc; }
.lucky-bag-modal-btns .btn-confirm { background: #ff4d6a; color: #fff; }
/* Lucky Bag Chat Notification */
.chat-msg.lucky-bag-msg { background: rgba(255,77,106,0.35); border-radius: 12px; padding: 4px 10px; margin-bottom: 6px; display: block; width: fit-content; }
.chat-msg .chat-lucky-bag-tag { background: #ff4d6a; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-right: 6px; }
/* Lucky Bag Countdown Floating */
.lucky-bag-countdown {
    position: absolute; right: 8px; top: 60px; z-index: 15;
    display: flex; flex-direction: column; align-items: center;
    background: rgba(0,0,0,0.6); border-radius: 12px; padding: 8px 10px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    cursor: pointer; min-width: 60px;
}
.lucky-bag-countdown img { width: 36px; height: 36px; margin-bottom: 4px; display: block; margin-left: auto; margin-right: auto; }
.lucky-bag-countdown .lb-cd-time { color: #fff; font-size: 12px; font-weight: 700; text-align: center; width: 100%; line-height: 1.3; }
.lucky-bag-countdown.lb-grab-active { background: rgba(255,77,106,0.7); }
/* Lucky Bag Detail Popup */
.lb-detail-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 600;
    display: flex; align-items: center; justify-content: center;
}
.lb-detail-popup {
    width: 300px; max-width: 90vw; border-radius: 16px; overflow: hidden;
    background: linear-gradient(180deg, #3a1a0a 0%, #1a0a00 50%, #1a1a1a 100%);
    text-align: center; position: relative; padding-bottom: 20px;
}
.lb-detail-popup .lb-dp-top {
    padding: 20px 20px 12px; position: relative;
    background: radial-gradient(ellipse at center top, rgba(255,140,0,0.2) 0%, transparent 70%);
}
.lb-detail-popup .lb-dp-icon { width: 80px; height: 80px; margin-bottom: 8px; }
.lb-detail-popup .lb-dp-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.lb-detail-popup .lb-dp-info { font-size: 13px; color: #ccc; }
.lb-detail-popup .lb-dp-info b { color: #ffca28; font-size: 16px; }
.lb-detail-popup .lb-dp-close {
    position: absolute; top: 10px; right: 12px; background: none; border: none;
    color: #888; font-size: 22px; cursor: pointer; line-height: 1;
}
.lb-detail-popup .lb-dp-cd-section {
    background: rgba(255,255,255,0.08); border-radius: 24px;
    margin: 12px 24px; padding: 10px 16px;
}
.lb-detail-popup .lb-dp-cd-label { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.lb-detail-popup .lb-dp-cd-row {
    display: flex; justify-content: center; align-items: center; gap: 4px;
}
.lb-detail-popup .lb-dp-cd-num {
    background: rgba(0,0,0,0.4); border-radius: 6px; padding: 4px 8px;
    font-size: 22px; font-weight: 700; color: #fff; min-width: 36px; display: inline-block;
}
.lb-detail-popup .lb-dp-cd-sep { font-size: 14px; color: #888; padding: 0 2px; }
.lb-detail-popup .lb-dp-cd-unit { font-size: 11px; color: #888; display: block; margin-top: 2px; }
.lb-detail-popup .lb-dp-btn {
    display: block; width: calc(100% - 48px); margin: 16px auto 0;
    padding: 14px; border-radius: 28px; border: none; font-size: 16px;
    font-weight: 700; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, #ff6a00 0%, #ff4d6a 100%);
}
.lb-detail-popup .lb-dp-btn:disabled {
    background: #555; color: #999; cursor: not-allowed;
}
/* Lucky Bag Result Popup (Success / Fail) */
.lb-result-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 650;
    display: flex; align-items: center; justify-content: center;
}
.lb-result-popup {
    width: 300px; max-width: 90vw; border-radius: 16px; overflow: hidden;
    text-align: center; position: relative; padding-bottom: 20px;
}
.lb-result-popup.success {
    background: linear-gradient(180deg, #ff8c00 0%, #ff6a00 30%, #fff5e6 60%, #fff 100%);
}
.lb-result-popup.fail {
    background: linear-gradient(180deg, #555 0%, #444 30%, #2a2a2a 60%, #1a1a1a 100%);
}
.lb-result-popup .lb-rp-title {
    padding: 16px 0 4px; font-size: 20px; font-weight: 700;
}
.lb-result-popup.success .lb-rp-title { color: #fff; }
.lb-result-popup.fail .lb-rp-title { color: #fff; }
.lb-result-popup .lb-rp-subtitle {
    font-size: 16px; font-weight: 600; margin: 4px 0 8px;
}
.lb-result-popup.success .lb-rp-subtitle { color: #8b4513; }
.lb-result-popup.fail .lb-rp-subtitle { color: #ccc; }
.lb-result-popup .lb-rp-amount {
    font-size: 36px; font-weight: 700; margin: 8px 0 4px;
}
.lb-result-popup.success .lb-rp-amount { color: #d4380d; }
.lb-result-popup .lb-rp-desc { font-size: 13px; margin-bottom: 8px; }
.lb-result-popup.success .lb-rp-desc { color: #8b6914; }
.lb-result-popup.fail .lb-rp-desc { color: #999; }
.lb-result-popup .lb-rp-icon { width: 80px; height: 80px; display: block; }
/* Coin decorations for lucky bag result */
.lb-rp-coins-wrap {
    position: relative; width: 160px; height: 120px; margin: 8px auto;
}
.lb-rp-coins-wrap .lb-rp-icon {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 80px; height: 80px; margin: 0;
}
.lb-coin {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe066, #ffc107, #ff9800);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 2px 3px rgba(255,255,255,0.6);
    animation: lbCoinFloat 2s ease-in-out infinite;
}
.lb-coin.c1 { left: 8px; top: 18px; width: 20px; height: 20px; animation-delay: 0s; }
.lb-coin.c2 { right: 10px; top: 12px; width: 24px; height: 24px; animation-delay: 0.3s; }
.lb-coin.c3 { left: 20px; bottom: 8px; width: 16px; height: 16px; animation-delay: 0.6s; }
.lb-coin.c4 { right: 18px; bottom: 12px; width: 22px; height: 22px; animation-delay: 0.9s; }
.lb-coin.c5 { left: 2px; top: 55px; width: 14px; height: 14px; animation-delay: 1.2s; }
.lb-coin.c6 { right: 5px; top: 48px; width: 16px; height: 16px; animation-delay: 1.5s; }
.lb-sparkle {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 6px 2px rgba(255,215,0,0.8);
    animation: lbSparkle 1.5s ease-in-out infinite;
}
.lb-sparkle.s1 { left: 30px; top: 5px; animation-delay: 0.2s; }
.lb-sparkle.s2 { right: 28px; top: 8px; animation-delay: 0.7s; }
.lb-sparkle.s3 { left: 15px; bottom: 5px; animation-delay: 1.1s; }
.lb-sparkle.s4 { right: 12px; bottom: 3px; animation-delay: 0.4s; }
@keyframes lbCoinFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes lbSparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
.lb-result-popup .lb-rp-btn {
    display: block; width: calc(100% - 48px); margin: 12px auto 0;
    padding: 14px; border-radius: 28px; border: 2px solid #ff6a00;
    font-size: 16px; font-weight: 700; cursor: pointer;
    background: #fff; color: #ff6a00;
}
.lb-result-popup.fail .lb-rp-btn {
    background: #444; color: #fff; border-color: #666;
}
.lb-result-popup .lb-rp-footer {
    font-size: 12px; color: #999; margin-top: 12px;
}
/* Lucky bag gift tip section */
.lb-rp-gift-tip {
    background: rgba(255,255,255,0.12); border-radius: 12px;
    padding: 12px; margin: 10px 16px 0; text-align: center;
}
.lb-rp-gift-title { font-size: 15px; font-weight: 700; color: #333; }
.lb-rp-gift-subtitle { font-size: 12px; color: #999; margin-top: 4px; }
.lb-rp-gift-items {
    display: flex; justify-content: center; gap: 20px; margin-top: 10px;
}
.lb-rp-gift-item {
    display: flex; flex-direction: column; align-items: center; cursor: pointer;
    padding: 8px 12px; border-radius: 12px; border: 2px solid transparent; transition: border-color 0.2s;
}
.lb-rp-gift-item.selected { border-color: #ff6a00; background: rgba(255,106,0,0.08); }
.lb-rp-gift-item img { width: 56px; height: 56px; object-fit: contain; }
.lb-rp-gift-item .lb-gift-name { font-size: 12px; color: #333; margin-top: 4px; }
.lb-rp-gift-item .lb-gift-coin { font-size: 11px; color: #ff9800; margin-top: 2px; display: flex; align-items: center; gap: 2px; }
.lb-rp-gift-send-btn {
    display: block; width: calc(100% - 24px); margin: 12px auto 0;
    padding: 12px; border-radius: 24px; border: none;
    background: linear-gradient(135deg, #ff6a00, #ff9800); color: #fff;
    font-size: 15px; font-weight: 700; cursor: pointer;
}
.lb-rp-gift-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
