.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.back-btn:hover {
    background: #e0e0e0;
}

h1 {
    flex: 1;
    text-align: center;
    color: #333;
    margin: 0;
}

.game-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-selector label {
    font-weight: bold;
    color: #333;
}

.mode-selector select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.turn-info, .status-info {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.game-board {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    aspect-ratio: 1;
    border: 2px solid #333;
    background: #d4a574;
    padding: 0;
}

.square {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #d4a574;
    position: relative;
    transition: background 0.2s ease;
}

.square:hover:not(.placed) {
    background: #e0b585;
}

.square::before,
.square::after {
    content: '';
    position: absolute;
    background: rgba(0, 0, 0, 0.3);
}

.square::before {
    width: 100%;
    height: 1px;
    top: 50%;
}

.square::after {
    width: 1px;
    height: 100%;
    left: 50%;
}

.stone {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.stone.black {
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), inset -1px -1px 4px rgba(255, 255, 255, 0.1);
}

.stone.white {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 1px 1px 4px rgba(255, 255, 255, 0.6);
}

.moves-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

#moveCount {
    font-weight: bold;
    color: #333;
}
