@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&display=swap');

body  {
	background-color: #2c2c2c;
}

.header {
    position: fixed;
    top: 4%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-bottom: 25px;
    font-family: 'Comfortaa', cursive;
    font-size: 35px;
    cursor: pointer;
    color: white;
}

.centered {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.content-area {
    bottom: -200px;
}

.code-solution {
    margin-right: 20px;
    font-size: 18px;
}

.user-solution {
    font-size: 22px;
}

.code-solution, .user-solution {
    margin-top: 45px;
}

.CodeMirror {
    height: auto;
    resize: horizontal;
    border-radius: 10px;
    border: 4px solid rgba(238, 238, 238, 0.623);
    filter: drop-shadow(0 0 1rem rgba(0, 0, 0, 0.4));
}

.footer {
    left: 50%;
    bottom: -15px;
    position:absolute;
    transform: translate(-50%, -50%);
    text-align: center;
    color: whitesmoke;
    font-weight: light;
    font-family: 'Roboto Mono', monospace;
}

.github {
    text-decoration: none;
    font-weight: bolder;
    color: whitesmoke;
}

.social_media {
    left: 68%;
    bottom:0px;
    position:absolute;
    transform: translate(-50%, -50%);
    display: inline-block;
}

.social_media a {
   color:#fff;
   background: #853d3d;
   border-radius:4px;
   text-align:center;
   text-decoration:none;
   font-family:fontawesome;
   position: relative;
   display: inline-block;
   width:40px;
   height:28px;
   padding-top:12px;
   margin:0 2px;
   -o-transition:all .5s;
   -webkit-transition: all .5s;
   -moz-transition: all .5s;
   transition: all .5s;
       -webkit-font-smoothing: antialiased;
}
 
.social_media a:hover {
   background: #853d3d;
}
 
.social_media a span {
   color:#666;
   position:absolute;
   font-family:sans-serif;
   bottom:0;
   left:-25px;
   right:-25px;
   padding:5px 7px;
   z-index:-1;
   font-size:14px;
   border-radius:2px;
   background:#fff;
   visibility:hidden;
   opacity:0;
   -o-transition:all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   -webkit-transition: all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   -moz-transition: all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   transition: all .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
 
.social_media a span:before {
   content:'';
   width: 0; 
   height: 0; 
   border-left: 5px solid transparent;
   border-right: 5px solid transparent;
   border-top: 5px solid #fff;
   position:absolute;
   bottom:-5px;
   left:40px;
}
 
.social_media a:hover span {
   bottom:50px;
   visibility:visible;
   opacity:1;
}

.social_media a:nth-of-type(1):before {
    content:'\f09b';
}

.social_media a:nth-of-type(2):before {
    content:'\f0e1';
}
.social_media a:nth-of-type(3):before {
    content:'\f099';
}
  
#timer, #problem_label {
    text-align: center;
    color: white;
    font-size: 20px;
    position: fixed;
    top: 4%;
    transform: translate(-50%, -50%);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-left: 4px solid rgba(238, 238, 238, 0.623);
    border-right: 4px solid rgba(238, 238, 238, 0.623);
    border-top: 4px solid rgba(238, 238, 238, 0.623);
    filter: drop-shadow(0 0 1rem rgba(0, 0, 0, 0.4));
    font-family: 'Roboto Mono', monospace;
    padding-left: 10px;
    padding-right: 10px;
}

#timer {
    top: 2%;
    left: 95%;
    border: none;
}

#problem_label {
    left: 50%;
}

/* Popup handler */
.view-modal, .popup {
    position: absolute;
    left: 50%;
}
  
button {
    outline: none;
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: background 0.1s linear, border-color 0.1s linear, color 0.1s linear;
}

.view-modal {
    top: 50%;
    color: #7d2ae8;
    font-size: 18px;
    padding: 10px 25px;
    background: #fff;
    transform: translate(-50%, -50%);
    transition: background 0.5s linear, border-color 0.5s linear, color 0.5s linear;
}

.popup {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    top: -150%;
    max-width: 500px;
    height: 300px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0px 10px 15px rgba(47, 15, 15, 0.883);
    transform: translate(-50%, -50%) scale(1.2);
    transition: top 0s 0.5s ease-in-out,
                opacity 0.5s 0s ease-in-out,
                transform 0.5s 0s ease-in-out;
}

.popup.show {
    top: 50%;
    opacity: 1;
    pointer-events: auto;
    transform:translate(-50%, -50%) scale(1);
    transition: top 0s 0s ease-in-out,
                opacity 0.5s 0s ease-in-out,
                transform 0.5s 0s ease-in-out;
}

.popup :is(header, .field) {
    display: flex;
    justify-content: space-between;
}

.popup header {
    padding-bottom: 20px;
    border-bottom: 1px solid #ebedf9;
} 

.problem_dialog {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index:99;
}

#typing-stats {
    font-size: 30px;
    margin-left: 30%;
    font-family: 'Roboto Mono', monospace;
}

#wpm_str {
    font-size: 25px;
    margin-top: -5%;
    font-family: 'Roboto Mono', monospace;
}

#try_again, #next_question {
    color: white;
    height: 4em;
    width: 14em;
    padding: 1.5em auto;
    margin: 1em auto;
    background-color: #853d3d;
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    margin-top: 20%;
}

#try_again:hover, #next_question:hover {
    letter-spacing: 0.8em;
    background-color: #643232;
}

.typing-container {
    font-size: 18px;
    font-family: 'Roboto Mono', monospace;
    position: absolute;
    top: 20%;
    margin-top: 40%;
}

#mode {
    text-align: center;
}