:root {
    --bg-color: #000;
    --font-main: sans-serif;
    --font-sec: sans-serif;
    --primary-color: #ffd700;
    --secondary-color: #ff0000;

}

body {
    margin: 0;
    background: var(--bg-color);
    color: #fff;
    overflow: hidden;
    transition: background 0.5s ease;
    font-family: var(--font-main);
}

body.gold-bg {
    background: linear-gradient(135deg, #b8860b, #daa520, #ffd700) !important;
}

.logo-top {
    position: fixed;
    top: 2vh;
    right: 20px;
    width: 20vw;
    max-width: 300px;
    z-index: 10;
}

.logo-bottom {
    position: fixed;
    bottom: 2vh;
    right: 20px;
    width: 12vw;
    max-width: 180px;
    z-index: 10;
}

section {
    height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    padding: 2vh 2vw;
    box-sizing: border-box;
}

#game-screen {
    display: flex;
}

#players-wrap {
    display: grid;
    width: 95%;
    height: 60vh;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.layout-1 {
    grid-template-columns: 1fr;
}

.layout-1 .player-box {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.layout-2 {
    grid-template-columns: 1fr 1fr;
    width: 90% !important;
}

.layout-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.layout-3 .player-box:nth-child(3) {
    grid-column: 1 / span 2;
    justify-self: center;
    width: 45%;
}

.layout-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.player-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-sizing: border-box;
    position: relative;
    transition: all 0.3s ease;
}

.player-box.active-p {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 20px var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
}

.player-label {
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Style spécifique pour le gagnant en rouge */
.winner-label {
    color: var(--secondary-color) !important;
    font-size: 6vw !important;
    margin-bottom: 20px;
}

.balls-container {
    display: grid;
    justify-content: center;
    align-content: center;
    width: 100%;
    height: 100%;
}

.ball-box {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    position: relative;
}

.ball {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    filter: grayscale(1) opacity(0.3);
}

.ball.active {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

.fail-x {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-weight: bold;
}

h1 {
    font-size: clamp(24px, 5vw, 80px);
    margin: 0;
    text-transform: uppercase;
}

.status-text {
    font-family: var(--font-sec);
    font-size: clamp(16px, 3vw, 40px);
    min-height: 1.2em;
}

#vic-content {
    width: 90vw;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gift-screen {
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: 100;
    justify-content: center;
}

canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}