/* =========================================================
    SPIN POPUP OVERLAY
    ========================================================= */
.spin-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    /* display: flex; */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999999;
}
/* =========================================================
    MAIN MODAL
    ========================================================= */

.spin-modal {
    /* width: 760px; */
    width: 540px;
    max-width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
    padding: 28px 40px 30px;
    text-align: center;
    background: linear-gradient(145deg, #effff8 0%, #f7fffc 50%, #edfff7 100%);
    border-radius: 18px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}
/* Scrollbar */
.spin-modal::-webkit-scrollbar {
    width: 5px;
}
.spin-modal::-webkit-scrollbar-track {
    background: transparent;
}
.spin-modal::-webkit-scrollbar-thumb {
    background: #b8d8cc;
    border-radius: 20px;
}

/* =========================================================
    CLOSE BUTTON
    ========================================================= */

.spin-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #333333;
    font-size: 27px;
    font-weight: 400;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.spin-close:hover {
    background: #f3f3f3;
    transform: rotate(90deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
/* =========================================================
    WHEEL AREA
    ========================================================= */

.wheel-area {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
    POINTER
    ========================================================= */

.pointer {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 43px;
    background: #e7b843;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 100;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.18));
}
/* =========================================================
    WHEEL
    ========================================================= */
.wheel {
    /*
        * IMPORTANT
        *
        * JavaScript will update this variable
        * while the wheel rotates.
        *
        * The prize text uses the opposite rotation
        * so the text always stays straight.
        */
    --wheel-counter-rotation: 0deg;
    width: 320px;
    height: 320px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    box-sizing: border-box;
    border: 12px solid #E97810;
    /*
        * 5 equal segments
        *
        * 1 = Mirror
        * 2 = Leather Wallet
        * 3 = Belt
        * 4 = 10% Discount
        * 5 = Bag
        */
    background: conic-gradient(
        from -36deg,
        #754B43 0deg 72deg,
        #fff4dc 72deg 144deg,
        #754B43 144deg 216deg,
        #fff4dc 216deg 288deg,
        #754B43 288deg 360deg
    );
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.18),
        inset 0 0 0 2px rgba(255, 255, 255, 0.45);
    /*
        * IMPORTANT:
        *
        * Do NOT use CSS transition here.
        * JavaScript controls the animation.
        */
    transition: none;
    will-change: transform;
}
/* =========================================================
    SEGMENT
    ========================================================= */
.spin-modal .segment {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 115px;
    margin: 0;
    padding: 0;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    transform-origin: center center;
    z-index: 5;
}

/* =========================================================
    SEGMENT TEXT
    ========================================================= */
/*
    * The span receives:
    *
    * 1. Its own base rotation
    * 2. Opposite wheel rotation
    *
    * Therefore the text remains upright.
    */
.spin-modal .segment span {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    transform-origin: center center;
    /*
        * This variable is supplied separately
        * for each segment below.
        */
    transform: rotate(var(--text-base-rotation))
        rotate(var(--wheel-counter-rotation));
    /*
        * IMPORTANT
        *
        * Allow <br> to work.
        */
    white-space: normal;
    text-align: center;
    transition: none;
    will-change: transform;
}
/* =========================================================
    SEGMENT 1
    MIRROR
    ========================================================= */
.spin-modal .segment-1 {
    transform: translate(-50%, -50%) rotate(0deg) translateY(-102px);
}
.spin-modal .segment-1 span {
    --text-base-rotation: 0deg;
    color: #ffffff;
}
/* =========================================================
    SEGMENT 2
    LEATHER WALLET
    ========================================================= */
.spin-modal .segment-2 {
    transform: translate(-50%, -50%) rotate(72deg) translateY(-102px);
}
.spin-modal .segment-2 span {
    --text-base-rotation: -72deg;
    color: #145d45;
}
/* =========================================================
    SEGMENT 3
    BELT
    ========================================================= */
.spin-modal .segment-3 {
    transform: translate(-50%, -50%) rotate(144deg) translateY(-102px);
}
.spin-modal .segment-3 span {
    --text-base-rotation: -144deg;
    color: #ffffff;
}
/* =========================================================
    SEGMENT 4
    10% DISCOUNT
    ========================================================= */
.spin-modal .segment-4 {
    transform: translate(-50%, -50%) rotate(216deg) translateY(-102px);
}
.spin-modal .segment-4 span {
    --text-base-rotation: -216deg;
    color: #145d45;
}
/* =========================================================
    SEGMENT 5
    BAG
    ========================================================= */

.spin-modal .segment-5 {
    transform: translate(-50%, -50%) rotate(288deg) translateY(-102px);
}
.spin-modal .segment-5 span {
    --text-base-rotation: -288deg;
    color: #ffffff;
}
/* =========================================================
    CENTER LOGO
    ========================================================= */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    border: 4px solid #e5b83f;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* HB TEXT */
.wheel-center span {
    display: block;
    margin: 0;
    padding: 0;
    color: #087a55;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;
}
/* =========================================================
    SPECIAL OFFER BADGE
    ========================================================= */
.offer-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 22px;
    margin: 0;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff2c9, #ffe7a4);
    color: #b77b00;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 3px 10px rgba(210, 160, 50, 0.1);
}
.offer-title span {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
}
/* =========================================================
    HEADING
    ========================================================= */
.spin-modal h2 {
    margin: 13px 0 5px;
    padding: 0;
    color: #754B43;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.3px;
}
/* =========================================================
    DESCRIPTION
    ========================================================= */
.spin-modal .spin-description {
    margin: 0 auto 22px;
    padding: 0;
    color: #666666;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}
/* =========================================================
    FORM
    ========================================================= */
#spinForm {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}
/* =========================================================
    INPUT GROUP
    ========================================================= */
#spinForm .input-group {
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
}
/* =========================================================
    LABEL
    ========================================================= */
#spinForm .input-group label {
    display: block;
    width: 100%;
    margin: 0 0 7px;
    padding: 0;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
/* Required star */
#spinForm .input-group label span {
    color: #e34d35;
    font-weight: 700;
}
/* =========================================================
    INPUT
    ========================================================= */
.spin-modal input {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 15px;
    box-sizing: border-box;
    border: 1px solid #d9dfdc;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 52px;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
/* Placeholder */
.spin-modal input::placeholder {
    color: #9b9b9b;
    opacity: 1;
}
/* Focus */
.spin-modal input:focus {
    border-color: #00ad82;
    box-shadow: 0 0 0 3px rgba(0, 173, 130, 0.1);
}
/* =========================================================
    SPIN BUTTON
    ========================================================= */
#spinButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 53px;
    margin: 0;
    padding: 0 20px;
    border: none;
    border-radius: 10px;
    outline: none;
    background: linear-gradient(135deg, #754B43, #754B43);

    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 160, 125, 0.2);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}
/* Hover */
#spinButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 160, 125, 0.25);
}
/* Click */
#spinButton:active {
    transform: translateY(1px);
}
/* Disabled */
#spinButton:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 160, 125, 0.12);
}
/* =========================================================
    MOBILE - 600PX
    ========================================================= */

