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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    touch-action: manipulation;
    background-image: linear-gradient(to bottom right, #e6e6e6, #f5f5f5);
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.score-container {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#game-area {
    position: relative;
    width: 100%;
    height: 60vh;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    touch-action: manipulation;
    border: 1px solid #e0e0e0;
}

.character {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('gin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
    will-change: transform, left, top;
    z-index: 2;
}

.character:active {
    transform: scale(0.9);
}

/* 点击效果样式 */
.click-effect {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    animation: clickEffect 0.5s ease-out forwards;
}

@keyframes clickEffect {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.7;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

#result-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

#reset-button {
    margin-top: 15px;
    padding: 10px 25px;
    font-size: 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#reset-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#reset-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 移动端适配 */
@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .score-container {
        font-size: 16px;
    }

    .character {
        width: 50px;
        height: 50px;
    }

    #game-area {
        height: 50vh;
    }

    .header h1 {
        font-size: 24px;
    }
}