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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    max-width: 1200px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    font-size: 1.2em;
}

.current-player {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

#current-player {
    font-weight: bold;
    color: #ffd700;
}

.btn {
    padding: 10px 25px;
    font-size: 1em;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.board-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 8px solid #654321;
    position: relative;
}

.playing-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.marbles-in-hand {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffb700);
    border-radius: 50%;
    border: 4px solid #ff6b6b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
                inset 0 2px 8px rgba(255, 255, 255, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
    animation: float 0.5s ease-in-out infinite alternate;
}

.marbles-in-hand.player1 {
    bottom: -60px;
    right: -60px;
    border-color: #ff6b6b;
}

.marbles-in-hand.player2 {
    top: -60px;
    left: -60px;
    border-color: #4ecdc4;
}

.marbles-in-hand.hidden {
    display: none;
}

.hand-count {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    line-height: 1;
}

.hand-label {
    font-size: 0.75em;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-5px);
    }
}

.row {
    display: flex;
    gap: 15px;
}

.hole {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #5d3a1a, #3a2410);
    border-radius: 50%;
    border: 4px solid #4a2810;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5),
                0 2px 4px rgba(0, 0, 0, 0.3);
}

.hole:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5),
                0 4px 12px rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
}

.hole.active {
    border-color: #ffd700;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(255, 215, 0, 0.6);
}

.hole.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hole.disabled:hover {
    transform: none;
    border-color: #4a2810;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5),
                0 2px 4px rgba(0, 0, 0, 0.3);
}

.marble-count {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    user-select: none;
}

.home-hole {
    width: 100px;
    height: 200px;
    background: radial-gradient(ellipse at 30% 30%, #5d3a1a, #3a2410);
    border-radius: 50px;
    border: 5px solid #4a2810;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.5),
                0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.home-hole .marble-count {
    font-size: 2em;
}

.home-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player1-home {
    border-color: #ff6b6b;
}

.player2-home {
    border-color: #4ecdc4;
}

.game-status {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-status.winner {
    background: rgba(76, 175, 80, 0.8);
    animation: pulse 1s infinite;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hole {
        width: 70px;
        height: 70px;
    }
    
    .home-hole {
        width: 90px;
        height: 180px;
    }
    
    .marble-count {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .board-container {
        padding: 30px 20px;
    }
    
    .hole {
        width: 60px;
        height: 60px;
    }
    
    .home-hole {
        width: 80px;
        height: 160px;
    }
    
    .row {
        gap: 10px;
    }
    
    .marble-count {
        font-size: 1.2em;
    }
}
