body {
    margin: 0;
    overflow: hidden;
    background: #1a1a1a;
    font-family: Arial, sans-serif;
}

#canvas {
    width: 100%;
    height: 100vh;
    display: block;
}

#homeLink {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    text-decoration: none;
    z-index: 30;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#homeLink:hover {
    opacity: 1;
}

#helpBtn {
    position: absolute;
    top: 20px;
    right: 70px;
    font-size: 16px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    cursor: pointer;
    z-index: 30;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#helpBtn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    z-index: 10;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 10px;
    color: white;
    text-align: center;
    display: none;
    z-index: 20;
}

.overlay h1 {
    font-size: 48px;
    margin: 0 0 20px 0;
}

.overlay p {
    font-size: 24px;
    margin: 10px 0;
}

.btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 24px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

.btn:hover {
    background: #45a049;
}

@keyframes gameOverBlink {
    0%,
    49% {
        color: red;
    }

    50%,
    100% {
        color: yellow;
    }
}

.game-over-text {
    animation: gameOverBlink 2s infinite;
}

/* スマホ用 */
@media screen and (max-width: 600px) {
    #ui {
        font-size: 16px;
        top: 10px;
        left: 10px;
    }

    .overlay {
        padding: 20px;
        max-width: 90vw;
        box-sizing: border-box;
    }

    .overlay h1 {
        font-size: 32px;
    }

    .overlay p {
        font-size: 16px;
    }

    .btn {
        padding: 10px 25px;
        font-size: 18px;
    }
}