@media (max-width: 600px) {
    .spin-overlay {
        padding: 10px;
    }
    .spin-modal {
        width: 100%;
        max-width: 100%;
        max-height: 96vh;
        padding: 25px 18px 22px;
        border-radius: 15px;
    }
    /* Close */
    .spin-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 24px;
        line-height: 34px;
    }
    /* Wheel Area */
    .wheel-area {
        width: 285px;
        height: 285px;
        margin: 0 auto 4px;
    }
    /* Pointer */
    .pointer {
        width: 29px;
        height: 37px;
        top: -1px;
    }
    /* Wheel */
    .wheel {
        width: 260px;
        height: 260px;
        border-width: 9px;
    }
    /* Segment */
    .spin-modal .segment {
        width: 95px;
        font-size: 14px;
        line-height: 1.15;
    }
    /* Mirror */
    .spin-modal .segment-1 {
        transform: translate(-50%, -50%) rotate(0deg) translateY(-83px);
    }
    /* Leather Wallet */
    .spin-modal .segment-2 {
        transform: translate(-50%, -50%) rotate(72deg) translateY(-83px);
    }
    /* Belt */
    .spin-modal .segment-3 {
        transform: translate(-50%, -50%) rotate(144deg) translateY(-83px);
    }
    /* 10% Discount */
    .spin-modal .segment-4 {
        transform: translate(-50%, -50%) rotate(216deg) translateY(-83px);
    }
    /* Bag */
    .spin-modal .segment-5 {
        transform: translate(-50%, -50%) rotate(288deg) translateY(-83px);
    }
    /* Center */
    .wheel-center {
        width: 62px;
        height: 62px;
        border-width: 3px;
    }

    .wheel-center span {
        font-size: 18px;
    }

    /* Offer */

    .offer-title {
        padding: 8px 17px;

        font-size: 13px;
    }

    .offer-title span {
        font-size: 15px;
    }

    /* Heading */

    .spin-modal h2 {
        margin-top: 11px;

        font-size: 21px;

        line-height: 1.25;
    }

    /* Description */

    .spin-modal .spin-description {
        margin-bottom: 18px;

        font-size: 13px;

        line-height: 1.5;
    }

    /* Label */

    #spinForm .input-group label {
        font-size: 13px;
    }

    /* Input */

    .spin-modal input {
        height: 48px;

        font-size: 14px;

        line-height: 48px;
    }

    /* Button */

    #spinButton {
        height: 50px;

        font-size: 16px;
    }
}

