@import"https://fonts.googleapis.com/css2?family=Caprasimo&family=Roboto+Slab:wght@400;700&display=swap";

* {
    box-sizing: border-box
}

html {
    font-family: Roboto Slab, sans-serif;
    line-height: 1.5;
    color: #ebe7ef;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%
}

body {
    background: radial-gradient(circle at top, rgba(241, 210, 70, .98), rgba(250, 176, 103, .87)), url(bg-pattern-dark.png);
    background-repeat: repeat;
    background-size: 100% 100%, 30% 30%, 100% 100%;
    min-height: 110rem
}

header {
    text-align: center
}

header img {
    width: 8rem;
    object-fit: contain;
    margin: 3rem auto 1rem;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, .4))
}

h1 {
    font-family: Caprasimo, cursive;
    font-size: 3rem;
    margin: 0 auto 3rem;
    color: #3f3b00
}

#game-container {
    max-width: 45rem;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 6px;
    background: linear-gradient(#383624, #282617);
    box-shadow: 0 0 20px #00000080;
    position: relative
}

#players {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem
}

#players li {
    display: flex;
    align-items: center;
    width: 50%;
    border: 2px solid transparent
}

#players.highlight-player li.active {
    border-color: #f6e35a;
    animation: pulse 2s infinite ease-in-out
}

#players.highlight-player li.active .player-name,
#players.highlight-player li.active .player-symbol {
    color: #f6e35a
}

#players button {
    width: 3rem;
    border: none;
    background: none;
    color: #c3ba78;
    font-size: .9rem;
    cursor: pointer;
    transition: color .2s;
    padding: .5rem .25rem .25rem;
    text-align: center
}

#players button:hover {
    color: #f8ca31
}

.player {
    border: 2px solid transparent;
    padding: .5rem;
    border-radius: 4px;
    font-weight: 700
}

.player-name {
    display: inline-block;
    width: 10rem;
    font-size: 1rem;
    color: #e1dec7;
    text-transform: uppercase;
    margin: 0;
    padding: .5rem;
    border-radius: 4px;
    text-overflow: ellipsis;
    text-align: center
}

.player input {
    font: inherit;
    font-size: 1rem;
    width: 10rem;
    border: none;
    padding: .5rem;
    animation: pulse-text 2s infinite;
    background-color: #46432f;
    text-align: center;
    text-transform: uppercase
}

.player-symbol {
    margin-left: 1rem;
    font-size: 1rem;
    color: #e1dec7
}

ol {
    list-style: none;
    margin: 0;
    padding: 0
}

#pre-game {
    text-align: center
}

#pre-game button {
    cursor: pointer;
    background: none;
    color: #f8c031;
    border: none;
    font-family: Caprasimo, cursive;
    font-size: 4rem;
    text-shadow: 0 0 12px rgba(0, 0, 0, .7);
    animation: pulse-text-size 2s infinite ease-out
}

#game-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    padding: 0;
    flex-direction: column
}

#game-board ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0
}

#game-board button {
    width: 8rem;
    height: 8rem;
    border: none;
    background: #aca788;
    color: #3f3b00;
    font-size: 5rem;
    cursor: pointer;
    font-family: Caprasimo, cursive;
    padding: 1rem
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #282617f2;
    animation: pop-in .5s cubic-bezier(.68, -.55, .65, .52) forwards
}

#game-over h2 {
    font-family: Caprasimo, cursive;
    font-size: 4rem;
    text-align: center;
    color: #fcd256;
    margin: 0
}

#game-over p {
    font-size: 2rem;
    text-align: center;
    color: #e1dec7
}

#game-over button {
    display: block;
    margin: 0 auto;
    font-size: 1.5rem;
    background: none;
    border: 2px solid #fcd256;
    color: #fcd256;
    padding: .5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s, color .2s;
    box-shadow: 0 0 8px #fb06
}

#game-over button:hover {
    background: #fcd256;
    color: #3f3b00;
    transform: scale(1.1);
    box-shadow: 0 0 20px #fb0c
}

#log {
    max-width: 20rem;
    color: #3f3b00;
    list-style: none;
    margin: 2rem auto;
    padding: 0;
    text-align: center
}

#log li {
    border-radius: 4px;
    animation: slide-in-from-left 1s cubic-bezier(.075, .82, .165, 1) forwards;
    margin: .75rem
}

#log li.highlighted {
    background-color: #3f3b00;
    color: #fff
}

#game-hints {
    text-align: center;
    color: #46432f
}

#game-hints h2 {
    font-family: Caprasimo, cursive;
    font-size: 2rem;
    margin: 0
}

#game-hints ul {
    list-style: none;
    padding: 0;
    margin: 0
}

#game-hints button {
    cursor: pointer;
    border: none;
    background: transparent;
    color: #23221f;
    font: inherit;
    margin-top: 1.5rem
}

@keyframes slide-in-from-left {
    0% {
        opacity: 0;
        transform: translate(-30%)
    }

    to {
        opacity: 1;
        transform: translate(0)
    }
}

@keyframes pulse-text {
    0% {
        color: #e1dec7
    }

    50% {
        color: #9f9d83
    }

    to {
        color: #e1dec7
    }
}

@keyframes pulse-text-size {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }

    to {
        transform: scale(1)
    }
}

@keyframes pulse {
    0% {
        border-color: #f6e35a;
        box-shadow: 0 0 #f6e35a66
    }

    50% {
        border-color: #f8c031;
        box-shadow: 0 0 0 .5rem #f8a53100
    }

    to {
        border-color: #f6e35a;
        box-shadow: 0 0 #f6e35a00
    }
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0
    }

    80% {
        transform: scale(1.1);
        opacity: 1
    }

    to {
        transform: scale(1)
    }
}

@media (max-width: 400px) {
    body {
        background-size: 100% 100%, 45% 15%, 50% 50%;
        min-height: 51.5rem
    }

    header {
        text-align: center
    }

    header img {
        width: 7rem;
        margin: 1rem auto;
        filter: drop-shadow(0 0 8px rgba(0, 0, 0, .7))
    }

    h1 {
        font-size: 2rem;
        margin: 0 auto -1rem
    }

    #game-container {
        max-width: 45rem;
        margin: 5rem auto;
        padding: 0rem;
        border-radius: 6px;
        box-shadow: 0 0 20px #00000080;
        position: relative
    }

    #players {
        padding: 0;
        margin: 0rem 0;
        gap: 0rem
    }

    #players li {
        width: 48%;
        margin-top: .8rem
    }

    #players.highlight-player li.active {
        border-color: #f6e35a;
        animation: pulse 2s infinite ease-in-out
    }

    #players.highlight-player li.active .player-name,
    #players.highlight-player li.active .player-symbol {
        color: #f6e35a
    }

    #players button {
        width: 3rem;
        border: none;
        background: none;
        color: #c3ba78;
        font-size: .6rem;
        cursor: pointer;
        transition: color .2s;
        padding: .5rem .25rem .25rem;
        text-align: center
    }

    .player {
        border: 2px solid transparent;
        padding: .3rem;
        border-radius: 4px;
        font-weight: 700
    }

    .player-name {
        width: 5rem;
        font-size: .7rem;
        color: #e1dec7;
        margin: 0;
        padding: .3rem;
        border-radius: 4px
    }

    .player input {
        font: inherit;
        font-size: .7rem;
        width: 5rem;
        border: none;
        padding: .5rem;
        animation: pulse-text 2s infinite;
        background-color: #46432f;
        text-align: center;
        text-transform: uppercase
    }

    .player-symbol {
        margin-left: .1rem;
        font-size: .7rem;
        color: #e1dec7
    }

    ol {
        list-style: none;
        margin: 0;
        padding: 0
    }

    #pre-game {
        text-align: center
    }

    #pre-game button {
        cursor: pointer;
        background: none;
        color: #f8c031;
        border: none;
        font-family: Caprasimo, cursive;
        font-size: 4rem;
        text-shadow: 0 0 12px rgba(0, 0, 0, .7);
        animation: pulse-text-size 2s infinite ease-out
    }

    #game-board {
        gap: .5rem;
        margin: 1rem 0;
        padding: .5rem
    }

    #game-board ol {
        gap: .5rem;
        margin: 0;
        padding: 0
    }

    #game-board button {
        width: 6.5rem;
        height: 6.5rem;
        font-size: 4.5rem;
        padding: 1rem;
        border-radius: 0.3rem;
    }

    #game-over h2 {
        font-size: 3rem
    }

    #game-over p {
        font-size: 1.5rem
    }
}

@media (max-width: 360px) {
    #game-board button {
        width: 4.7rem;
        height: 4.7rem;
        font-size: 3.5rem;
        padding: 0.5rem;
        border-radius: 0.3rem;
    }

    .player-symbol {
        margin-left: .1rem;
        font-size: .5rem;
        color: #e1dec7
    }

    .player-name {
        width: 5rem;
        font-size: .5rem;
        color: #e1dec7;
        margin: 0;
        padding: .3rem;
        border-radius: 4px
    }
}
/* 
@media (max-width: 430px) {
    #game-board button {
        width: 6.2rem;
        height: 6.2rem;
        font-size: 3.5rem;
        padding: 0.5rem;
        border-radius: 0.3rem;
    }

    .player-symbol {
        margin-left: .1rem;
        font-size: .5rem;
        color: #e1dec7
    }

    .player-name {
        width: 5rem;
        font-size: .5rem;
        color: #e1dec7;
        margin: 0;
        padding: .3rem;
        border-radius: 4px
    }

    #game-board {
        gap: 1rem;
        margin: 3rem 0;
        padding: 0;
    }

    #game-board ol {
        gap: 1rem;
        margin: 0;
        padding: 0;
    }
}  */
