* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    min-height: 100vh;
    background: #ffffff; /* Fond blanc pour toute la page */
    color: #111; /* texte sombre par défaut */
}

/* ========== STYLES LOGIN ========== */
.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    background: #ffffff; /* Conteneur en blanc */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.left-side {
    flex: 1;
    background: #ffffff; /* Garder le côté gauche blanc aussi */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.characters {
    position: relative;
    width: 100%;
    height: 350px;
}

.character {
    position: absolute;
    transition: transform 0.3s ease;
    transform-origin: bottom center;
}

.purple-character {
    width: 110px;
    height: 220px;
    background: #6a4cf5;
    border-radius: 0;
    bottom: 0;
    left: 70px;
    z-index: 1;
}

.purple-character .eyes {
    top: 18%;
}

.purple-character .mouth {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 3px;
    background: #000;
}

.black-character {
    width: 90px;
    height: 160px;
    background: #2c2c2c;
    border-radius: 0;
    bottom: 0;
    left: 190px;
    z-index: 2;
}

.black-character .eyes {
    top: 25%;
}

.orange-character {
    width: 240px;
    height: 120px;
    background: #ff7e3f;
    border-radius: 120px 120px 0 0;
    bottom: 0;
    left: 10px;
    z-index: 3;
}

.orange-character .eyes {
    top: 28%;
    gap: 20px;
}

