/* Spin the Wheel */
.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    transition: transform 3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid var(--text-color);
    position: absolute;
    top: 10px;
    z-index: 10;
}

#spin-btn {
    margin-top: 20px;
    font-size: 1.5rem;
    padding: 15px 40px;
    background: var(--accent-color);
    color: var(--text-color);
    border: 4px solid var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 6px 0 var(--text-color);
    transition: all 0.1s;
}

#spin-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--text-color);
}

#spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(4px);
    box-shadow: none;
}

/* Question Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--primary-color);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.answer-input {
    font-size: 1.5rem;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 10px;
    margin: 20px 0;
    width: 80%;
    text-align: center;
}

/* Snakes and Ladders */
.snl-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #444;
    border: 5px solid #222;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    /* Snake Background Pattern */
    background-image: radial-gradient(#a5d6a7 20%, transparent 20%),
        radial-gradient(#a5d6a7 20%, transparent 20%);
    background-position: 0 0, 25px 25px;
    background-size: 50px 50px;
}

.cell {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    font-size: 0.8rem;
}

.cell:nth-child(even) {
    background: #f0f0f0;
}

.cell.ladder {
    background: #d0f0c0;
}

.cell.snake {
    background: #f0d0d0;
}

.player-piece {
    width: 80%;
    height: 80%;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.5s ease-in-out;
}

.dice-area {
    display: flex;
    gap: 20px;
    align-items: center;
}

.dice {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 4px 4px 0 #333;
}

/* Treasure Hunt */
.treasure-map {
    width: 100%;
    min-height: 400px;
    background: #e9d8a6;
    /* Sand color */
    border: 8px dashed #8c5e2a;
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
}

.chest {
    width: 100px;
    height: 80px;
    background: #8c5e2a;
    border-radius: 10px 10px 0 0;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.chest:hover {
    transform: scale(1.1);
}

.chest-content {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    /* Let clicks pass to chest */
}

.chest.open {
    background: #5c3e1a;
}

/* Grand Prix */
.race-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #333;
    border-radius: 10px;
    color: white;
}

.track {
    width: 100%;
    height: 80px;
    background: #555;
    border-top: 2px dashed #fff;
    border-bottom: 2px dashed #fff;
    position: relative;
    display: flex;
    align-items: center;
    transform: perspective(500px) rotateX(20deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.finish-line {
    position: absolute;
    right: 20px;
    height: 100%;
    width: 10px;
    background: repeating-linear-gradient(45deg,
            #fff,
            #fff 10px,
            #000 10px,
            #000 20px);
    z-index: 1;
}

.car {
    width: 60px;
    height: 40px;
    position: absolute;
    left: 10px;
    transition: left 0.5s linear;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.car.player {
    background: var(--primary-color);
    border-radius: 10px 20px 5px 5px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.car.opponent {
    background: var(--secondary-color);
    border-radius: 10px 20px 5px 5px;
    top: 50%;
    transform: translateY(-50%);
}

.race-hud {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
}

.question-overlay {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.gp-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

/* Hangman Styles Removed */