@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&display=swap');

/* TODO: button colors */

:root {
    /* --background-color: #EEE;
    --outline-color: #31363F;
    --fill-color: #CCC;
    --contrast-color: #76ABAE; */

    --background-color: #1F1F1F;
    --outline-color: #EEEEEE;
    --outline-shadow: #EEEEEE88;
    --outline-bright: #FFFFFF;
    --fill-color: #31363F;
    --contrast-color: #76ABAE;
    --contrast-shadow: #76ABAE88;
    --contrast-bright: #86BBBE;
    --incorrect-color: #DD4646;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "El Messiri", serif;
    font-optical-sizing: auto;
    font-style: normal;
}

body {
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 1rem;
    background-color: var(--background-color);
    color: var(--outline-color);
}

#container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 768px;
    align-items: center;
    transition: opacity 500ms;
}

/* TITLE */

h1 {
    text-align: center;
    border-bottom: 2px solid var(--outline-color);
    width: 100%;
    font-size: 4rem;
}

/* CATEGORIES */

.categories {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.new-song-info-text {
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.category {
    padding: 0.5rem 1rem;
    border-style: solid;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    color: var(--outline-color);
    border-color: var(--outline-color);
    font-size: 1rem;
    background-color: var(--fill-color);
    transition: color 250ms, background-color 250ms;
    font-weight: bold;
}

.category:hover:enabled, .active {
    background-color: var(--outline-color);
    color: var(--fill-color);
    transition: color 250ms, background-color 250ms;
    cursor: pointer;
}

.active:disabled {
    cursor: unset;
}

/* GUESSES */

.guesses {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.guesses > div {
    width: 100%;
    height: 3rem;
    background-color: var(--fill-color);
    border: 2px solid var(--outline-color);
    border-radius: 0.25rem;
    padding: 0.125rem;
}

.guess-filling {
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
    transition: opacity 250ms;
}

.skip-filling {
    background-color: var(--outline-color);
    opacity: 1;
    color: var(--background-color);
}

.incorrect-filling {
    background-color: var(--incorrect-color);
    opacity: 1;
    color: var(--background-color);
}

.correct-filling {
    background-color: var(--contrast-color);
    opacity: 1;
    color: var(--background-color);
}

/* TIMELINE */

.timeline-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#stage-number {
    color: var(--contrast-color);
    font-size: 2rem;
}

.timeline-info > p:first-of-type {
    font-size: 1.25rem;
}

#stage-duration {
    margin-bottom: 1rem;
}

.timeline {
    width: 100%;
    height: 2rem;
    border: 2px solid var(--outline-color);
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: 1px;
    padding: 0.125rem;
}

.time-bar-1 {
    flex: 1;
    background-color: var(--fill-color);
    display: flex;
    flex-direction: row-reverse;
}

.time-bar-2 {
    flex: 1;
    background-color: var(--fill-color);
    display: flex;
    flex-direction: row-reverse;
}

.time-bar-3 {
    flex: 6;
    background-color: var(--fill-color);
    display: flex;
    flex-direction: row-reverse;
}

.time-bar-4 {
    flex: 16;
    background-color: var(--fill-color);
    display: flex;
    flex-direction: row-reverse;
}

.time-bar-5 {
    flex: 36;
    background-color: var(--fill-color);
    display: flex;
    flex-direction: row-reverse;
}

.time-bar-filling {
    background-color: var(--outline-color);
    height: 100%;
}

.timestamps {
    display: flex;
    width: 100%;
    flex-direction: row-reverse;
    justify-content: space-between;
    padding: 0 0.25rem;
}

/* CONTROLS */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75%;
}

#playback-button {
    background-color: var(--contrast-color);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3.5rem;
    width: 3.5rem;
    box-shadow: 0 0.25rem var(--contrast-shadow);
    margin-bottom: 1.5rem;
    transition: box-shadow 250ms, background-color 250ms;
}

#playback-button:hover:enabled {
    background-color: var(--contrast-bright);
    cursor: pointer;
    transition: background-color 250ms;
}

#playback-button:active:enabled {
    transform: translateY(0.25rem);
    box-shadow: none;
}

#playback-button img {
    width: 1.5rem;
}

.results-position-reference {
    position: relative;
    width: 100%;
    height: 0;
}

