/*
    Styles specifically for the prize spinner page.
    UPDATED: Arrow moved to top and points down.
*/

.spinner-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    background: #FFFFFF;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    width: 100%;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
}

.spinner-container {
    position: relative;
    width: 550px;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* UPDATED: Pointer positioned at the top, pointing down */
.spinner-pointer {
    position: absolute;
    top: -25px; /* Sits above the wheel */
    left: 50%;
    transform: translateX(-50%); /* No rotation needed */
    width: 50px;
    height: 60px;
    background-color: #000;
    z-index: 10;
    /* This clip-path creates a downward-pointing triangle */
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    /* Rounded corners are now at the top base */
    border-radius: 20px 20px 0 0; 
}

.spinner-pointer-inner {
    width: 100%;
    height: 100%;
    background-color: #fff;
    transform: scale(0.8);
    /* Matching clip-path and border-radius */
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    border-radius: 20px 20px 0 0;
}


.spinner-wheel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 40px rgba(0,0,0,0.4), inset 0 0 25px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.25, 1, 0.5, 1);
}

.segment {
    position: absolute;
    width: 50%;
    height: 50%;
    background: var(--bg);
    transform-origin: bottom right;
    transform: rotate(calc(45deg * var(--i)));
    clip-path: polygon(0 0, 58% 0, 100% 100%, 0 58%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 30px;
    filter: drop-shadow(2px 2px 0 #000) drop-shadow(-2px -2px 0 #000);
}

.segment span {
    display: block;
    transform: rotate(22.5deg);
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
}

.segment-white span {
    color: #000;
    text-shadow: none;
}
.segment-win {
    background: #D4AF37 !important;
}
.segment-win span {
    color: #000;
    font-size: 18px;
    text-shadow: none;
}

.spinner-hub {
    display: none;
}

#spin-btn {
    margin-top: 60px;
    padding: 15px 40px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: #006847;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    box-shadow: 0 6px 0 #004b32, 0 8px 15px rgba(0,0,0,0.4);
    text-transform: uppercase;
}

#spin-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #004b32;
}

#spin-btn:disabled {
    background: #95a5a6;
    box-shadow: 0 6px 0 #6c7a7b;
    cursor: not-allowed;
}

#winner-container,
#already-won-container {
    color: #333;
    max-width: 400px;
}
#winner-container h2,
#already-won-container h2 {
    color: #006847;
}
#winner-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
#winner-form input {
    font-size: 1rem;
    padding: 0.7em;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--color-border-medium);
    width: 100%;
    max-width: 350px;
}
#winner-form button {
    font-size: 1rem;
    font-weight: bold;
    padding: 0.7em 1.5em;
    color: #fff;
    background: #006847;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
    max-width: 350px;
}

@media (max-width: 600px) {
    .spinner-container {
        width: 90vw;
        height: 90vw;
    }
    .spinner-pointer {
       width: 40px;
       height: 50px;
    }

    #spin-btn {
        margin-top: 40px;
    }
}