* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status {
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

.result {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.board {
    position: relative;
    width: 480px;
    height: 480px;
    background-color: #d2b48c;
    background-image: 
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 4px 4px, 4px 4px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.board::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background: linear-gradient(
        45deg,
        rgba(255,255,255,0.1) 0%,
        rgba(0,0,0,0.1) 100%
    );
    pointer-events: none;
}

/* 绘制棋盘线条 */
.board::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background-image: 
        linear-gradient(90deg, #000 1px, transparent 1px),
        linear-gradient(#000 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0;
    background-repeat: space;
    pointer-events: none;
}

/* 天元和星位 */
.board .star {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* 天元（中心点） */
.board .star.tianyuan {
    width: 10px;
    height: 10px;
}

.cell {
    position: absolute;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    transform: translate(-50%, -50%);
}

.cell:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* 传统棋子样式 */
.cell.black::after {
    content: '';
    width: 26px;
    height: 26px;
    background: radial-gradient(circle at 30% 30%, #333, #000);
    border-radius: 50%;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
}

.cell.white::after {
    content: '';
    width: 26px;
    height: 26px;
    background: radial-gradient(circle at 30% 30%, #fff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border: 1px solid #ddd;
}



.thinking {
    margin-top: 20px;
    font-size: 18px;
    color: #7f8c8d;
}

.thinking-text {
    margin-bottom: 10px;
}

.thinking-dots {
    display: inline-flex;
    gap: 5px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background-color: #3498db;
    border-radius: 50%;
    animation: dot-animation 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-animation {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .board {
        grid-template-columns: repeat(15, 20px);
        grid-template-rows: repeat(15, 20px);
        padding: 10px;
    }
    
    .cell {
        width: 20px;
        height: 20px;
    }
    
    .cell.black::after,
    .cell.white::after {
        width: 16px;
        height: 16px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .status {
        font-size: 16px;
    }
    
    .result {
        font-size: 20px;
    }
}