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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    padding: 10px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 95vw;
    width: 100%;
    box-sizing: border-box;
}

h1 {
    margin-bottom: 20px;
    color: #333;
    font-size: 2.5rem;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.current-player {
    font-size: 1.2rem;
    font-weight: bold;
}

#reset-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#reset-btn:hover {
    background: #ff5252;
}

#game-board {
    display: inline-block;
    background: #d2b48c;
    border: 2px solid #8b4513;
    border-radius: 4px;
    position: relative;
    margin: 0 auto;
    overflow: auto;
    max-width: 95vw;
}

#board-grid {
    position: relative;
    margin: 20px;
}

.go-board {
    position: relative;
    background: #d2b48c;
    border: 1px solid #000;
}

.board-line {
    position: absolute;
    background: #000;
}

.horizontal-line {
    width: 100%;
    height: 1px;
}

.vertical-line {
    width: 1px;
    height: 100%;
}

.star-point {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.piece {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.black-piece {
    background: radial-gradient(circle at 30% 30%, #666, #000);
}

.white-piece {
    background: radial-gradient(circle at 30% 30%, #fff, #ccc);
    border: 1px solid #999;
}

.last-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: red;
    border-radius: 50%;
    z-index: 2;
}

#winner-message {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 2rem;
}

.hidden {
    display: none;
}

.win {
    animation: winAnimation 0.6s infinite alternate;
}

@keyframes winAnimation {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 95vw;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
    }
    
    .cell {
        width: 20px;
        height: 20px;
    }
    
    .piece {
        width: 16px;
        height: 16px;
    }
    
    #game-board {
        overflow-x: auto;
        max-width: 100vw;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
        max-width: 95vw;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .cell {
        width: 15px;
        height: 15px;
    }
    
    .piece {
        width: 12px;
        height: 12px;
    }
    
    .current-player {
        font-size: 1rem;
    }
    
    #reset-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #game-board {
        overflow-x: auto;
        max-width: 100vw;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .cell {
        width: 30px;
        height: 30px;
    }
    
    .piece {
        width: 24px;
        height: 24px;
    }
}
