.spin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 40, 0.8) 50%, rgba(0, 0, 0, 0.95) 100%);
    background-size: 400% 400%;
    animation: backdropPulse 12s ease infinite;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    padding: 20px 15px;
    width: 100%;
    max-width: 375px;
    border-radius: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: auto;
    margin: auto;
    border: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ff4757, #c44569);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.close-button:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #ff3742, #e84118);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.close-button:active {
    transform: scale(0.95) rotate(90deg);
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 50%;
    perspective: 1000px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.5), 
        inset 0 0 20px rgba(255, 215, 0, 0.1),
        0 0 40px rgba(255, 215, 0, 0.2);
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.05), transparent);
}

.wheel {
    position: relative;
    width: 93%;
    height: 93%;
    border-radius: 50%;
    border: 8px solid #df1886;
    box-shadow: 0 0 50px rgba(196, 179, 179, 0.3);
    overflow: hidden;
    transition: transform 5s ease-out;
    transform: rotate(45deg);
    margin-top: -45px;
}

.segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0% 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
    transform-style: preserve-3d;
}

.segment-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    margin-left: 8px;
    margin-bottom: -8px;
    gap: 2px;
    transform: rotate(-32deg);
}

.segment-image {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: contain;
    margin-top: 14px;
}

.segment-name {
    font-size: 16px;
    color: #fff;
    margin-top: 12px;
    font-weight: 600;
}

.banner-img img {
    position: absolute;
    width: 100%;
    height: auto;
    margin-top: -75px !important;
    margin-left: -2px !important;
    object-fit: contain;
}

.spin-button {
    position: absolute;
    top: 47%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    border: 4px solid #a259f9;
    border-radius: 50%;
    background: radial-gradient(circle at center, #9748f7, #a259f9, #4a1e92);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.spin-button:hover {
    background: radial-gradient(circle at center, #a259f9, #b36bfb, #5a23b0);
}

.spin-button:disabled {
    background-color: #8a42f0;
    cursor: not-allowed;
}

.arrow {
    position: absolute;
    top: 140px;
    left: 33%;
    transform: translateX(-50%);
    z-index: 15;
    rotate: 90deg;
    width: 105px;
    height: 105px;
}
.arrow svg {
    width: 80%;
    height: 80%;
    fill: #ffe02c;
}

.btn2 {
    margin-top: 60px;
    justify-content: center;
    text-align: center;
    align-items: center;
    width: 100%;
    max-width: 280px;
    padding: 12px 15px;
    background-color: #ffe02c;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: rgb(0, 0, 0);
    box-shadow: rgba(29, 34, 37, 0.1) 0px 4px 8px 0px;
    border-radius: 8px;
    margin-left: auto;
    margin-right: auto;
}

.btn3 {
    margin-top: 15px;
    justify-content: center;
    text-align: center;
    align-items: center;
    width: 100%;
    max-width: 280px;
    padding: 12px 15px;
    background-color: #000000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    box-shadow: rgba(29, 34, 37, 0.1) 0px 4px 8px 0px;
    margin: 15px auto;
    text-decoration: none;
    display: block;
    border-radius: 8px;
}

.dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #ffffff;
    box-shadow: 10px 10px 15px rgba(182, 181, 181, 0.9);
}

.dot-1 { top: 0%; left: 48%; transform: translate(-50%, -50%); }
.dot-2 { top: 26%; left: 5%; transform: translate(-15%, -50%); }
.dot-3 { top: 8%; right: 72%; transform: translate(-90%, -50%); }
.dot-4 { top: 92%; left: 77%; transform: translate(-50%, -50%); }
.dot-5 { top: 100%; left: 54%; transform: translate(-50%, -50%); }
.dot-6 { top: 95%; left: 28%; transform: translate(-50%, -50%); }
.dot-7 { top: 80%; left: 10%; transform: translate(-50%, -50%); }
.dot-8 { top: 53%; left: 0%; transform: translate(-50%, -50%); }
.dot-9 { top: 5%; left: 76%; transform: translate(-190%, -40%); }
.dot-10 { top: 23%; left: 92%; transform: translate(-50%, -50%); }
.dot-11 { top: 47%; left: 100%; transform: translate(-50%, -50%); }
.dot-12 { top: 72%; left: 95%; transform: translate(-50%, -50%); }

.s-container {
    margin-left: -115px;
    margin-top: -15px;
    transform: scale(0.8);
}

.reward-message {
    text-align: center;
    padding: 10px;
}

.hidden {
    display: none;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.spin-container {
    justify-content: center;
    align-items: center;
}

/* Spin Wheel Icon Button in Navigation */
.spin-wheel-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

/* Header specific styling */
.header-spin-wheel {
    margin-left: 8px;
}

.spin-wheel-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: spin 2s linear infinite;
    transition: all 0.3s ease;
}

/* Keyframe animation for infinite spinning */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animated background gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated modal backdrop */
@keyframes backdropPulse {
    0% {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 40, 0.8) 50%, rgba(0, 0, 0, 0.95) 100%);
    }
    50% {
        background: linear-gradient(135deg, rgba(10, 10, 25, 0.9) 0%, rgba(30, 30, 60, 0.7) 50%, rgba(10, 10, 25, 0.9) 100%);
    }
    100% {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 40, 0.8) 50%, rgba(0, 0, 0, 0.95) 100%);
    }
}

.spin-wheel-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.6);
}

.spin-wheel-icon:hover .spin-wheel-image {
    animation: spin 0.5s linear infinite;
}

.spin-wheel-icon:active {
    transform: scale(0.95);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .spin-modal {
        padding: 10px;
    }
    
    .modal-content {
        padding: 15px 10px;
        max-width: 100%;
        margin: 0;
    }
    
    .wheel-container {
        width: 260px;
        height: 260px;
    }
    
    .wheel {
        border: 6px solid #df1886;
        margin-top: -40px;
    }
    
    .spin-button {
        width: 65px;
        height: 65px;
        border: 3px solid #a259f9;
        font-size: 12px;
    }
    
    .arrow {
        top: 130px;
        width: 95px;
        height: 95px;
    }
    
    .segment-content {
        margin-top: 15px;
        margin-left: 6px;
    }
    
    .segment-image {
        width: 18px;
        height: 18px;
        margin-top: 12px;
    }
    
    .segment-name {
        font-size: 14px;
        margin-top: 10px;
    }
    
    .btn2, .btn3 {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .s-container {
        margin-left: -100px;
        margin-top: -12px;
        transform: scale(0.7);
    }
    
    .close-button {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .wheel-container {
        width: 240px;
        height: 240px;
    }
    
    .spin-button {
        width: 60px;
        height: 60px;
        font-size: 11px;
    }
    
    .arrow {
        top: 120px;
        width: 85px;
        height: 85px;
    }
    
    .s-container {
        margin-left: -90px;
        transform: scale(0.6);
    }
}

/* Landscape orientation for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .spin-modal {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .modal-content {
        padding: 10px;
    }
    
    .wheel-container {
        width: 200px;
        height: 200px;
    }
    
    .btn2 {
        margin-top: 40px;
    }
    
    .btn3 {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* Decorative floating elements */
.modal-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    border-radius: 20px;
    z-index: -1;
    animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(0%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Enhanced button styling */
.btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 224, 44, 0.5);
    background-color: #ffd700;
}

.btn3:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #2c2c54, #40407a);
}