/* Floating Spin Button */
.floating-spin-btn {
    position: fixed;
    right: 25px;
    bottom: 115px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff0055, #ff5500, #ffaa00);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite, pulseGlow 2s infinite;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(255, 0, 85, 0.45);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 700;
    font-size: 14px;
    border: 2px solid #fff;
}

.floating-spin-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 85, 0.6);
    color: #fff;
}

.floating-spin-btn .spin-icon {
    font-size: 20px;
    animation: rotateIcon 3s linear infinite;
    display: inline-block;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 85, 0, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(255, 85, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 85, 0, 0); }
}

@keyframes rotateIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Overlay */
.spin-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.spin-modal-overlay.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s ease forwards;
}

.spin-modal-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    max-width: 420px !important;
    width: 92vw !important;
    margin: auto !important;
    padding: 24px 20px !important;
    text-align: center !important;
    position: relative !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35) !important;
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 3px solid #ffcc00 !important;
    box-sizing: border-box !important;
}

.spin-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #f1f1f1;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.spin-close-btn:hover {
    background: #ff3366;
    color: #fff;
    transform: rotate(90deg);
}

.spin-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: #d62828;
    margin-bottom: 4px;
}

.spin-header p {
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
}

/* Wheel Wrapper */
.wheel-container {
    position: relative;
    width: 290px;
    height: 290px;
    margin: 0 auto 20px;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 0 0 6px #ffd700;
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 26px solid #d62828;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.wheel-center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #ffd700, #ff8800);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.spin-action-btn {
    background: linear-gradient(135deg, #ff0055, #ff6600);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.4);
    transition: all 0.3s;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    display: block;
}

.spin-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 85, 0.6);
}

.spin-action-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Win Result Box */
.spin-result-box {
    display: none;
    animation: bounceIn 0.5s ease forwards;
    background: #f8fafc;
    border: 2px dashed #10b981;
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
}

.spin-result-box h4 {
    color: #10b981;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
}

.coupon-badge {
    display: inline-block;
    background: #ffd700;
    color: #111;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 16px;
    letter-spacing: 1px;
    margin: 8px 0;
    border: 1px solid #eab308;
    user-select: all;
}

.btn-checkout-now {
    display: inline-block;
    background: #10b981;
    color: #fff !important;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    margin-top: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-checkout-now:hover {
    background: #059669;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 576px) {
    .floating-spin-btn {
        right: 15px;
        bottom: 85px;
        padding: 8px 14px;
        font-size: 12px;
    }
    .spin-modal-overlay {
        padding: 10px !important;
    }
    .wheel-container {
        width: 220px !important;
        height: 220px !important;
        margin: 0 auto 12px !important;
    }
    .spin-modal-card {
        padding: 16px 12px !important;
        max-width: 320px !important;
        width: 90vw !important;
        margin: auto !important;
        border-radius: 16px !important;
    }
    .spin-header h3 {
        font-size: 17px !important;
    }
    .spin-header p {
        font-size: 11.5px !important;
        margin-bottom: 10px !important;
    }
}
