* {

    box-sizing: border-box;
}

body {

    margin: 0;

    padding: 0;

    background: linear-gradient(
        135deg,
        #f5f7fa,
        #c3cfe2
    );

    font-family:
        Arial,
        "Microsoft YaHei",
        sans-serif;
}

.game-container {

    width: min(95vw, 680px);

    margin: 20px auto;

    background: white;

    border-radius: 16px;

    padding: 20px;

    box-shadow:
        0 10px 28px rgba(0,0,0,0.15);

    text-align: center;
}

.top-panel {

    display: flex;

    gap: 10px;

    margin-bottom: 20px;
}

.info-card {

    flex: 1;

    background: #f7f9fc;

    border-radius: 12px;

    padding: 12px;
}

.player-box {

    margin-top: 10px;

    display: flex;

    justify-content: center;

    gap: 10px;

    align-items: center;
}

#player-name {

    color: #3498db;

    font-weight: bold;
}

.row {

    display: flex;

    justify-content: center;

    align-items: center;

    margin: 10px 0;
}

.hole {

    width: 46px;

    height: 46px;

    border-radius: 50%;

    border: 2px solid #333;

    margin: 0 5px;

    background: white;

    cursor: pointer;

    transition: 0.2s;
}

.hole:hover {

    transform: scale(1.08);
}

.feedback-container {

    display: grid;

    grid-template-columns:
        repeat(2,20px);

    margin-left: 10px;
}

.feedback-hole {

    width: 18px;

    height: 18px;

    border-radius: 50%;

    border: 1px solid #222;

    margin: 2px;

    background: white;
}

.ball-title {

    margin-top: 15px;

    font-weight: bold;
}

#ball-container {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    margin-top: 10px;
}

.ball {

    width: 50px;

    height: 50px;

    border-radius: 50%;

    margin: 8px;

    cursor: pointer;

    border: 2px solid rgba(0,0,0,0.3);

    transition: 0.2s;
}

.ball:hover {

    transform: scale(1.12);
}

.button-panel {

    margin-top: 20px;
}

button {

    padding: 10px 18px;

    border: none;

    border-radius: 8px;

    color: white;

    cursor: pointer;

    font-size: 15px;

    margin: 5px;
}

.submit-button {

    background: #4CAF50;
}

.clear-button {

    background: #f39c12;
}

.new-button {

    background: #3498db;
}

#change-name-btn {

    background: #9b59b6;

    font-size: 13px;

    padding: 6px 12px;
}

.message {

    margin-top: 15px;

    font-size: 20px;

    font-weight: bold;
}

.ranking-box {

    margin-top: 25px;

    background: #f7f9fc;

    border-radius: 12px;

    padding: 15px;
}

.ranking-title {

    font-size: 20px;

    font-weight: bold;

    margin-bottom: 10px;
}

.rank-item {

    display: flex;

    justify-content: space-between;

    padding: 8px;

    border-bottom: 1px solid #ddd;
}

@media (max-width: 520px) {

    .top-panel {

        flex-direction: column;
    }

    .ball {

        width: 58px;

        height: 58px;
    }

    .hole {

        width: 52px;

        height: 52px;
    }

    button {

        width: 100%;

        font-size: 18px;
    }
}