/* =========================================================
   VERY SMALL MOBILE - 400PX
========================================================= */

@media (max-width: 400px) {
    .spin-overlay {
        padding: 7px;
    }

    .spin-modal {
        padding: 22px 14px 18px;

        border-radius: 13px;
    }

    .spin-close {
        width: 32px;
        height: 32px;

        line-height: 32px;

        font-size: 22px;

        top: 9px;
        right: 9px;
    }

    .wheel-area {
        width: 250px;
        height: 250px;
    }

    .wheel {
        width: 230px;
        height: 230px;

        border-width: 8px;
    }

    .pointer {
        width: 26px;
        height: 34px;
    }

    .spin-modal .segment {
        width: 82px;

        font-size: 12px;
    }

    .spin-modal .segment-1 {
        transform: translate(-50%, -50%) rotate(0deg) translateY(-73px);
    }

    .spin-modal .segment-2 {
        transform: translate(-50%, -50%) rotate(72deg) translateY(-73px);
    }

    .spin-modal .segment-3 {
        transform: translate(-50%, -50%) rotate(144deg) translateY(-73px);
    }

    .spin-modal .segment-4 {
        transform: translate(-50%, -50%) rotate(216deg) translateY(-73px);
    }

    .spin-modal .segment-5 {
        transform: translate(-50%, -50%) rotate(288deg) translateY(-73px);
    }

    .wheel-center {
        width: 55px;
        height: 55px;
    }

    .wheel-center span {
        font-size: 16px;
    }

    .offer-title {
        padding: 7px 14px;

        font-size: 12px;
    }

    .spin-modal h2 {
        font-size: 19px;
    }

    .spin-modal .spin-description {
        font-size: 12px;
    }
}

/* =========================================================
   WIN RESULT MODAL
========================================================= */

.win-result-overlay {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    padding: 20px;

    box-sizing: border-box;

    display: none;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.62);

    backdrop-filter: blur(4px);

    -webkit-backdrop-filter: blur(4px);

    z-index: 1000000;
}

/* =========================================================
   RESULT MODAL
========================================================= */

.win-result-modal {
    width: 460px;

    max-width: 100%;

    position: relative;

    box-sizing: border-box;

    padding: 38px 35px 30px;

    text-align: center;

    background: linear-gradient(145deg, #effff8 0%, #ffffff 50%, #edfff7 100%);

    border-radius: 22px;

    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);

    border: 1px solid rgba(0, 180, 140, 0.12);

    animation: winModalShow 0.45s cubic-bezier(0.17, 0.67, 0.3, 1.3);
}

/* =========================================================
   MODAL ANIMATION
========================================================= */

@keyframes winModalShow {
    0% {
        opacity: 0;

        transform: scale(0.75) translateY(30px);
    }

    100% {
        opacity: 1;

        transform: scale(1) translateY(0);
    }
}

/* =========================================================
   CLOSE BUTTON
========================================================= */

.win-result-close {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: #ffffff;

    color: #555555;

    font-size: 25px;

    line-height: 36px;

    cursor: pointer;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);

    transition: all 0.2s ease;
}

.win-result-close:hover {
    background: #f3f3f3;

    color: #222222;

    transform: rotate(90deg);
}

/* =========================================================
   CONFETTI / CELEBRATION
========================================================= */

.win-confetti {
    position: absolute;

    top: 22px;
    left: 0;

    width: 100%;

    display: flex;

    justify-content: space-between;

    padding: 0 55px;

    box-sizing: border-box;

    pointer-events: none;
}

.win-confetti span {
    font-size: 24px;

    animation: winFloat 2s ease-in-out infinite;
}

.win-confetti span:nth-child(2) {
    animation-delay: 0.25s;
}

.win-confetti span:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes winFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(10deg);
    }
}

