body {
    font-family: Arial, sans-serif;
    color: #ffffff;
    background: #112642;
    background: -webkit-linear-gradient(273deg,rgba(17, 38, 66, 1) 0%, rgba(33, 77, 128, 1) 100%);
    background: -moz-linear-gradient(273deg,rgba(17, 38, 66, 1) 0%, rgba(33, 77, 128, 1) 100%);
    background: linear-gradient(273deg,rgba(17, 38, 66, 1) 0%, rgba(33, 77, 128, 1) 100%);
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden; 
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 240px;
    padding-right: 2rem;
    margin-right: 2rem;
    border-right: 1px solid rgba(236, 237, 237, 0.15);
}

.header h1 {
    color: #eceded;
    font-size: 3.5em; 
    font-weight: 700;
    line-height: 1.2; 
    padding-right: 10px;
    box-shadow: none;
    text-shadow: -2px 2px 5px rgba(0, 0, 0, 0.3);
}

main {
    max-width: 900px; 
    min-height: 550px;
    padding: 0 45px 3.5rem;
    background-color: #234a7c;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.score-board {
    position: relative;
    top: -45px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background-color: black;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 1.5rem 1rem;
    width: 90%;
    max-width: 400px;
    padding-top: 40px;
    border-radius: 0px 0px 10px 10px;
    box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
}

.badge-container, #user-score, #computer-score {
    font-size: 2.6rem;
    font-weight: bold;
    padding: 0 1rem;
}

#score-separator {
    color: #eceded;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 0 1rem;
}

.badge {
    background-color: rgb(240, 46, 169);
    color: white;
    font-size: 16px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

#user-label {
    position: absolute;
    left: -25px;
}

#computer-label {
    position: absolute;
    right: -35px;
}

.result {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 4rem;
    margin: 0px auto 20px auto;
    padding: 1.5rem;
    gap: 0.6rem;
    width: 90%;
    max-width: 600px; 
    background: #041121;
    border: 1.6px solid #eceded;
    border-radius: 10px;
    box-shadow: rgba(240, 46, 169, 0.237) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 169, 0.155) 15px 15px, rgba(240, 46, 169, 0.089) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;} .game-hands {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
    justify-content: space-between;
}

.result .game-hands img:first-of-type {
    width: 8rem;
    height: 8rem;
    transform: rotate(90deg);
}

.result .game-hands img {
    width: 8rem;
    height: 8rem;
    transform: rotate(270deg);
}

.result .game-hands.animating img:first-of-type {
    animation: shake-user 0.4s ease-in-out infinite;
}

.result .game-hands.animating img:last-of-type {
    animation: shake-computer 0.4s ease-in-out infinite;
}

@keyframes shake-user {
    0%, 100% {
        transform: rotate(90deg) translateY(0);
    }
    50% {
        transform: rotate(91deg) translateY(-15px);
    }
}

@keyframes shake-computer {
    0%, 100% {
        transform: rotate(270deg) translateY(0);
    }
    50% {
        transform: rotate(271deg) translateY(-15px);
    }
}

.message-result {
    display: flex;
    align-items: center; 
    justify-content: center; 
    min-height: 2em;
    margin: 20px 0;
}

.win-text {
    color: #6ffd6f; 
    font-weight: bold;
    text-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .lose-text {
    color: #ff6666; 
    font-weight: bold;
    text-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
  }

.message-result p {
    font-size: 1.4rem;
    text-align: center;
    color: #ffffff;
    font-weight: bold;
    text-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
}

.choices {
    display: flex;
    justify-content: center;
    gap: 6rem;
    align-items: center;
    margin-top: 5vh; 
}

.choice {
    transition: transform 0.3s ease;
    border: 8px solid transparent;
    border-radius: 50%;
}

.choices .choice:active {
    transform: scale(0.93);
}

.choices .choice img {
    cursor: pointer;
    width: 8rem;
    height: 8rem;
    background: #041121;
    border-radius: 50%;
    padding: 15px;
    box-shadow: rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;
}

.choices .choice img:hover {
    background-color: rgb(3, 7, 11);
}

.green-glow {
    border-color: #4dcc7d;
    box-shadow: 0 0 10px #31b43a;
  }

.red-glow {
    border-color: #ff5f5f;
    box-shadow: 0 0 10px #b43131;
}

.gray-glow {
    border-color: #c7c7c7;
    box-shadow: 0 0 10px #25292b;
}

.play-again-button {
    background-color: rgb(240, 46, 169);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.play-again-button:hover {
    background-color: rgb(210, 36, 149);
    transform: scale(1.05);
}

/* for larger screens */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .header {
        border-right: none;
        margin-right: 0;
        padding: 20px;
        max-width: 100%;
        background-color: #0f1e32;
        border-radius: 0px 0px 10px 10px;
        text-align: center;
    }

    .header h1 {
        font-size: 2.8rem;
    }

    main {
        min-height: auto;
        margin: 0 auto;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }

    .score-board {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin: 0 auto;
        margin-bottom: 18px;
        flex-shrink: 0;
    }
}

/* For tablets and smaller screens */
@media (max-width: 768px) {
    body { 
        background: #1E3A5F;
        flex-direction: column;
        padding: 0;
        align-items: stretch; 
        justify-content: flex-start;
    }

    main {
        min-height: 100vh;
        padding-bottom: 2rem;
    }

    #computer-label {
        left: auto;
        right: -25px;
    }

    .badge {
        font-size: 14px;
    }

    .header {
        background-color: #0f1e32;
        padding: 20px 0px;
        margin-right: 0;
        text-align: center; 
        border-right: none;
        border-radius: 0px 0px 10px 10px;
        max-width: 100%;
    }

    .header h1 {
        font-size: 2.2rem;
        margin: 0 auto;
    }

    #user-score, #computer-score {
        font-size: 2rem;
        padding: 0 0.8rem;
    }

    .result {
        gap: 2rem;
        margin-top: 20px;
    }

    .result .game-hands img,
    .result .game-hands img:first-of-type {
        width: 7rem;
        height: 7rem;
    }

    .choices {
        gap: 3rem;
    }

    .choices .choice img {
        width: 7rem;
        height: 7rem;
    }
}

/* For most mobile devices in portrait mode */
@media (max-width: 480px) {
    main {
        padding: 0 20px 2rem;
    }

    .header h1 {
        font-size: 2.1rem;
    }

    #user-score, #computer-score {
        padding: 0 0.6rem;
        font-size: 1.8rem;
    }

    .badge {
        font-size: 14px;
    }

    .result .game-hands img,
    .result .game-hands img:first-of-type {
        width: 6rem;
        height: 6rem;
    }

    .message-result p {
        font-size: 1.2rem;
    }

    .choices {
        gap: 1.5rem;
    }

    .choices .choice img {
        width: 5.5rem;
        height: 5.5rem;
    }
}

/* For smaller mobile devices */
@media (max-width: 420px) {
   main {
        padding: 0 15px 2rem;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    #user-score, #computer-score {
        font-size: 1.5rem;
        padding: 0 0.6rem;
    }

    .badge {
        font-size: 12px;
    }

    .result .game-hands img,
    .result .game-hands img:first-of-type {
        width: 5rem;
        height: 5rem;
    }

    .message-result p {
        font-size: 1.1rem;
    }

    .choices .choice img {
        width: 4.5rem;
        height: 4.5rem;
        padding: 10px;
    }
}

/* For devices with shorter viewports */
@media (max-height: 800px) {
    body {
        overflow-y: auto;
    }
    h1 {
        font-size: 1.6rem; 
    }
}
