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

:root {
    /* background Color */
    --bg-one: hsl(214, 47%, 23%);
    --bg-two: hsl(237, 49%, 15%);

    /* Text Colors */
    --dark-text: hsl(229, 25%, 31%);
    --score-text: hsl(229, 64%, 46%);
    --header-outline: hsl(217, 16%, 45%);

    /* responsive Size */
    --mobile: 375px;
    --desktop: 1366px;

    /* Colors */
    --primary: burlywood;

    /* Font Family */
    --primary-font: 'Barlow Semi Condensed', sans-serif;

    --radius: 6px;
    --radius-full: 9999px;
}

body {
    font-family: 'Barlow Semi Condensed', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 600;
    box-sizing: border-box;
}

#rock-paper-scissor-challenge {
    background: rgb(38, 192, 193);
    background: -moz-radial-gradient(circle, var(--bg-one) 0%, var(--bg-two) 100%);
    background: -webkit-radial-gradient(circle, var(--bg-one) 0%, var(--bg-two) 100%);
    background: radial-gradient(circle, var(--bg-one) 0%, var(--bg-two) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#26c0c1",endColorstr="#07ac9f",GradientType=1);

    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

header {
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    margin: 10px auto 0;
    width: 800px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
}

header .logo {
    /* width: 100px;
    height: 100px; */
    /* background: white; */
    display: flex;
    align-items: center;
}

.score-container {
    display: flex;
}

header .scorecard {
    background: white;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--dark-text);
    /* padding: 30px; */
    width: 110px;
    height: 110px;
    margin-left: 10px;
}

.scorecard h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--score-text);
    text-transform: uppercase;
}

.scorecard p {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--dark-text);
}

.border-1 {
    border: 1px solid white;
}

.rounded {
    border-radius: var(--radius);
}

@media (max-width: 800px) {
    header {
        width: 90%;
    }
}

.icons {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    will-change: transform;
    z-index: 2;
}

/* .icons:hover {
    transform: scale(1.1);
} */

.icons.paper {
    top: 0;
    left: 0;
}

.paper {
    background: linear-gradient(to top left, hsl(230, 89%, 62%) 0%, hsl(230, 89%, 65%) 100%);
    box-shadow: 0 8px hsl(230, 89%, 35%);
}

.icons.scissors {
    top: 0;
    right: 0;
}

.scissors {
    background: linear-gradient(to top left, hsl(39, 89%, 49%) 0%, hsl(40, 84%, 53%) 100%);
    box-shadow: 0 8px hsl(39, 89%, 29%);
}

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

.rock {
    background: linear-gradient(to top left, hsl(349, 71%, 52%) 0%, hsl(349, 70%, 56%) 100%);
    box-shadow: 0 8px hsl(349, 71%, 32%);
}

.icons .icon-inner {
    width: 150px;
    height: 150px;
}

.icon-inner {
    border-radius: var(--radius-full);
    background: white;
    box-shadow: inset 0px 8px 2px rgba(59, 67, 99, 0.3);
    -webkit-box-shadow: inset 0px 8px 2px rgba(59, 67, 99, 0.3);
    -moz-box-shadow: inset 0px 8px 2px rgba(59, 67, 99, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.icons:hover .icon-inner img {
    animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

main {
    height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-container {
    margin: 30px auto 0;
    width: 500px;
    height: 450px;
    position: relative;
}

#game-container.active {
    display: block;
}

.winner-board.active {
    display: flex;
}

.winner-board {
    width: 950px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

.winner-board .icon-inner {
    width: 250px;
    height: 250px;
}

.winner-board .icon-inner img {
    width: 100px;
    height: 100px;
}

.winner-board .user-icon,
.winner-board .computer-icon,
.winner-board .game-result {
    width: 300px;
    height: 300px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-transform: uppercase;
    font-weight: 600;
}

.game-result h3 {
    margin-bottom: 10px;
    font-size: 2.8rem;
    color: white;
}

.winner-board h2 {
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: white;
    font-weight: 600;
    letter-spacing: 2px;
    opacity: 0;
}

.play-again {
    background: white;
    padding: 12px 32px;
    box-shadow: 0;
    outline: none;
    border-radius: 6px;
    border: 0;
    font-family: 'Barlow Semi Condensed', sans-serif;
    text-transform: uppercase;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark-text);
}

.bg-line {
    position: absolute;
    top: 30px;

    width: 450px;
    height: 10px;
    background: var(--dark-text);
    z-index: 1;
}

.bg-line.straight {
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.bg-line.left {
    left: 50px;
    transform: rotate(55deg);
    transform-origin: 0;
}

.bg-line.right {
    right: 50px;
    transform: rotate(-55deg);
    transform-origin: 100%;
}

.rules-btn {
    padding: 10px 20px;
    text-transform: uppercase;
    border: 1px solid white;
    color: white;
    border-radius: var(--radius);

    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: inset 0 0 0 0 white;
    -webkit-transition: ease-out 0.4s;
    -moz-transition: ease-out 0.4s;
    transition: ease-out 0.4s;
}

.rules-modal-overlay {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: var(--bg-one);
    opacity: 0;
    top: 0;
    left: 0;
    transition: 0.3s opacity;
    will-change: opacity;
}

.rules-modal-overlay.show {
    opacity: 0.9;
    z-index: 1000;
}

.rules-modal {
    width: 400px;
    height: 450px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);

    -webkit-transition: all ease-out 0.4s;
    -moz-transition: all ease-out 0.4s;
    transition: all ease-out 0.4s;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    will-change: transform;

    z-index: 1001;
}

.rules-modal.show {
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 100% 100%;
}

.rules-modal-heading {
    display: flex;
    align-items: center;
    padding: 20px;
    justify-content: space-between;
}

.rules-modal-heading .close {
    cursor: pointer;
}

.rules-modal h2 {
    color: var(--dark-text);
    text-transform: uppercase;
    font-size: 1.75rem;
}

.rules-modal svg {
    font-family: 'Barlow Semi Condensed', sans-serif;
}

.rules-modal-body {
    margin: 40px auto;
    text-align: center;
}

.rules-btn:hover {
    box-shadow: inset 0 -100px 0 0 white;
    color: var(--dark-text);
}

@keyframes shake {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}
