* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.container {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.player-turn {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.score {
    display: flex;
    gap: 2rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.player-name {
    font-size: 1rem;
    font-weight: bold;
}

#lebron-score, #mj-score {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    min-width: 40px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 120px); /* fixed columns */
    gap: 8px;
    margin: 0 auto 2rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    width: max-content; /* fits exactly around the cells */
}




.cell {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 3px solid #4a90e2;
    position: relative;
    overflow: hidden;
}

.cell:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cell.lebron {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    border-color: #ffd700;
}

.cell.mj {
    background: linear-gradient(135deg, #dc143c, #ff6b6b);
    color: white;
    border-color: #dc143c;
}

.cell.lebron img,
.cell.mj img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #357abd, #2968a3);
}

.btn.secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.btn.secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}

.game-message {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 1rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-message {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    animation: pulse 1s infinite;
}

.tie-message {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    color: #212529;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
        margin: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .cell {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .cell.lebron::before,
    .cell.mj::before {
        width: 50px;
        height: 50px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score {
        gap: 1rem;
    }
}