.mode-switch {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-button {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mode-button:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-alt);
    color: var(--button-text);
}

.mode-button.active {
    background: var(--gradient-primary);
    border-color: var(--primary-alt);
    color: var(--button-text);
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.wheel-section {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    margin: 2rem 0;
    background-color: var(--surface);
    border-radius: 50%;
    border: 2px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow-color);
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wheel-selector {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 30px solid var(--primary);
    filter: drop-shadow(0 2px 4px var(--shadow-color));
    transition: border-color 0.3s ease;
}

.winner-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--background);
    padding: 3rem 4rem;
    border-radius: 1rem;
    border: 2px solid var(--border);
    box-shadow: 0 8px 32px var(--shadow-color);
    text-align: center;
    z-index: 9999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: min(400px, 90vw);
    pointer-events: auto;
}

.winner-popup .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-alt);
    font-size: 1.2rem;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.winner-popup .close-button:hover {
    opacity: 1;
}

.winner-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.winner-popup h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 0 0 1rem 0;
}

.winner-popup .winner-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--text);
    margin: 1rem 0;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
}

.winner-popup.reward .winner-name {
    background: var(--gradient-secondary);
}

.wheel-result {
    display: none;
}