@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&family=Press+Start+2P&display=swap");
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');

body { 
    padding: 0; 
    margin: 0; 
    width:100%;
    height:100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color:#cccccc;
    font-family: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

canvas { 
    display: block; 
}

#header{
    background-color: beige;
}

h3{
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

.container{
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin:auto;
    background-color:#cccccc;
}

.intro{
    background-image: url(../img/Delorean_Intro.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh; 
}

#containerIndex{
    justify-content: space-around;
}

.titulo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;   
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 5px;
    font-size: 4em;
    margin:2% auto;
}

.subtitulo {
    text-align: center;
    color: #0f0f0f;
    font-size: 1.5em;
}

.main {
    display: flex;
    justify-content:flex-end;
    flex-grow: 1;
}

.mainhome, .mainoptions{
    width:90%;
    height:50%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin:auto;
}

.mainstats{
    margin: 0 auto;
    width:80%;
    padding: 0;
}

.menudcho {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
    gap: 15px;
    margin:0 auto 5%;
    text-align: center;
}

.topform{
    align-items: center;
    margin: 0 auto;
    flex:1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#myForm{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;   
    padding: 10px 0;
}

.nombrepiloto{
    color: #0f0f0f;
    text-align: center;
    margin: 10px 0;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.2em;
}

#myForm input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}   

.boton {
    font-family: 'Orbitron', sans-serif;
    padding: 10px 20px;
    font-size: 1.2em;
    font-weight: 500;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 1% auto;
    width: 70%;
}

.botonranking {
    padding: 10px 15px;
    margin-top:0;
    width:100%;
}

.botonvolver {
    padding: 10px 15px;
    margin-top:0;
    width:60%;
}


.boton:hover {
    background-color: #275c29;
}

.tablaizda {
    flex:1;
    padding: 10px 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tablacontainer{
    width:70%;
    margin: 0 auto 10px;
    padding:20px;
    background-color: #eeeeeebb;
    border-radius: 10px;
}
.tablacredits{
    width:90%;
}

.tablaranking{
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tablatiempos{
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

table {
    border-collapse: collapse;
    padding: 10px;
    margin:10px auto;
    width: 100%;
}

tbody{
    padding-bottom:50px;
}

th, td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #4CAF50;
    color: white;
}


/***** HUD ******/
#hud{ 
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    display:flex;
    width:100%;
    margin:auto;
    position: absolute;
    top: 10px;
    left:50%;
    transform: translate(-50%, 0);
}

#dist, #speed {
    flex:1;
    width: 20%;
    text-align: center;
    z-index: 100;
    display:inline-block;
    align-items: center;
    width: 20%;
    z-index: 100;
    margin:auto;
    padding: 0 10%;
    text-align: center;
  }

#warmup{
    display:block;
    width:100%;
    height:50px;
    margin:auto;
    position: absolute;
    top: 25px;
    left:50%;
    transform: translate(-50%, 0);
    text-align: center;
}

#countdown{
    flex:1;
    text-align: center;
    z-index: 100;
    display:inline-block;
    font-size: 50px;
    font-weight: bolder;
    font-style: oblique;
    color:green;
    transition: all 0.5s ease;
    padding: 20px;
    border-radius: 10px;
    width:20%;
}
  

#controls{
    display:flex;
    width:100%;
    margin:auto;
    position: absolute;
    bottom: 2%;
    left:50%;
    transform: translate(-50%, 0);
    justify-content: space-evenly;
    height: 30%;
    gap: 30%;
}

#accel, #steering{
    flex:1;
    display:flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 20%;
    z-index: 100;
    margin:auto;
    padding: 0 10%;
    text-align: center;
}

#gas, #brake, #left, #right{
    height: 70%;
    padding: 30px;
    margin:20px;
    background-color: #33333355;
    border-radius: 5px;
    /*
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select:none;
    user-select:none;
    */
}