/* =========================================================
   GIFT ICON
========================================================= */

.win-gift-icon {
    width: 78px;
    height: 78px;

    margin: 0 auto 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: linear-gradient(135deg, #fff0bd, #ffe29a);

    font-size: 38px;

    box-shadow: 0 8px 25px rgba(214, 163, 52, 0.2);

    animation: giftBounce 1.5s ease-in-out infinite;
}

@keyframes giftBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* =========================================================
   SUCCESS BADGE
========================================================= */

.win-success-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 7px 16px;

    border-radius: 30px;

    background: #e6fff5;

    color: #008866;

    font-size: 13px;

    font-weight: 700;
}

.win-success-badge span {
    width: 18px;
    height: 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #00ad82;

    color: #ffffff;

    font-size: 11px;
}

/* =========================================================
   TITLE
========================================================= */

.win-result-title {
    margin: 13px 0 5px;
    padding: 0;
    color: #754f47;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
}

/* =========================================================
   SUBTITLE
========================================================= */

.win-result-subtitle {
    margin: 0 auto 22px;

    max-width: 350px;

    color: #666666;

    font-size: 14px;

    line-height: 1.55;
}

/* =========================================================
   PRIZE CARD
========================================================= */

.win-prize-card {
    position: relative;
    width: 100%;
    padding: 20px 18px;
    box-sizing: border-box;
    border-radius: 15px;
    background: linear-gradient(135deg, #754B43, #754B43);
    box-shadow: 0 10px 25px rgba(0, 140, 100, 0.2);
    overflow: hidden;
}

/* Decorative shine */

.win-prize-card::before {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    top: -70px;
    right: -45px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.1);
}

.win-prize-card::after {
    content: "";

    position: absolute;

    width: 80px;
    height: 80px;

    bottom: -45px;
    left: -25px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   PRIZE LABEL
========================================================= */

.win-prize-label {
    position: relative;

    z-index: 2;

    margin-bottom: 7px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.5px;
}

/* =========================================================
   PRIZE NAME
========================================================= */

.win-prize-name {
    position: relative;

    z-index: 2;

    color: #ffffff;

    font-size: 28px;

    font-weight: 800;

    line-height: 1.25;

    word-break: break-word;
}

/* =========================================================
   PRIZE MESSAGE
========================================================= */

.win-prize-message {
    position: relative;

    z-index: 2;

    margin-top: 9px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 13px;
}

/* =========================================================
   CUSTOMER TEXT
========================================================= */

.win-customer-text {
    margin: 18px 0;

    color: #555555;

    font-size: 14px;
}

.win-customer-text strong {
    color: #008866;

    font-weight: 700;
}

/* =========================================================
   CONTINUE BUTTON
========================================================= */

.win-continue-button {
    width: 100%;

    height: 52px;

    padding: 0 20px;

    border: none;

    border-radius: 10px;

    background: linear-gradient(135deg, #E97810, #E97810);

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 7px 18px rgba(0, 160, 125, 0.22);

    transition: all 0.2s ease;
}

.win-continue-button:hover {
    transform: translateY(-1px);

    box-shadow: 0 10px 23px rgba(0, 160, 125, 0.28);
}

/* =========================================================
   BOTTOM TEXT
========================================================= */

.win-bottom-text {
    margin: 12px 0 0;

    color: #999999;

    font-size: 11px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
    .win-result-overlay {
        padding: 12px;
    }

    .win-result-modal {
        width: 100%;

        padding: 35px 20px 25px;

        border-radius: 18px;
    }

    .win-result-close {
        top: 11px;
        right: 11px;

        width: 33px;
        height: 33px;

        line-height: 33px;

        font-size: 23px;
    }

    .win-gift-icon {
        width: 68px;
        height: 68px;

        font-size: 33px;
    }

    .win-result-title {
        font-size: 27px;
    }

    .win-result-subtitle {
        font-size: 13px;

        margin-bottom: 18px;
    }

    .win-prize-card {
        padding: 18px 14px;
    }

    .win-prize-name {
        font-size: 24px;
    }

    .win-prize-message {
        font-size: 12px;
    }

    .win-continue-button {
        height: 50px;

        font-size: 15px;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {
    .win-result-modal {
        padding: 32px 15px 20px;
    }

    .win-gift-icon {
        width: 62px;
        height: 62px;

        font-size: 30px;
    }

    .win-result-title {
        font-size: 25px;
    }

    .win-prize-name {
        font-size: 22px;
    }
}
