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

body {
    cursor: crosshair;
    overflow: hidden;
    background-color: black;
    color: white;
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#game {
    display: none;
}

#play {
    width: 100%;
    height: 100%;
    background-size: cover;
    cursor: pointer;
    z-index: 3;
    /* margin-top: 1px; */
}
/* #play img{
    width: 90%;
    margin-left: 5%;
} */

#select-gun{
    /* z-index: 3; */
    position: absolute;
    bottom: 10%;
    left: 50%;
}

#gun {
    display: none;
    width: 43%;
    height: 58%;
    position: absolute;
    right: 0px;
    bottom: 0px;
    pointer-events: auto;
    /* pointer-events: none; */
}

#score{
    margin: 0.6%;
    user-select: none;
    pointer-events: none;
    font-size: 2.4vh;
    display: flex;
    gap: 1%;
    /* position: absolute; */
}

img {
    /* user-drag: none;  */
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none; 
}

#blood{
    margin-top: -2%;
    width: 100vmax;
    height: 102.5vh; 
    /* min-height: 100vh; */
    position: absolute;
    /* background-position: top; */
    background-size: cover;
    display: none;
    z-index: 4;
    object-fit: fill;
}

#targets{
    width: 100%;
    height: 100%;
}

#menu{
    position: absolute;
    width: 50%;
    height: 50%;
    right: 25%;
    top: 20%;
    z-index: 100;
    background-color: red;
    padding: 15px;
    box-sizing: border-box;
    overflow-y: auto;
    word-wrap: break-word;

    display: none;
}

#game-over{
    position: absolute;
    width: 65%;
    height: 80%;
    right: 17.5%;
    top: 5%;
    z-index: 100;
    background-color: red;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    overflow-y: auto;
    word-wrap: break-word;

    display: none;
}

#leaderboard {
    position: absolute;
    width: 60%;
    height: 70%;
    right: 20%;
    top: 15%;
    z-index: 100;
    background-color: red;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    overflow-y: auto;
    word-wrap: break-word;
    display: none;
}

#leaderboard-content {
    margin: 20px 0;
    text-align: left;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 5px;
}

.score-entry .rank {
    font-weight: bold;
    color: #ffff00;
}

.score-entry .name {
    flex-grow: 1;
    text-align: center;
}

.score-entry .score {
    font-weight: bold;
}

/* Winner highlighting for top 3 */
.score-entry.winner {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 3px;
    padding: 8px 5px;
}

.score-entry.winner .rank {
    color: #FFD700;
    text-shadow: 0 0 5px #FFD700;
}

.score-entry.winner .score {
    color: #FFD700;
}

#highscore-submission {
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

#player-name {
    padding: 8px;
    margin: 5px;
    width: 200px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
}

#share-buttons {
    margin: 15px 0;
}

button {
    padding: 10px 20px;
    margin: 5px;
    background-color: #333;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #555;
}

#twitter-share {
    background-color: #1DA1F2;
    border-color: #1DA1F2;
}

#contract-address {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#contract-address p {
    margin-bottom: 10px;
    font-size: 14px;
}

.address-container {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

#contract-addr {
    width: 360px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    background-color: #f9f9f9;
    color: #333;
    text-align: center;
}



/* Mobile responsive styles */
@media (max-width: 768px) {
    #gun {
        width: 35%;
        height: 45%;
    }
    
    #score {
        font-size: 2vh;
        flex-wrap: wrap;
    }
    
    #game-over {
        width: 80%;
        height: 60%;
        right: 10%;
        top: 10%;
        font-size: 14px;
    }
    
    #leaderboard {
        width: 85%;
        height: 70%;
        right: 7.5%;
        top: 10%;
    }
    
    #menu {
        width: 80%;
        height: 60%;
        right: 10%;
        top: 15%;
        font-size: 14px;
    }
    
    button {
        padding: 12px 16px;
        font-size: 14px;
        touch-action: manipulation;
    }
    
    #contract-addr {
        width: 90%;
        max-width: 280px;
        font-size: 10px;
    }
    
    #player-name {
        width: 80%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    #gun {
        width: 30%;
        height: 35%;
    }
    
    #score {
        font-size: 1.8vh;
        gap: 0.5%;
    }
    
    #game-over {
        width: 95%;
        height: 70%;
        right: 2.5%;
        top: 5%;
        font-size: 12px;
        padding: 15px;
    }
    
    #leaderboard {
        width: 95%;
        height: 80%;
        right: 2.5%;
        top: 5%;
    }
    
    #menu {
        width: 95%;
        height: 70%;
        right: 2.5%;
        top: 10%;
        font-size: 12px;
        padding: 15px;
    }
    
    button {
        padding: 10px 14px;
        font-size: 12px;
        margin: 3px;
    }
    
    #contract-addr {
        font-size: 9px;
    }
}