:root {
    --board-color: #dcb35c;
    /* 更真实的木纹色 */
    --cell-size: 32px;
    /* 稍大以提升触控体验 */
    --line-width: 1px;
    --stone-size: calc(var(--cell-size) * 0.95);
    /* 石子稍大 */
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    text-align: center;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.info-panel {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    width: min(90%, 600px);
    text-align: left;
}

.board-container {
    display: inline-block;
    background: var(--board-color);
    padding: calc(var(--cell-size) / 2);
    border: 3px solid #4e342e;
    border-radius: 8px;
    box-shadow: 0 8px 25px var(--shadow-color);
    position: relative;
    transition: transform 0.3s ease;
}

.board-container:hover {
    transform: scale(1.02);
}

.grid {
    display: grid;
    grid-template-columns: repeat(19, var(--cell-size));
    grid-template-rows: repeat(19, var(--cell-size));
    position: relative;
}

.cell {
    width: var(--cell-size);
    height: var(--cell-size);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.cell.star::before {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.cell::before,
.cell::after {
    content: '';
    position: absolute;
    background: #000;
    pointer-events: none;
}

.cell::before {
    top: 50%;
    left: 0;
    right: 0;
    height: var(--line-width);
    transform: translateY(-50%);
}

.cell::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: var(--line-width);
    transform: translateX(-50%);
}

.cell:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.stone {
    width: var(--stone-size);
    height: var(--stone-size);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    transition: transform 0.2s ease, opacity 0.3s;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
}

.stone.animate {
    animation: placeStone 0.3s ease;
}

@keyframes placeStone {
    0% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 1;
    }
}

.black {
    background: radial-gradient(circle at 25% 25%, #555, #111);
    box-shadow: 2px 2px 5px var(--shadow-color);
}

.white {
    background: radial-gradient(circle at 25% 25%, #fff, #ddd);
    box-shadow: 2px 2px 5px var(--shadow-color);
    border: 1px solid #bbb;
}

#status {
    font-weight: bold;
    margin: 10px 0;
    font-size: 1.3em;
    color: #333;
}

.meta {
    font-size: 1em;
    color: #555;
    margin-top: 10px;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    background: #4e342e;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: #6d4c41;
    transform: scale(1.05);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#captured {
    margin-top: 15px;
    font-size: 1.1em;
    color: #444;
}

#game-over {
    font-size: 1.4em;
    color: #d32f2f;
    margin-top: 10px;
}

/* 在go.css中添加 */
.role-status {
    margin: 10px 0;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.role-status.waiting {
    background-color: #fff3cd;
    color: #856404;
}

.role-status.assigning {
    background-color: #d1ecf1;
    color: #0c5460;
}

.role-status.black {
    background-color: #d4edda;
    color: #155724;
}

.role-status.white {
    background-color: #e2e3e5;
    color: #383d41;
}

.role-status.observer {
    background-color: #f8d7da;
    color: #721c24;
}