body {
    font-family: system-ui, serif;
    background-color: #FFFFFF;
    color: var(--text-main);
}
* {
    font-weight: 600;
    font-family: system-ui, serif;
}

:root {
    --main: #ff4757;
    --sec: #ff808b;
    --text-main: #57606f;
    --grey: #a4b0be;
    --light-grey: #dfe4ea;
    --rad: 8px;
}
:focus {
    outline: none;
}
p {
    font-size: 16px;
}

a {
    color: var(--main);
    text-decoration: none;
}

h3 {
    font-weight: 700;
}

input, textarea {
    padding: 15px 20px;
    border: none;
    background-color: white;
    border-radius: var(--rad);
    font-size: 16px;
    color: var(--text-main);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    white-space: pre-line;
    
}

textarea {
    width: 100%;
    resize: none;
    font-family: system-ui, serif;
}



button {
    padding: 15px 20px;
    border: none;
    background-color: var(--main);
    border-radius: var(--rad);
    font-size: 16px;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: 0.5s;
    transition-property: background-color, color;
    white-space: nowrap;
    text-align: center;
}

button:hover {
    background-color: var(--sec);
}

.meddle {
    left: 20px;
    top: 0;
    position: absolute;
    z-index: 3;
    color: var(--main);
}

.pointsUi {
    right: 20px;
    float: right;
    text-align: right;
    top: 0;
    position: absolute;
    z-index: 3;
    color: var(--main);
}

.main {
    display: none;
    z-index: 3;
}

.parent {
    display: none;
    place-items: center;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    position: absolute;
    z-index: 1;
}

.child {
    display: grid;
    width: 20%;
    text-align: center;
    background-color: var(--light-grey);
    border-radius: var(--rad);
    overflow: hidden;
    padding: 20px;
    margin: 20px;
    min-width: 325px;
    box-sizing: border-box;
    /*box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.15);*/
}


.double-btn-parent {
    display: flex;
    justify-content: space-between;
    width: 100%;
}
.double-btn1 {
    width: 50%;
    padding-right: 10px;
}

.double-btn2 {
    width: 50%;
    padding-left: 10px;
}

.textareaHolderHolder {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
}

.textareaHolder {
    padding: 20px;
    width: 50%;
    margin: 0;
    position: absolute;
    left: 50%;
    -ms-transform: translate(-50%, 0%);
    transform: translate(-50%, 0%);
    background-color: var(--base);
    bottom: 0;
    background-color: var(--light-grey);
    border-top-left-radius: var(--rad);
    border-top-right-radius: var(--rad);
}

.playerUi {
    display: none;
    position: absolute;
    left: 0;
    top: 20px;
    width: 10%;
    padding: 20px;
    border-radius: var(--rad);
    z-index: 7;
    max-height: 50%;
}

.hostUi {
    display: none;
}

.voteUi {
    padding: 20px 20px;
    position: absolute;
    bottom: 0;
    width: 50%;
    height: 20%;
    border: none;
    margin: auto;
    border-radius: 0px;
    border-top-left-radius: var(--rad);
    border-top-right-radius: var(--rad);
    z-index: 3;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 60px;
    width: auto;
    border-radius: 0px;
    border-bottom-right-radius: var(--rad);
    border-top-right-radius: var(--rad);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    margin-top: 12px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--grey);
    -webkit-transition: 0.2s;
    transition: 0.2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 5px;
    bottom: 5px;
    background-color: white;
    -webkit-transition: 0.2s;
    transition: 0.2s;
}

.hagertech {
    position: absolute;
    left: 0px;
    bottom: 0px;
    padding: 20px;
    z-index: 3;
}

input:checked + .slider {
    background-color: var(--main);
}

input:checked:hover + .slider {
    background-color: var(--sec);
}

input:not(:checked):hover + .slider {
    background-color: #bec8d4;
}

input:checked + .slider:before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.progress-bar {
    display: none;
    background: var(--grey);
    height: 20px;
    width: 100%;
    position: absolute;
    left: 0px;
    bottom: 0px;
    box-sizing: border-box;
}

.points {
    position: relative;
    -webkit-animation-name: animatepoints;
    -webkit-animation-duration: 5s;
    animation-name: animatepoints;
    animation-duration: 5s;
    animation-fill-mode: forwards;
    
}

.chat {
    bottom: 10px;
    color: var(--text-main);
    right: 10px;
    text-align: right;
    position: absolute;
    font-weight: bold;
    z-index: 4;
}

