* {
    box-sizing: border-box;
}
html, body {
    overflow: hidden;
}
body{
    background-color: black;
    color: white;
    margin:0;
    font-family: 'Times New Roman', Times, serif;
}

#introScreen {
    position: fixed;
    inset: 0;
    background-color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 30;
    transition: opacity 0.8s ease;
}

#gameTitle {
    font-family: 'Cinzel', serif;
    font-size: 64px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#startBtn {
    padding: 14px 40px;
    border-radius: 30px;
    border: none;
    background-color:rgb(1, 158, 158);
    color: white;
    font-size: 18px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#startBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px 5px rgb(85, 165, 165);
}

.top-bar{
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    padding: 40px 60px;
}

.game-area {
    flex: 1;
    display: flex;
    min-height: 0;
}
.computer-panel {
    border-right: 2px solid rgba(255,255,255,0.1);
}
.computer-panel,
.user-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}

.btn{
    position:absolute;
    width:75px;
    height:75px;
    border-radius: 100%;
    color:black;
    border: 2px rgb(5, 17, 63) solid;
    font-size: 34px;
    transition: transform 0.2s ease;
    background-color: rgb(53, 84, 195);
}

.paper:hover,.scissors:hover{
    transform: scale(1.25);
    cursor: pointer;
}
.rock:hover{
    transform: translateX(-50%) scale(1.25);
    cursor: pointer;
}
.rock{
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.scissors{
    bottom: 10px;
    right: 10px;
}

.paper{
    bottom: 10px;
    left: 10px;
}

.bottom-panel{
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-wrapper{
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#roundDisplay {
    font-size: 20px;
    margin: 0;
    align-self: center;
    font-family: 'Cinzel',serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    color:rgb(32, 61, 166);
}

#roundResult {
    font-size: 42px;
    font-weight: bold;
    margin-top: 5px;
    min-height: 30px;
    transition: text-shadow 0.3s ease;
}

.score{
    font-family: 'Cinzel',serif;
    color:rgb(1, 158, 158);
    font-size: 20px;
}

.hidden {
    display: none;
}

.buttons {
    position: absolute;
    inset: 0;
}

.buttons-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-top: 30px;
    align-self: center;
}

#computerEmoji {
    width: 200px;
    height: 200px;
    margin-top: 30px;
    font-size: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#userEmoji {
    position: absolute;
    inset: 0;
    font-size: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#nextRoundBtn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 70px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: bold;
    background-color: rgb(1, 158, 158);
    border: 2px solid rgb(43, 116, 115);
    cursor: pointer;
    transition: 0.2s ease;
    color: black;
    z-index: 10;
}

#nextRoundBtn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 15px 5px rgb(82, 163, 163);
}

#finalResult {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 60px;
    text-align: center;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: popIn 0.5s;
}

@keyframes popIn {
    0% {transform: translate(-50%, -50%) scale(1.12);}
    25% {transform: translate(-50%, -50%) scale(1.23);}
    50% {transform: translate(-50%, -50%) scale(1.05);}
    75% {transform: translate(-50%, -50%) scale(0.95);}
    100% {transform: translate(-50%, -50%) scale(1);}
}

#replayBtn, #bestOfFiveBtn {
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    background-color: rgb(35, 142, 142);
    color: white;
    transition: 0.2s ease;
}

#replayBtn:hover, #bestOfFiveBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px 5px rgb(62, 138, 138);
}

@media (max-width: 600px) {
    html, body {
        overflow: auto;
    }

    .top-bar {
        padding: 20px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #roundDisplay {
        width: 100%;
        text-align: center;
        font-size: 14px;
        order: -1;
        margin-bottom: 5px;
    }

    .game-area {
        flex-direction: column;
    }

    .computer-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .computer-panel,
    .user-panel {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    #computerEmoji {
        width: 140px;
        height: 140px;
        margin-top: 20px;
        font-size: 70px;
    }

    .buttons-container {
        width: 140px;
        height: 140px;
        margin-top: 20px;
    }

    .btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .rock {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .scissors {
        bottom: 5px;
        right: 5px;
    }

    .paper {
        bottom: 5px;
        left: 5px;
    }

    #gameTitle {
        font-size: 32px;
        letter-spacing: 2px;
    }

    #rules {
        padding: 16px 24px;
        font-size: 13px;
    }

    #startBtn {
        font-size: 14px;
        padding: 10px 28px;
    }

    #roundResult {
        font-size: 28px;
    }

    #nextRoundBtn {
        width: 120px;
        height: 36px;
        font-size: 13px;
    }

    #finalResult {
        width: 80vw;
        padding: 30px 20px;
    }
}
