body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    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 {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#status {
    font-size: 18px;
    font-weight: bold;
}

#moves {
    font-size: 16px;
}

#restart {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

#restart:hover {
    background-color: #45a049;
}

.board-container {
    margin: 0 auto;
    width: fit-content;
}

#board {
    position: relative;
    width: 240px;
    height: 240px;
    background-color: #D2B48C;
    border: 2px solid #8B4513;
    border-radius: 5px;
}

.hole {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #8B4513;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.hole.empty {
    background-color: #D2B48C;
    background-image: 
        radial-gradient(circle at center, 
            rgba(210, 180, 140, 0.9) 0%, 
            rgba(184, 154, 114, 0.8) 70%,
            rgba(160, 130, 90, 0.9) 100%),
        repeating-radial-gradient(
            circle at center,
            rgba(184, 154, 114, 0.2) 0px,
            rgba(184, 154, 114, 0.2) 2px,
            rgba(210, 180, 140, 0.2) 2px,
            rgba(210, 180, 140, 0.2) 4px
        );
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 154, 114, 0.7);
}

.hole.selected {
    background-color: #FFD700;
    transform: scale(1.1);
}

.hole.peg {
    background-color: #8B4513;
}

.hole.peg::after {
    content: '';
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #A0522D;
    background-image: 
        radial-gradient(circle at 30% 30%, 
            rgba(255, 255, 255, 0.3) 0%, 
            rgba(255, 255, 255, 0.1) 20%, 
            rgba(0, 0, 0, 0) 60%),
        repeating-linear-gradient(
            45deg,
            rgba(139, 69, 19, 0.8) 0px,
            rgba(139, 69, 19, 0.8) 3px,
            rgba(160, 82, 45, 0.8) 3px,
            rgba(160, 82, 45, 0.8) 6px
        );
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 69, 19, 0.9);
}

.hole.possible-move {
    background-color: #90EE90;
}

.win-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
    font-size: 24px;
    display: none;
    z-index: 100;
}

.rating-guide {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .rating-guide {
        font-size: 13px;
        padding: 6px;
        margin: 4px 0;
    }

    .game-info {
        margin: 15px 0;
    }

    #status {
        font-size: 16px;
    }

    #moves {
        font-size: 14px;
    }

    #restart {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        max-width: 200px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 10px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .rating-guide {
        font-size: 12px;
        padding: 5px;
        line-height: 1.4;
    }

    .game-info {
        margin: 10px 0;
        gap: 8px;
    }

    #status {
        font-size: 14px;
    }

    #moves {
        font-size: 13px;
    }

    #restart {
        padding: 12px 16px;
        font-size: 14px;
    }

    .win-message {
        font-size: 18px;
        padding: 15px;
        width: 80%;
        max-width: 300px;
    }

    .hole {
        cursor: pointer;
    }

    .hole:hover,
    .hole.selected,
    .hole.possible-move {
        transform: scale(1.05);
    }
}

@media screen and (max-width: 360px) {
    h1 {
        font-size: 18px;
    }

    .rating-guide {
        font-size: 11px;
    }

    .win-message {
        font-size: 16px;
    }
}

/* 防止移动端触摸延迟 */
#restart {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    outline: none;
}

#restart:active {
    background-color: #3d8b40;
    transform: scale(0.98);
}

.hole {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}