body {
    background: #d577c7;
    font-size: 20px;
    text-align: center;
    font-family: sans-serif;

    display: flex;
    align-items: center;
    justify-content: center;
    
    background: #d577c7;
}

* {
    user-select: none;
}

svg {
    overflow: visible;
}

#main {
    position: relative;
    width: 500px;
    height: 525px;
}

#main.loading {
    display: none;
}

#room-bg {
    position: absolute;
    left: -20px;
    right: -10px;
    top: 75px;
    bottom: 0;
    opacity: 0.5;
    display: flex;
    height: 200px;
    justify-content: space-between;
}

#main[data-state="5"] #title {
    display: flex;
}

#main[data-state="5"] #game {
    visibility: hidden;
}

#main[data-state="6"] #end {
    display: block;
}

#main[data-state="6"] #game {
    visibility: hidden;
}

.overlay {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;

    color: #ffdd5f;
    flex-direction: column;
    justify-content: space-between;
}

.title-container {
    position: relative;
    padding: 5px;
    z-index: -5;
}

.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.overlay h1 {
    position: relative;
    margin: 10px 50px;
    font-family: 'Passion One', sans-serif;
    text-transform: uppercase;
    font-size: 60px;
    font-weight: normal;
    line-height: 1em;
}

.overlay p {
    margin: 20px 10px;
    position: relative;
}

.overlay button {
    position: relative;
    text-transform: uppercase;
    border: none;
    font-size: 30px;
    padding: 0.25em 1em;
    margin-bottom: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Passion One', sans-serif;
    color: #ab348f;
}

.overlay-characters {
    display: flex;
    position: absolute;
    left: 0px;
    right: 0px;
    height: 200px;
    top: -195px;
    padding: 0 20px;
    justify-content: space-around;
}

#end .overlay-characters {
    
    height: 225px;
    top: -220px;
}

.overlay-characters > div {
    margin: 0 -50px;
    z-index: -3;
}

.overlay-characters > div:nth-child(3n)
{
    z-index: -1;
}

.bg1 {
    color: #ffdd5f;
}

.bg2 {
    color: #ab348f;
}

#results {
    margin: 30px 40px 30px;
}

#result-hearts {
    margin-top: -10px;
}


.header {
}

#date-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    /* background: #ab348f; */
    padding: 10px 5px 5px;
    border-radius: 1.5em;
}

#date-list div {
    background-color: #e28cd5;
    border-radius: 100%;
    width: 1.7em;
    height: 1.5em;
    margin: -0.1em;
    padding: 0.1em;
}

#date-list div.complete {
    background-color: white;
}

.card {
    position: relative;
    background: white;
    border-radius: 1em;
    padding: 0.5em 1em;
    margin: 0.3em;
    display: flex;
    flex-direction: row;
}

.their-section {
    position: relative;
    /* background: #a23e94; */
    height: 290px;
}

#conversation {
    position: absolute;
    top: 10px;
    bottom: 20px;
    left: 90px;
    width: 190px;
    padding: 0 10px;
    overflow: hidden;
}

#conversation .theirs::after {
    position: absolute;
    right: -0.8em;
    top: 0.6em;
    content: "";
    width: 0; 
    height: 0; 
    border-top: .5em solid transparent;
    border-bottom: .5em solid transparent; 
    border-left: 1em solid white; 
}
#conversation .mine::after {
    position: absolute;
    left: -0.4em;
    bottom: -0.5em;
    content: "";
    width: 0; 
    height: 0; 
    border-top: .5em solid transparent;
    border-bottom: .5em solid transparent; 
    border-right: 1em solid white; 
    transform: rotate(-45deg);
}
#my-cards .card::after {
    position: absolute;
    left: -0.4em;
    bottom: -0.5em;
    content: "";
    width: 0; 
    height: 0; 
    border-top: .5em solid transparent;
    border-bottom: .5em solid transparent; 
    border-right: 1em solid white; 
    transform: rotate(-45deg);
}


.bubble {
    position: absolute;
    bottom: 0;
}
.bubble.mine {
    left: 1em;
}
.bubble.theirs {
    right: 1em;
}
#conversation .large.bubble {
    font-size: 1.3em;
}

.card .no-match {
    opacity: 0.3;
}

.character {
    position: absolute;
    bottom: -10px;
    right: 60px;
    height: 260px;
    width: 100px;
}

.npc {
    position: absolute;
    height: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    transition-timing-function: ease-in;
}

#expression {
    position: absolute;
    top: -20px;
    left: -8px;
    right: 0;
    font-size: 100px;
}

.my-section {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: row;
}

svg.bg {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 100%;
}

#my-cards {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#my-cards .card {
    margin: 0.6em 0.5em;
    transition: transform 50s;
}

#main[data-state="2"] .my-section .card {
    cursor: pointer;
}
#main[data-state="2"] .my-section .card:hover {
    scale: 1.1;
}

#score {
    position: absolute;
    top: 103px;
    left: 25px;
    bottom: 30px;
    width: 45px;
}

#score .bg {
    color: white;
}

#score-inner {
    background: #ef3313;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5%;
    transition: height 200ms;
}

#timer {
    background-color: white;
    border: 4px solid white;
    position: absolute;
    top: 15px;
    left: 20px;
    border-radius: 100%;
    width: 50px;
    height: 50px;
}

#timer_path {
    fill: #ab348f;
}
#main:not([data-state="4"]) #timer_path.danger {
    fill: #ef3313;
}

[data="❌️"] {
    filter: grayscale();
}