/* General styles */
#spin-chance-container {
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff4a41fa, #ff9800);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /* font-family: 'Comic Sans MS', cursive, sans-serif; */
    color: #333;
}

#spin-chance-container p {
    font-size: 20px;
    margin-bottom: 10px;
    text-shadow: 2px 2px #ffa132;
}

#csw-spin-btn {
    font-size: 17px;
    cursor: pointer;
    background: linear-gradient(45deg, #e91e63, #f44336);
    color: #fff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease;
    animation: spinBtnPulse 4s infinite;
    line-height: 50px;
}

@keyframes spinBtnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#csw-spin-btn:hover {
    background: linear-gradient(45deg, #f44336, #e91e63);
    transform: scale(1.05);
}


@keyframes buttonBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#reward-balance-container {
    text-align: center;
    background: linear-gradient(45deg, #4caf50, #8bc34a);
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /* font-family: 'Comic Sans MS', cursive, sans-serif; */
    color: #fff;
}

#reward-balance-container p {
    font-size: 17px;
    margin: 0;
    text-shadow: 2px 2px #333;
}

#reward-balance-container #reward-balance-value {
    font-size: 26px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px #000;
}

#csw-generate-coupon-btn {
    display: block;
    margin: 9px auto;
    padding: 0px 10px;
    background-color: #f13843;
    color: white;
    border: none;
    border-radius: 15PX;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}
/* Hover effect */
#csw-generate-coupon-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
}


#csw-spin-btn.inactive {
    background: linear-gradient(45deg, #ccc, #aaa);
    cursor: not-allowed;
    box-shadow: none;
}

#csw-coupon-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    perspective: 1000px;
}

.coupon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-out;
    transform-origin: bottom center;
}

.coupon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.coupon img.coupon-image {
    width: 100%;
    height: auto;
    transition: opacity 0.5s ease;
}

.coupon .coupon-value {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    display: none;
    color: #333;
    background: rgb(255 255 255 / 35%);
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.7em;
    color: #0e0d0d;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 2;
}

.coupon.selected .coupon-value {
    display: block;
}

.coupon.fadeOut {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.coupon.fadeIn {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.shuffling {
    animation: shuffle 0.2s linear infinite;
}

@keyframes shuffle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* Popup styling */
.csw-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.csw-popup.success {
    border: 2px solid #28a745;
}

.csw-popup.error {
    border: 2px solid #dc3545;
}

#csw-popup-message {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

#csw-popup-close {
    padding: 0px 4px;
    background: linear-gradient(45deg, #81c04b, #005f8b);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    line-height: 40px;
}
#csw-popup-close:hover {
    background: linear-gradient(45deg, #005f8b, #0073aa);
    transform: scale(1.05);
}

#csw-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#csw-preloader.hidden {
    display: none;
}

.preloader-content {
    text-align: center;
}

#coupon-history-container {
    text-align: center;
    margin-top: 20px;
}

#show-coupon-history {
    font-size: 16px;
    color: #0073aa;
    text-decoration: none;
}

#show-coupon-history:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 768px) {
    #csw-coupon-container {
        flex-direction: row;
    }
    
    .coupon {
        width: 100px;
        height: 100px;
        margin: 8px;
    }
}

.csw-badge-container {
    text-align: center;
    line-height: 5px;
}

#generate-coupon-btn {
    padding: 0px 4px;
    background: linear-gradient(45deg, #81c04b, #005f8b);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    line-height: 40px;
}
#generate-coupon-btn:hover {
    background: linear-gradient(45deg, #005f8b, #0073aa);
    transform: scale(1.05);
}

.shopping-level {
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

.level-name {
    background-color: #f8f9fa;
    color: #343a40;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-style: italic;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #ccc;
    height: 33px;
    margin-top: 15px;
    position: relative;
}

.progress {
    height: 100%;
    background-color: #4caf50;
    width: 0;
    transition: width 0.6s ease;
    position: relative;
    z-index: 2;
}

.progress img.level-icon {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.progress-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    top: 0;
    left: 0;
}

.progress-icons img.level-icon-static {
    position: absolute;
    top: -5px;
    height: 33px;
    width: 33px;
    background-color: #fff;
    border-radius: 50%;
    border: 2px solid #ccc;
}

.progress img.level-icon:hover {
    transform: scale(1.2);
}

.peek-lift {
    transform: translateY(-20px) rotateX(20deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Progress Message Styling */
.progress-message {
    margin: 15px 0;
    padding: 10px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .progress-message {
        font-size: 13px;
        padding: 8px;
        margin: 12px 0;
    }
}

.progress-text-container {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-text-container p {
    margin: 0;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .progress-text-container {
        padding: 8px;
    }
    .progress-text-container p {
        font-size: 13px;
    }
}