.zfd-float-box {
    position: fixed !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    animation: zfd-float-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zfd-float-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.zfd-float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 50%, #ffd93d 100%);
    color: #fff;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), 0 0 0 0 rgba(255, 107, 107, 0.6);
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zfd-float-pulse 2s infinite;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
}

.zfd-float-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 28px rgba(255, 107, 107, 0.5), 0 0 0 6px rgba(255, 107, 107, 0.1);
}

.zfd-float-btn:active {
    transform: scale(0.95);
}

@keyframes zfd-float-pulse {
    0% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), 0 0 0 0 rgba(255, 107, 107, 0.6); }
    70% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), 0 0 0 12px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), 0 0 0 0 rgba(255, 107, 107, 0); }
}

.zfd-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff4d4d, #c20000);
    color: #fff;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #fff;
    padding: 0 5px;
    animation: zfd-badge-bounce 0.5s ease;
}

@keyframes zfd-badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.zfd-float-modal {
    position: fixed;
    width: 340px;
    max-width: 92vw;
    background: var(--main-bg-color, #fff);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--main-border-color, rgba(0,0,0,0.05));
    padding: 0;
    z-index: 99998;
    display: none;
    overflow: hidden;
    animation: zfd-modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zfd-modal-in {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.zfd-float-modal.show {
    display: block;
}

.zfd-float-modal-header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.zfd-float-modal-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.zfd-float-close {
    background: rgba(255,255,255,0.25);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.zfd-float-close:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

.zfd-float-prize {
    background: linear-gradient(135deg, #fff7e6, #ffe7d6);
    border: 2px dashed #ffb020;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin: 16px;
    position: relative;
}

.zfd-float-prize::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(255, 176, 32, 0.3);
    border-radius: 8px;
    pointer-events: none;
}

.zfd-float-prize-icon {
    font-size: 44px;
    animation: zfd-gift-bounce 1.5s infinite;
}

@keyframes zfd-gift-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-8px) rotate(5deg); }
}

.zfd-float-prize-text {
    font-size: 14px;
    color: #664d00;
    margin-top: 8px;
    line-height: 1.6;
    font-weight: 500;
}

.zfd-float-countdown {
    background: var(--muted-bg-color, #f8f9fa);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--muted-color, #666);
    margin: 0 16px 12px;
    line-height: 1.8;
}

.zfd-float-countdown strong {
    color: #ff4d4d;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    display: block;
    margin-top: 4px;
}

.zfd-float-actions {
    padding: 0 16px 4px;
}

.zfd-float-actions .btn {
    margin: 6px 0;
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.zfd-float-actions .btn:active {
    transform: scale(0.97);
}

.zfd-float-actions .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.zfd-float-actions .btn.jb-theme {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.35);
}

.zfd-float-actions .btn.jb-theme:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
    transform: translateY(-1px);
}

.zfd-float-actions .btn.jb-cyan {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 114, 255, 0.35);
}

.zfd-float-actions .btn.jb-cyan:hover {
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.45);
    transform: translateY(-1px);
}

.zfd-float-actions .btn.jb-yellow {
    background: linear-gradient(135deg, #f5a623, #f78b00);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
}

.zfd-float-actions .btn.jb-yellow:hover {
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.45);
}

.zfd-float-actions .btn.jb-gray {
    background: var(--muted-bg-color, #f0f0f0);
    color: var(--muted-color, #666);
    border: 1px solid var(--main-border-color, #e0e0e0);
}

.zfd-float-actions .btn.jb-gray:hover {
    background: var(--main-bg-color, #fff);
}

.zfd-float-share-wrap {
    padding: 0 16px 12px;
}

.zfd-float-share-wrap input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--main-border-color, #ddd);
    font-size: 13px;
    background: var(--main-bg-color, #fff);
    color: var(--main-color, #333);
}

.zfd-float-copy {
    margin-top: 6px;
    width: 100%;
    padding: 6px !important;
    border-radius: 8px !important;
    background: var(--main-bg-color, #fff) !important;
    border: 1px solid var(--main-border-color, #ddd) !important;
    cursor: pointer;
}

.zfd-float-hide {
    width: auto !important;
    background: transparent !important;
    border: none !important;
    color: var(--muted-color, #999) !important;
    font-size: 12px !important;
    text-decoration: underline;
    padding: 4px !important;
    margin-top: 4px !important;
}

.zfd-float-empty {
    text-align: center;
    color: var(--muted-color, #999);
    padding: 30px 20px;
    font-size: 14px;
}

.zfd-float-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

body.dark-theme .zfd-float-modal {
    background: var(--muted-bg-color, #1e1e1e);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-theme .zfd-float-prize {
    background: linear-gradient(135deg, #2b2510, #3b2e18);
    border-color: #d6a600;
}

body.dark-theme .zfd-float-prize-text {
    color: #ffd93d;
}

body.dark-theme .zfd-float-countdown {
    background: rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
    .zfd-float-box {
        right: 15px;
        bottom: 20px;
    }

    .zfd-float-modal {
        right: 15px;
        bottom: 90px;
        width: calc(100vw - 30px);
    }

    .zfd-float-btn {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }
}