#results-container {
    background-color: var(--background-color);
    position: absolute;
    bottom: 0;
    width: 100%;
}

#results-container ul {
    border: 2px solid var(--outline-color);
    border-radius: 0.25rem;
    border-bottom: none;
    list-style: none;
    padding: 0.5rem;
}

#results-container ul li {
    list-style: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    border-radius: 0.25rem;
}

#results-container ul li:hover {
    background-color: var(--fill-color);
    cursor: pointer;
}

.search-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
    border: 2px solid var(--outline-color);
    border-radius: 0.25rem;
    overflow: hidden;
}

.search-bar img {
    filter: invert(0.9);
    width: 3rem;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.search-bar input {
    flex: 1;
    background-color: var(--background-color);
    border: none;
    font-size: 1.5rem;
    color: var(--outline-color);
    outline: none;
    text-overflow: clip;
}

.actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.actions button {
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    border-radius: 0.5rem;
    border: none;
}

.actions #skip-button {
    background-color: var(--outline-color);
    box-shadow: 0 0.25rem var(--outline-shadow);
    transition: box-shadow 250ms, background-color 250ms;
    color: var(--background-color);
}

.actions #skip-button:hover:enabled {
    background-color: var(--outline-bright);
    cursor: pointer;
    transition: background-color 250ms;
}

.actions #skip-button:active:enabled {
    transform: translateY(0.25rem);
    box-shadow: none;
}

.actions #submit-button {
    background-color: var(--contrast-color);
    box-shadow: 0 0.25rem var(--contrast-shadow);
    transition: box-shadow 250ms, background-color 250ms;
}

.actions #submit-button:enabled {
    color: var(--background-color);
}

.actions #submit-button:hover:enabled {
    background-color: var(--contrast-bright);
    cursor: pointer;
    transition: background-color 250ms;
}

.actions #submit-button:active:enabled {
    transform: translateY(0.25rem);
    box-shadow: none;
}

/* GAME OVER */

#game-over {
    z-index: 1;
    position: absolute;
    background-color: var(--background-color);
    border: 2px solid var(--outline-color);
    border-radius: 0.25rem;
    width: 20rem;
    height: 26rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 4rem black;
    text-align: center;
    opacity: 1;
    transition: opacity 500ms;
}

#game-status {
    height: 4rem;
    border-bottom: 2px solid var(--outline-color);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--background-color);
}

.won {
    background-color: var(--contrast-color);
}

.lost {
    background-color: var(--incorrect-color);
}

.game-info {
    height: 22rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.game-over-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.game-over-buttons button {
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
    border: none;
    color: var(--background-color);
}

.game-over-buttons #share-button {
    background-color: var(--contrast-color);
    box-shadow: 0 0.25rem var(--contrast-shadow);
    transition: box-shadow 250ms, background-color 250ms;
}

.game-over-buttons #share-button:hover {
    background-color: var(--contrast-bright);
    cursor: pointer;
    transition: background-color 250ms;
}

.game-over-buttons #share-button:active {
    transform: translateY(0.25rem);
    box-shadow: none;
}

.game-over-buttons .next-category-button {
    background-color: var(--outline-color);
    box-shadow: 0 0.25rem var(--outline-shadow);
    transition: box-shadow 250ms, background-color 250ms;
}

.game-over-buttons .next-category-button:hover {
    background-color: var(--outline-bright);
    cursor: pointer;
    transition: background-color 250ms;
}

.game-over-buttons .next-category-button:active {
    transform: translateY(0.25rem);
    box-shadow: none;
}

#copied-to-clipboard {
    visibility: hidden;
    opacity: 0;
    margin-bottom: 1rem;
    background-color: var(--contrast-color);
    display: inline-block;
    padding: 0.25rem 0.5rem;
    color: var(--background-color);
    font-weight: bold;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    box-shadow: 0 0.125rem var(--contrast-shadow);
    transition: opacity 250ms;
}

.social-media {
    color: var(--outline-color);
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.social-media-group {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0.4rem;
}

.social-media-group p {
    margin-top: 0.25rem;
}

/* MEDIA QUERIES */

@media (max-width: 319px) {
    html {
        font-size: 13px;
    }
}

@media (min-width: 320px) and (max-width: 479px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* FONTS */

.el-messiri {
    font-family: "El Messiri", serif;
    font-optical-sizing: auto;
    font-style: normal;
}