@charset "utf=8";

:root {
    --app-main-font: 'Poppins', 'Open Sans', Arial, sans-serif;
    --app-monospace-font: monospace;
    --app-body-bg: #0b0b0b;
    --app-dark-gray: #303030;
    --app-light-gray: #3d4851;
    --app-white: #fff;
    --app-red-dark: rgba(255, 6, 6, 0.5);
    --app-red-light: rgba(250, 6, 6, 0.9);
    --app-output-font-size-big: 88px;
    --app-output-font-size-small: 64px;
    --app-input-font-size: 45px;
}


/* ------------------------*/
/*       General rules     */
/* ------------------------*/

* {
    margin: 0;
    padding: 0;
    outline: none;
    border-style: none;
    font-family:inherit;
    box-sizing: border-box;
}

html {
    min-width: 100%;
}

body {
    font-family: var(--app-main-font);
    font-weight: 400;
    text-rendering: geometricPrecision;
    background-color: var(--app-body-bg);
    overflow:hidden;
}

main {
    overflow: hidden;
}

.container {
    width: min(100% - 30px, 1080px);
    margin-inline: auto;
}

.flexbox {
    display:flex;
    justify-content: space-between;
}
 
h1 {
    font-size: 40px;
    font-weight: 600;
    color: var(--app-white);
    letter-spacing: 0.4px;
    line-height: 2;
}

p {
    font-size:16px;
    font-weight: 500;
    color: var(--app-white);
}

a {
    text-decoration: none;
    font-weight: 500;
    color: var(--app-dark-gray)
}

.center {
    text-align: center;
}

video {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}


/* ------------------------*/
/*           Intro         */
/* ------------------------*/

