/* 页面背景 - 使用background.png作为背景图，覆盖整个视口 */
body {
    background-image: url('images/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
}

/* 主容器 - 使用flex布局，最小高度100vh，四周20px外边距 */
.container {
    display: flex;
    min-height: 100vh;
    margin: 20px;
}

/* 左侧边栏 - 宽度比例1，20px外边距，固定高度600px */
.left-panel {
    flex: 1;
    padding: 10px;
    margin: 120px auto 20px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 右侧边栏 - 宽度比例1，20px外边距，固定高度600px */
.right-panel {
    flex: 1;
    padding: 10px;
    margin: 120px auto 20px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 玩家照片基础样式 */
.player-photo {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

/* 当前玩家高亮效果 */
.player-photo.active {
    box-shadow: 0 0 20px 5px gold;
}

/* 中间面板 - 宽度比例2.5，白色背景，灰色边框，20px内边距，垂直flex布局 */
.center-panel {
    flex: 2.5;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 棋盘容器样式 */
.center-panel .my_zone {
    width: 780px;
    height: 780px;
    background: #c2a657;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 点击层样式 */
.click-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: auto;
}

/* 棋子定位 */
.black-stone, .white-stone {
    position: absolute;
    pointer-events: none;
}

/* 当前玩家显示 */
.player-display {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
}

/* 网格容器样式 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(19, 1fr);
    grid-template-rows: repeat(19, 1fr);
    width: calc(100% - 39px); /* 减去左右边距 */
    height: calc(100% - 39px); /* 减去上下边距 */
    margin: 19.5px; /* 棋盘线到边缘的距离 */
}

/* 网格单元格样式 */
.grid-container > div {
    border: none;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

/* 网格单元格悬停效果 */
.grid-container > div:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* 操作功能栏样式 */
.center-panel .control {
    width: 780px;
    margin: 0px auto 10px;
    padding: 15px;
    background: #c2a657;
    border-radius: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 棋子样式 - 更加拟真 */
.black-stone {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 30% 30%, #444, #000);
    border-radius: 50%;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border: 1px solid #222;
}

.white-stone {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    border-radius: 50%;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #999;
}

/* 功能区样式 */
.control span {
    font-size: 18px;
    font-weight: bold;
    margin: 0 10px;
}

.game-status {
    color: #d9534f;
    font-weight: bold;
    visibility: visible;
    transition: visibility 0.2s;
}

.reset-btn {
    padding: 5px 15px;
    background: #5bc0de;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.reset-btn:hover {
    background: #31b0d5;
}

/* 操作按钮基础样式 */
.control button {
    padding: 2px 4cqh;
    border: none;
    border-radius: 4px;
    background: #8b6b3d; /* 按钮底色 */
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s; /* 悬停动画 */
}

/* 按钮悬停效果 */
.control button:hover {
    background: #6d4f2a; /* 悬停时加深颜色 */
}