/* IDs  */

#codeBtn {
    margin-top: 20px;
}

#codeInput {
    text-transform: uppercase;
}

#startJoin {
    margin-top: 20px;
}

#storyModalChild {
    max-height: 50%;
    height: 50%;
    width: 50%;
    max-width: 50%;
    overflow-y: visible;
    border-radius: var(--rad);
}

#tutorialModalChild {
    max-height: 50%;
    height: 50%;
    width: 50%;
    max-width: 50%;
    overflow-y: visible;
    border-radius: var(--rad);
}

#tututTextModal {
    pointer-events: none;
}

#tutorialModalChild {
    pointer-events: none;
}

#tutTextParent {
    margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  pointer-events: none;
}

.tutText {
    -webkit-animation: tut 10s linear infinite;
  animation: tut 10s linear infinite;
}

#storyDisplay {
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    box-sizing: border-box;
}

#storyModal {
    display: grid;
}

#storyInput {
    position: absolute;
    bottom: 0;
    width: 50%;
    height: 15%;
    border: 15px solid var(--light-grey);
    background-color: var(--light-grey);
    margin: auto;
    border-radius: 0px;
    border-top-left-radius: var(--rad);
    border-top-right-radius: var(--rad);
    transition: 0.5s;
    transition-property: opacity, border, background-color;
    cursor: pointer;
}

#storyInput:focus {
    border: 3px solid var(--light-grey);
    background-color: transparent;
    cursor: text;
}

#alertModal {
    background-color: rgba(0, 0, 0, 0.219);
    z-index: 9;
}

/* Animation */

.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 1s
}

@-webkit-keyframes animatebottom {
    from { bottom:-100px; opacity:0 } 
    to { bottom:0px; opacity:1 }
}

@keyframes animatebottom { 
    from{ bottom:-100px; opacity:0 } 
    to{ bottom:0; opacity:1 }
}

.animate-width {
    -webkit-animation-name: animatewidth;
    -webkit-animation-duration: 5s;
    animation-name: animatewidth;
    animation-duration: 5s;
    animation-fill-mode: forwards;
    animation-timing-function: linear;
}

@-webkit-keyframes animatewidth {
    from { width: 100%;} 
    to { width: 0%;}
}

@keyframes animatewidth {
    from { width: 100%;}
    to { width: 0%;}
}


.animate-fade {
  -webkit-animation-name: animatefade;
  -webkit-animation-duration: 0.5s;
  animation-name: animatefade;
  animation-duration: 0.5s;
}

@-webkit-keyframes animatefade {
  from { filter: blur(5px); opacity:0 } 
  to { filter: blur(0px); opacity:1 }
}

@keyframes animatefade { 
    from { filter: blur(5px); opacity:0 } 
    to { filter: blur(0px); opacity:1 }
}



  
@-webkit-keyframes animatepoints {
    0% {
        bottom: 0px;
        opacity: 0;
    }
    20% {
        bottom: 50px;
        opacity: 1;
    }
    80% {
        bottom: 50px;
        opacity: 1;
    }
    100% {
        bottom: 100px;
        opacity: 0;
    }
}

@keyframes animatepoints {
    0% {
        bottom: 0px;
        opacity: 0;
    }
    20% {
        bottom: 50px;
        opacity: 1;
    }
    80% {
        bottom: 50px;
        opacity: 1;
    }
    100% {
        bottom: 100px;
        opacity: 0;
    }
}




@-webkit-keyframes tut {
    0% {margin-top: 150px; opacity: 0;}
    1% {margin-top: -150px; opacity: 0;}
    6% {margin-top: 0; opacity: 1;}
    50% {margin-top: 0; opacity: 1;}
    95% {margin-top: 0; opacity: 1;}
    100% {margin-top: 150px; opacity: 0;}
}
  
@keyframes tut {
    0% {margin-top: 150px; opacity: 0;}
    1% {margin-top: -150px; opacity: 0;}
    6% {margin-top: 0; opacity: 1;}
    50% {margin-top: 0; opacity: 1;}
    95% {margin-top: 0; opacity: 1;}
    100% {margin-top: 150px; opacity: 0;}
}


@media only screen and (max-width: 900px) {
    #storyInput {
        width: 100%;
    }
    #playerCountDisplay {
        opacity: 0;
        z-index: -4;
    }
    #serverInfo {
        opacity: 0;
        z-index: -4;
    }
}