.orange-character .eye {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.orange-character .pupil {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.orange-character .mouth {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 25px;
    background: #000;
    border-radius: 0 0 25px 25px;
}

.yellow-character {
    width: 80px;
    height: 140px;
    background: #f5d546;
    border-radius: 40px 40px 0 0;
    bottom: 0;
    left: 270px;
    z-index: 3;
}

.yellow-character .eyes {
    top: 23%;
}

.yellow-character .eye {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.yellow-character .pupil {
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.yellow-character .mouth {
    position: absolute;
    bottom: 33%;
    left: 50%;
    transform: translateX(0);
    width: 30px;
    height: 3px;
    background: #000;
}

.eyes {
    position: absolute;
    display: flex;
    gap: 18px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.eye {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.pupil {
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.right-side {
    flex: 1;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff; /* Fond blanc pour la zone de connexion */
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-radius: 0 20px 20px 0; /* Arrondi côté droit */
    z-index: 2; /* S'assurer qu'il reste au-dessus du plateau */
}

h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 700;
}

.subtitle {
    color: #888;
    margin-bottom: 40px;
    text-align: center;
    font-size: 14px;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #6a4cf5;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    user-select: none;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot {
    color: #888;
    text-decoration: none;
}

.btn {
    width: 100%;
    padding: 16px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background 0.3s;
}

.btn:hover {
    background: #333;
}

.signup-link {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #888;
}

.signup-link a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(400px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-400px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rollInFromLeft {
    from {
        transform: translateX(-400px) rotate(-360deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes nodStay {
    0%, 100% { 
        transform: rotate(0deg);
    }
    25% { 
        transform: rotate(-8deg);
    }
    75% { 
        transform: rotate(8deg);
    }
}

.entering .yellow-character {
    animation: slideInFromBottom 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.entering .black-character {
    animation: slideInFromTop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

.entering .purple-character {
    animation: rollInFromLeft 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
}

.entering .orange-character {
    animation: slideInFromRight 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s both;
}

.nodding {
    animation: nodStay 0.6s ease;
}

.looking-center .eyes {
    transform: translateX(-50%) !important;
}

.looking-center .pupil {
    transform: translate(-50%, -50%) translateX(-10px) !important;
}

/* ========== STYLES BLACKJACK ========== */
.blackjack-container {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 30px;
    background: #ffffff; /* Fond blanc pour la zone blackjack */
    border-radius: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: #111;
}

.game-header h1 {
    font-size: 42px;
    margin: 0;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-info span {
    font-size: 18px;
    font-weight: 600;
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #ff5252, #d93f3f);
    border-color: #ff5252;
}

.game-area {
    /* Fond vert type "felt" pour la table de blackjack */
    background: linear-gradient(180deg, #0b6b3a 0%, #07562f 100%);
    background-image: linear-gradient(180deg, rgba(11,107,58,0.95), rgba(7,86,47,0.95)),
                      linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.02) 75%, rgba(255,255,255,0.02));
    background-size: auto, 24px 24px;
    background-blend-mode: overlay;
    border-radius: 20px;
    padding: 40px;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.45), 0 6px 20px rgba(0,0,0,0.12);
    color: #fff; /* texte clair sur le vert */
}

.dealer-zone, .player-zone {
    margin-bottom: 40px;
}

.dealer-zone h2, .player-zone h2 {
    color: #fff; /* titres visibles sur la table verte */
    font-size: 24px;
    margin-bottom: 20px;
}

.dealer-zone h2 span, .player-zone h2 span {
    color: #ffd700;
    font-size: 28px;
}

.cards {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 140px;
}

.card {
    width: 90px;
    height: 130px;
    background: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: dealCard 0.3s ease;
    position: relative;
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #2c3e50;
}

.card-back {
    background: linear-gradient(45deg, #c0392b, #8e44ad);
    color: white;
}

.card .suit {
    font-size: 20px;
    position: absolute;
    top: 5px;
    left: 5px;
}

@keyframes dealCard {
    from {
        transform: translateY(-100px) rotateY(180deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateY(0deg);
        opacity: 1;
    }
}

.game-controls {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chips-info {
    text-align: center;
    color: #111;
}

.chips-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.bet-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.bet-controls label {
    font-size: 18px;
    font-weight: 600;
}

.bet-controls input {
    width: 120px;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background: #fff;
    color: #111;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.game-btn {
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

#dealBtn {
    background: #27ae60;
    color: white;
}

#dealBtn:hover {
    background: #229954;
    transform: translateY(-2px);
}

#hitBtn {
    background: #3498db;
    color: white;
}

#hitBtn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

#standBtn {
    background: #e67e22;
    color: white;
}

#standBtn:hover:not(:disabled) {
    background: #d35400;
    transform: translateY(-2px);
}

#doubleBtn {
    background: #9b59b6;
    color: white;
}

#doubleBtn:hover:not(:disabled) {
    background: #8e44ad;
    transform: translateY(-2px);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-message {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    min-height: 40px;
    padding: 10px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat {
    text-align: center;
    color: white;
}

.stat h4 {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.stat p {
    font-size: 32px;
    font-weight: bold;
}

/* ========== GAME HOME PAGE ========== */
.game-home {
    display: block;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    padding: 40px 20px;
}

.games-header {
    max-width: 1400px;
    margin: 0 auto 50px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.games-header h1 {
    font-size: 48px;
    color: white;
    margin: 0;
    font-weight: 700;
}

.header-subtitle {
    color: #aaa;
    font-size: 16px;
    margin: 0;
}

.games-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.game-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.game-card:hover:not(.coming-soon) {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: #00d4ff;
}

.game-card.active {
    border-color: #00d4ff;
}

.game-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.game-icon {
    font-size: 80px;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.coming-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.game-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.game-info h3 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.game-description {
    color: #a0aec0;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.player-count {
    color: #64748b;
    font-size: 12px;
    display: block;
    margin-bottom: 15px;
}

.game-card .play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card .play-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

.game-card .play-btn:disabled {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

#logoutBtnHome {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

#logoutBtnHome:hover {
    background: #ff6b6b;
    color: white;
}

.game-home-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.game-home-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #111;
    font-weight: 700;
}

.game-home-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.play-btn, .back-btn {
    display: block;
    width: 100%;
    padding: 18px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.6);
}

.play-btn:active {
    transform: translateY(-1px);
}

.back-btn {
    background: #e0e0e0;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* ========== CREDIT ========== */
.credit {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== GAME CONTAINER (Tous les jeux) ========== */
.game-container {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
}

/* ========== SLOTS MACHINE ========== */
.slots-machine {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 60px 0;
}

.slot-reel {
    width: 100px;
    height: 150px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 4px solid #FF8C00;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.slot-reel.spinning {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* ========== DICE ========== */
.dice-area {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
}

.dice {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FF6B6B, #FF4444);
    border: 3px solid #FF0000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.dice.rolling {
    animation: rollDice 0.6s ease-in-out;
}

@keyframes rollDice {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(720deg) rotateY(720deg); }
}

/* ========== POKER ========== */
.poker-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 40px 0;
}

.poker-zone {
    background: linear-gradient(180deg, #0b6b3a 0%, #07562f 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
}

.poker-zone h2 {
    margin-top: 0;
    color: white;
}

/* ========== ROULETTE ========== */
.roulette-full-container {
    display: grid;
    grid-template-columns: 150px 1fr 250px;
    gap: 30px;
    margin: 40px 0;
    align-items: flex-start;
}

.roulette-numbers-left {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: white;
}

.roulette-numbers-left h3 {
    margin-top: 0;
    text-align: center;
    color: #ffd700;
    font-size: 16px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.number-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.roulette-number-display {
    padding: 5px;
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    border: 1px solid;
}

.roulette-number-display.red-num {
    background: #FF0000;
    border-color: #CC0000;
}

.roulette-number-display.black-num {
    background: #000000;
    border-color: #333333;
}

.roulette-number-display.green-num {
    background: #00AA00;
    border-color: #008800;
}

.roulette-center {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.roulette-controls-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.roulette-left, .roulette-right {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.roulette-left h3, .roulette-right h3 {
    margin-top: 0;
    color: #ffd700;
}

.roulette-bets {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bet-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bet-section label {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.bet-section input,
.bet-section select {
    padding: 8px;
    background: #2c3e50;
    border: 2px solid #ffd700;
    color: white;
    border-radius: 5px;
    font-size: 14px;
}

.bet-section input::placeholder,
.bet-section select option {
    color: #aaa;
}

.bet-section select {
    cursor: pointer;
}

.roulette-wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: conic-gradient(
        red 0deg 9.73deg,
        black 9.73deg 19.46deg,
        red 19.46deg 29.19deg,
        black 29.19deg 38.92deg,
        red 38.92deg 48.65deg,
        black 48.65deg 58.38deg,
        red 58.38deg 68.11deg,
        black 68.11deg 77.84deg,
        red 77.84deg 87.57deg,
        black 87.57deg 97.3deg,
        red 97.3deg 107.03deg,
        black 107.03deg 116.76deg,
        red 116.76deg 126.49deg,
        black 126.49deg 136.22deg,
        red 136.22deg 145.95deg,
        black 145.95deg 155.68deg,
        red 155.68deg 165.41deg,
        black 165.41deg 175.14deg,
        green 175.14deg 184.87deg
    );
    border: 3px solid #FFD700;
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 4s cubic-bezier(.22,.9,.27,1);
}

.roulette-wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    z-index: 1;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3), 0 0 10px rgba(0,0,0,0.5);
    border: 2px solid #FFD700;
}

#rouletteNumbers {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.roulette-number-slot {
    position: absolute;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    color: white;
    border: 2px solid gold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.roulette-ball {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, white, #FFD700);
    border: 2px solid #FFD700;
    border-radius: 50%;
    position: absolute;
    /* use CSS variable for radius so JS can set it dynamically */
    left: 50%;
    transform: translateX(-50%) translateY(calc(-1 * var(--ball-radius, 140px)));
    z-index: 5;
    box-shadow: 0 3px 8px rgba(0,0,0,0.6), inset -1px -1px 3px rgba(0,0,0,0.2);
    transition: transform 0.6s cubic-bezier(.22,.9,.27,1);
}

.roulette-ball.bounce {
    transform: translateX(-50%) translateY(calc(-1 * var(--ball-radius, 140px) + 8px)) scale(0.96);
}

/* Ball orbit animation while wheel spins - JS will add/remove .orbit and set duration/direction */
.roulette-ball.orbit {
    animation-name: ballOrbit;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes ballOrbit {
    /* amplitude and radius driven by CSS vars set from JS */
    0% { transform: translateX(-50%) translateY(calc(-1 * var(--ball-radius, 140px))) rotate(0deg); }
    25% { transform: translateX(calc(-50% + var(--ball-amplitude, 12px))) translateY(calc(-1 * (var(--ball-radius, 140px) - 12px))) rotate(90deg); }
    50% { transform: translateX(-50%) translateY(calc(-1 * (var(--ball-radius, 140px) - 20px))) rotate(180deg); }
    75% { transform: translateX(calc(-50% - var(--ball-amplitude, 12px))) translateY(calc(-1 * (var(--ball-radius, 140px) - 12px))) rotate(270deg); }
    100% { transform: translateX(-50%) translateY(calc(-1 * var(--ball-radius, 140px))) rotate(360deg); }
}

/* Transitions used instead of fixed keyframe animations - rotations applied from JS */
.bingo-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.bingo-card {
    background: white;
    border: 3px solid #FFD700;
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.bingo-number {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.bingo-number:hover {
    background: #e0e0e0;
}

.bingo-number.marked {
    background: #FFD700;
    border-color: #FFA500;
    font-weight: bold;
}

.bingo-numbers {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 20px;
    border-radius: 10px;
    color: white;
}

#drawnNumbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.drawn-number {
    background: #FFD700;
    color: black;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
}

/* ========== LEADERBOARD STYLES ========== */
.leaderboard-card {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #ffb700;
}

.leaderboard-card .game-icon {
    font-size: 48px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.leaderboard-container {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.leaderboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: #f5f5f5;
}

.leaderboard-table tbody tr:nth-child(1) {
    background: #ffd70030;
}

.leaderboard-table tbody tr:nth-child(2) {
    background: #c0c0c030;
}

.leaderboard-table tbody tr:nth-child(3) {
    background: #cd7f3230;
}

.leaderboard-table td {
    padding: 12px 15px;
    font-weight: 500;
}

.leaderboard-rank {
    font-weight: 700;
    font-size: 18px;
    color: #667eea;
    min-width: 50px;
}

.leaderboard-rank.rank-1::before {
    content: "🥇 ";
}

.leaderboard-rank.rank-2::before {
    content: "🥈 ";
}

.leaderboard-rank.rank-3::before {
    content: "🥉 ";
}

.leaderboard-name {
    font-weight: 600;
    color: #333;
}

.leaderboard-chips {
    color: #27ae60;
    font-weight: 700;
    font-size: 18px;
}

.leaderboard-stats {
    color: #777;
}