* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Microsoft YaHei', sans-serif;
    position: relative;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: #4a4a4a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
    z-index: 1000;
}

.back-button:hover {
    background: #666;
}

.game-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-info {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.black-player, .white-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stone {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
}

.stone.black {
    background: radial-gradient(circle at 30% 30%, #666, #000);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
}

.player-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.current-player {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.board {
    width: 600px;
    height: 600px;
    background: #DEB887;
    padding: 20px;
    border: 2px solid #8B4513;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.board::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background-image: 
        linear-gradient(to right, #8B4513 1px, transparent 1px),
        linear-gradient(to bottom, #8B4513 1px, transparent 1px);
    background-size: calc((100% - 2px) / 18) calc((100% - 2px) / 18);
    pointer-events: none;
}

.intersection {
    position: absolute;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 1;
}

.intersection::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.intersection:hover::before {
    background-color: rgba(139, 69, 19, 0.1);
}

/* 星位标记 */
.star-point::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #8B4513;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.stone-piece {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.stone-piece.placed {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.stone-piece.black {
    background: radial-gradient(circle at 30% 30%, #666, #000);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                inset -2px -2px 4px rgba(255, 255, 255, 0.1);
}

.stone-piece.white {
    background: radial-gradient(circle at 30% 30%, #fff, #f0f0f0);
    border: 1px solid #ccc;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1),
                inset -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.coordinate {
    position: absolute;
    font-size: 12px;
    color: #8B4513;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.coordinate.row {
    left: 5px;
    transform: translateY(-50%);
}

.coordinate.col {
    bottom: 5px;
    transform: translateX(-50%);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.controls button {
    padding: 8px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    background: #4a4a4a;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.controls button:hover {
    background: #666;
}

.game-rules {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.game-rules h3 {
    margin-bottom: 10px;
    color: #333;
}

.game-rules ul {
    list-style-position: inside;
    color: #666;
}

.game-rules li {
    margin: 5px 0;
}

.captures {
    font-size: 0.9em;
    color: #666;
} 