* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: repeating-conic-gradient(#909090 0deg 90deg,
            #9a9a9a 90deg 180deg) 0 0 / 120px 120px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: none;
}

#catPaw {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}

#catPaw * {
    pointer-events: none;
}

/* タッチデバイス（携帯・タブレット）では猫の手を非表示 */
@media (hover: none) and (pointer: coarse) {
    #catPaw {
        display: none;
    }

    canvas {
        cursor: auto;
    }
}

#title {
    position: absolute;
    top: 10px;
    left: 15px;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

#topLink {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #333;
    font-size: 16px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 12px;
    border-radius: 5px;
    z-index: 10;
}

#topLink:hover {
    background: rgba(255, 255, 255, 0.9);
}

#startButton {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #4CAF50, #388E3C);
    color: white;
    font-size: 28px;
    font-weight: bold;
    padding: 20px 50px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

#startButton:hover {
    background: linear-gradient(180deg, #5CBF60, #43A047);
}

#startButton:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* 説明ボタン */
#helpButton {
    position: absolute;
    top: 10px;
    right: 110px;
    color: #333;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    z-index: 10;
}

#helpButton:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* モーダル */
#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#modalOverlay.show {
    display: flex;
}

#modalContent {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#modalContent p {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

#modalCloseButton {
    background: linear-gradient(180deg, #4CAF50, #388E3C);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#modalCloseButton:hover {
    background: linear-gradient(180deg, #5CBF60, #43A047);
}

#modalCloseButton:active {
    transform: scale(0.95);
}