body {
    margin: 0;
    overflow: hidden;
    background-color: #87CEEB;
    /* 空色 */
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 0px, rgba(255, 255, 255, 0.2) 20px, transparent 20px, transparent 40px);
    font-family: 'M PLUS Rounded 1c', sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.home-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    opacity: 0.9;
    z-index: 1000;
    transition: transform 0.2s;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.2));
}

.home-link:hover {
    transform: scale(1.1) rotate(-5deg);
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.hud {
    display: flex;
    justify-content: space-between;
    width: 600px;
    background: #fff;
    padding: 10px 30px;
    border-radius: 30px;
    box-shadow: 0 4px 0 #ccc;
    border: 4px solid #FFCDD2;
    box-sizing: border-box;
    font-size: 1.5rem;
    font-weight: 900;
    color: #FF5252;
}

.board-wrapper {
    position: relative;
    background: #E0F7FA;
    border-radius: 12px;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.1);
    border: 6px solid #B2EBF2;
    overflow: hidden;
}

#game-canvas {
    display: block;
    /* remove pixelated */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(3px);
    z-index: 30;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #fff;
    padding: 30px 50px;
    border-radius: 30px;
    text-align: center;
    border: 5px solid #FFB6C1;
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.1);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

h1,
h2 {
    margin: 0 0 15px 0;
    font-size: 3rem;
    font-weight: 900;
    color: #FF69B4;
    text-shadow: 2px 2px 0 #FFB6C1;
}

.modal p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #666;
    font-weight: bold;
}

button {
    background: #FFD700;
    border: 3px solid #FFA500;
    border-radius: 20px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    padding: 10px 30px;
    color: #FF4500;
    cursor: pointer;
    box-shadow: 0 6px 0 #FFA500;
    transition: transform 0.1s, box-shadow 0.1s;
}

button:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #FFA500;
    background: #FFE4B5;
}

button:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #FFA500;
}