.spin-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
    padding-top: 50px;
    padding-bottom: 50px;
}

.spin-container .spin-lucky-header {
    margin-bottom: 40px;
}

.wheel-outer {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
}

#wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 56px;
    background: #e74c3c;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 100;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    border-radius: 5px;
}

.wheel {
    position: relative;
    width: 100%;
    height: unset;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    border: 15px solid #333;
    transition: transform 5s cubic-bezier(0.15, 0, 0.15, 1);
    background: #333;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
}

.wheel::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 6px solid #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.wheel-label {
    position: absolute;
    width: 50%;
    height: 100px;
    top: calc(50% - 50px);
    left: 50%;
    transform-origin: left center;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Push content towards the outer edge */
    padding-right: 25px; /* Margin from the very edge of the wheel */
}

.label-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px; /* Constrain width to fit in wedge */
    text-align: center;
}

.label-inner img {
    max-width: 65px;
    max-height: 65px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4));
}

.label-inner span {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    width: 100%;
    word-wrap: break-word;
}

.spin-controls .input-group {
    background: #fff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 2px solid #eee;
    padding-bottom: 20px;
    margin-top: 20px;
}

#spin-code {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 200px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

#spin-code:focus {
    box-shadow: none;
}

#spin-btn {
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 900;
    letter-spacing: 1px;
    background: #e74c3c;
    border: none;
    color: #fff;
    transition: all 0.3s;
    margin: 20px auto 0;
}

#spin-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

#result {
    text-align: center;
    margin-top: 20px;
}

.prize-popup {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid #eee;
}

.prize-popup h2 {
    color: #333;
    font-size: 28px;
}

.prize-popup img {
    width: 180px;
    border-radius: 10px;
    margin-bottom: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive for screens < 500px */
@media screen and (max-width: 500px) {
    .spin-container {
        margin: 0 auto;
        padding: 20px 15px;
    }

    .wheel-outer {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 8px;
    }

    .wheel {
        border-width: 10px;
    }

    #wheel-pointer {
        width: 36px;
        height: 46px;
        top: -15px;
    }

    .wheel::after {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    .wheel-label {
        height: 60px;
        top: calc(50% - 30px);
        padding-right: 15px;
    }

    .label-inner {
        width: 80px;
    }

    .label-inner img {
        max-width: 40px;
        max-height: 40px;
        margin-bottom: 5px;
    }

    .label-inner span {
        font-size: 10px;
    }

    #spin-btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    .prize-popup h2 {
        font-size: 22px;
    }

    .prize-popup img {
        width: 140px;
    }
}