body {
    margin: 0;
    padding: 0;
    letter-spacing: .6em;
    background-image: url("../img/nightbackground.png");
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.btn {
    background-color: blue;
}

#reset-btn{
    display: none;
    margin: 20px auto;
}

#sound-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

#sound-menu {
    position: fixed;
    top: 60px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
}

#sound-menu label {
    display: block;
    color: white;
    margin: 5px 0;
}

#logo{
    text-align: center;
    margin-bottom: 20px;
}

#logo img {
    max-width: 300px;
    width: 100%;
}

#battle {
    max-width: 200px;
    width: 100%;
}

#battle-btn{
    background-color: transparent;
    color: transparent;
    border: none;
    animation: jiggle 1.5s ease-in-out infinite;
}

@keyframes jiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.winner {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.player-one, .player-two {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.battle-img {
    visibility: hidden;
    flex-shrink: 0;
}

.attk-btn{
    margin-top: 1em;
    visibility: hidden;
    height: 50px;
}

#hp-bar-one, #hp-bar-two{
    display: none;
    margin: 10px auto;
    padding: 5px 10px;
    border-radius: 5px;
    width: 200px;
    text-align: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

#hp-bar-one::before, #hp-bar-two::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    transition: width 0.5s ease;
    width: var(--damage-width, 0);
}

#hp-bar-one span, #hp-bar-two span {
    position: relative;
    z-index: 1;
}

.player1Damage{
    position: absolute;
    left: 30%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 2em;
    font-weight: bold;
}

.player2Damage{
    position: absolute;
    right: 30%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 2em;
    font-weight: bold;
}

.poke-ball{
    max-width: 200px;
    width: 100%;
}

#card1 img, #card2 img {
    max-width: 250px;
    width: 100%;
    height: auto;
}

#card1, #card2 {
    position: relative;
    min-height: 350px;
}

.loading-pokeball {
    max-width: 150px;
    width: 100%;
}

.victory-dance{
    text-align: center;
    margin: 20px 0;
    display: none;
}

.victory-dance img {
    max-width: 300px;
    width: 100%;
}

@media (max-width: 768px) {
    .row {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .player-one, .player-two {
        min-width: 120px;
        flex: 1;
    }
    
    #card1 img, #card2 img {
        max-width: 150px;
    }
    
    #card1, #card2 {
        min-height: 200px;
    }
    
    .battle-img {
        flex-shrink: 1;
    }
    
    #battle {
        max-width: 100px;
    }
    
    #logo img {
        max-width: 200px;
    }
    
    .player1Damage, .player2Damage {
        font-size: 1.5em;
    }
    
    #hp-bar-one, #hp-bar-two {
        width: 100px;
        font-size: 0.8em;
        padding: 3px 5px;
    }
}