.container-intro {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.content-logo {
    position: absolute;
    text-align: center;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}

.logo {
    width: 630px;
    height: 630px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 25px;
    border-radius: 50%;

    h1 {
        text-transform: uppercase;
        font-style: italic;
        opacity: 0.9;
        font-size: 46px;
        line-height: 35px;
        background-clip: text;
        text-shadow: 4px 4px 2px rgba(0, 0, 0, 0.5);
        color: transparent;
        background-size: 200% 100%;
        -webkit-background-clip: text;
        background-clip: text;          
    }    

    img {
        position: relative;
        left: -100px;
        top: 5px;
        width: 800px;
        height: auto;
    }
}

.typing {
    margin-top: 25px;
    display: inline-block;
    overflow: hidden; 
    width: 0; 
    background: linear-gradient(45deg, #f5f4f3, #f1d1cc, #f9dede);  
    animation: typing 1.4s steps(33) 0.2s forwards, step-end infinite;
    margin-bottom: 0;
}

.racing {
    margin-top: 0;
    position: absolute;
    animation: move 0.6s linear forwards; 
    background: linear-gradient(45deg, var(--app-red-dark), var(--app-red-light), var(--app-red-light));  
}

@keyframes typing {
    from {
      width: 0%;
    }
    to {
      width: 100%;
    }
}

@keyframes stripe {
    from {
      background-position: 200% 0;
    }
    to {
      background-position: 0 0;
    }
}

@keyframes move {
    from {
        left: 11%;
    }
    to {
        left: 35%;
    }
}

.info-open, 
.score-open, 
.game-info-open,
.game-score-open {
    cursor: pointer;
    margin-top: 20px;
    color: var(--app-light-gray);
}

.info-open,
.game-info-open {
    font-size: 26px;
    margin-right: 15px;
}
  
.score-open, 
.game-score-open  {
    font-size: 22px;
    margin-left: 15px;
}

.info-open:hover, 
.score-open:hover, 
.game-info-open:hover, 
.game-score-open:hover {
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    transform: scale(1.2);
    color: var(--app-white);
}

.game-info-open {
    margin-right: 10px;
    color: var(--app-white);
}

.game-score-open {
    margin-left: 10px;
    color: var(--app-white);
}

.i-disabled {
    pointer-events: none;
    opacity: 0.5;
}
  
.start {
    width: 80px;
    height: 80px;
    border-radius: 50%; 
    font-size: 24px;
    font-weight: 500;
    background-color: var(--app-red-dark); 
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.start:hover {
    background-color:  var(--app-red-light);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3); 
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    transform: scale(1.05);

}

.start:active {
    transform: scale(0.95); 
    box-shadow: none; 
}


/* ------------------------*/
/*           Game          */
/* ------------------------*/

.container-game {
    display: none;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.cockpit {
    background-image: url('../img/cockpit.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;    
    mix-blend-mode:multiply;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.game-controls {
    visibility: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.panel {
    width: 780px;
    border-radius: 5px;
    padding: 15px;
}

.output-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
}

.output {
    font-weight: 800;
    font-size: var(--app-output-font-size-big);
    margin: 0;
    letter-spacing: 5px;
    white-space: nowrap;
    overflow: hidden;    
    display: inline-block; 
}

input[type="text"] {
    background-color: rgba(7, 7, 7, 0.7);
    color: #94acb5;
    border: 1px solid rgba(24, 23, 23, 0.6);
    text-align: center;
    width: 85%;
    height: 140px;
    padding: 10px;
    font-size: var(--app-input-font-size);
    font-weight: 800;
    border-radius: 5px;
    margin-bottom: 40px;
    margin-top: 20px;
    outline: none;
}

input[type="text"]::placeholder {
    color: #61dafb;
}

.counter, .hits {
    font-family: var(--app-monospace-font);
}

.counter {
    font-size: 46px;
}

.hits {
    color: greenyellow;
    font-size: 32px !important;
    position: relative;
    top: -30px; 
}

.hits-container {
    height: 30px;
    width: 100%;

    p {
        font-size: 18px;
    }
}

.restart {
    width: 120px;
    height: 120px;
    border-radius: 50%; 
    font-size: 25px;
    background-color: rgb(225, 6, 6, 0.5);
    color: var(--app-white);
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 24px;
}

.restart:hover {
    background-color:  var(--app-red-light);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3); 
}

.restart:active {
    transform: scale(0.95); 
    box-shadow: none; 
}


/* ------------------------*/
/*          Modal          */
/* ------------------------*/

 .modal-info-container, .modal-score-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    video {
        width: 82%; 
        height: 82%; 
        object-fit: cover;
    }    
}

.info-video-container {
    margin-top: 50px;
}

.modal-info-container.active, .modal-score-container.active {
    opacity: 1;
    visibility: visible;
}

.modal-info, .modal-score {
    background-color: rgba(0, 0, 0, 0.99);
    width: 630px;
    height: 630px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0); 
    transition: transform 0.4s ease-in-out;
}

.modal-info.active, .modal-score.active {
    transform: scale(1); 
}

.modal-info-content, .modal-score-content {
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease 0.4s;

    video {
        margin-top: 5px;
    }
}

.modal-info.active .modal-info-content {
    opacity: 1;
}

.modal-score.active .modal-score-content {
    opacity: 1;
}

.info-title, .score-title {
    p {
        font-size: 36px;
        margin-bottom: 40px;
    }
}

.info-close, .score-close {
    margin-top: 90px;

    i {
        font-size: 34px;
        color: var(--app-light-gray);
    }
}

.info-close, .score-close {
    i:hover {
        transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
        transform: scale(1.2);
        color: var(--app-white);
        cursor: pointer;
    }
}

.score-table {
    width: 320px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;    
    
    table {
        margin-top: 30px;
        text-align: left;

        tr {     
            th, td {
                padding: 5px;

            }

            th {
                color: var(--app-red-light);
                font-size: 14px;
                width: 10px;
            }
            
            td {
                color: var(--app-white);
                font-size: 14px;
                border-bottom-width: 1px;
                border-bottom-color: var(--app-dark-gray);
                width: 45px;             
            }
            
            td:nth-last-child(2) {
                width: 110px;
            }

            td:last-child {
                width: 280px; 
            }     
        }
    }
}

/* ------------------------*/
/*       Effect Letters    */
/* ------------------------*/

.letter {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }