:root {
    --clr-accent-1: #fd297b;
    --clr-accent-2: #ff5864;
    --clr-accent-3: #ff655b;
}

*, *::after, *::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Montserrat";
    color: #eee;
}

html {
    /* display: flex;
    justify-content: center; */
}

body {
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* height: 100vh; */
    height: calc(var(--vh, 1vh) * 100);
    max-width: 600px;
    margin: 0 auto;
}

a {
    text-decoration: none;
}

.error {
    font-size: 12px;
    transform: translateY(-15px);
}

.error::before {
    content: "!";
    margin: 10px;
    color: var(--clr-accent-1);
    background-color: white;
    padding: 2px 8px;
    border-radius: 50%;
    font-weight: bold;
}

/* main */

main {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    width: 100%;
    overflow-y: hidden;
}

main .scrollable {
    overflow-y: auto; /* scroll ? */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

main .scrollable::-webkit-scrollbar {
  display: none;
}

main section {
    background-color: #191919;
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

main section small {
    text-align: left;
}

main section > div {
    display: flex;
    flex-direction: column;
}

main section > div > * {
    border-top: 1px solid #282828;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

main section > div > *:last-child {
    padding-bottom: 0;
}

main section > div > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

main section > div > div > *:last-child {
    font-weight: bold;
}

main h4 {
    text-align: left;
}

main p {
    text-align: left;
}

/* header & footer */

header,
footer {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-evenly;
    gap: 40px;
    padding: 20px;
}

.logo {
    flex: 1;
}

.logo img {
    height: 24px;
}

img.svg {
    width: 24px;
}

.notification {
    position: relative;
}

.notification .badge {
    position: absolute;
    top: 0;
    right: -6px;
    background-color: var(--clr-accent-3);
    border-radius: 50%;
    width: 10px;
    height: 10px;
}

.pulse {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* index + login */

#index main {
    justify-content: center;
}

#login,
#index {
    background-image: linear-gradient(to top right, var(--clr-accent-1), var(--clr-accent-2), var(--clr-accent-3));
}

#login main {
    justify-content: space-evenly;
}

#login h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

#login img {
    width: 40px;
}

#login form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

#login input {
    border: none;
    outline: none;
    padding: 10px 40px;
    background: transparent;
    border-bottom: 1px solid ;
    text-align: center;
}

#login input::placeholder {
    color: #eee;
}

#login input[type=submit] {
    background-color: #fff;
    color: #000;
    border-radius: 100vmax;
    font-weight: bold;
    padding: 10px 40px;
    border: none;
    margin-top: 40px;
    cursor: pointer;
}

/* profile */

.answer {
    cursor: pointer;
}

#question_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#question_overlay img {
    width: 100%;
    max-width: 600px;
    cursor: pointer;
}

/* settings */

#settings .credits a {
    font-weight: bold;
    color: var(--clr-accent-2);
} 

/* notification */

/* play */

#play main {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
} 

#play .card {
    /* background-color: rgb(23, 23, 23); */
    border-radius: 18px;
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
}

#play .card img {
    width: 100%;
}

#play .yes,
#play .no {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

#play .yes.show,
#play .no.show {
    transform: translate(-50%, -50%) scale(1);
}

#play .yes img,
#play .no img {
    width: 80px;
}

#play .card img,
#play .yes img,
#play .no img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* leaderboard */

#leaderboard main {
    position: relative;
}

#leaderboard .scrollable {
    gap: 5px;
} 

#leaderboard .player {
    background-color: #191919;
    width: 100%;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#leaderboard .player.self {
    background-color: #373737;
}

#leaderboard .player:nth-child(1) .rank {
    background-color: #d4af37;
}

#leaderboard .player:nth-child(2) .rank {
    background-color: #c0c0c0;
}

#leaderboard .player:nth-child(3) .rank {
    background-color: #cd7f32;
}

#leaderboard .player .rank {
    width: 50px;
    height: 100%;
    display: flex;
    border-radius: 4px 0 0 4px;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    background-color: #2b2b2b;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

#leaderboard .player .name {
    margin: 10px;
    flex: 1;
    text-align: left;
}

#leaderboard .player .elo {
    color: var(--clr-accent-3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 10px;
    font-weight: bold;
    width: 20px;
}

#leaderboard .star {
    position: absolute;
    right: 28px;
    top: 40px;
}