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

body {
    background-image: url('../image/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#gameCanvas {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#startBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    transition: background-color 0.3s;
}

#startBtn:hover {
    background-color: #45a049;
}

#startBtn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.face {
    position: absolute;
    width: 80px;
    height: 80px;
    transition: transform 0.3s;
}

.face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spider {
    position: absolute;
    font-size: 120px;
    z-index: 10;
    transition: all 0.5s ease-in-out;
    pointer-events: none;
}

.speech-bubble {
    position: absolute;
    background-color: black;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 400px;
    white-space: normal;
    line-height: 1.5;
    z-index: 50;
    animation: fadeIn 0.3s ease-in-out;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 180px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid black;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
