body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
    margin: 0;
}

.container {
    text-align: center;
}

h1 {
    color: #d9534f;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 5s ease-out;
    transform: rotate(0deg); /* Initial rotation angle */
}

.segment {
    position: absolute;
    width: 50%;
    height: 50%;
    background-color: var(--bg);
    transform-origin: 100% 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #fff;
    font-weight: bold;
    transform: rotate(calc(var(--i) * 60deg));
    text-align: center;
}

.pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #d9534f;
}

#spinButton {
    background-color: #d9534f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#spinButton:hover {
    background-color: #c9302c;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    text-align: center;
}

.popup.show {
    display: block;
}
