/* Css for the animation */

#gameExplanation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#logo{
    width: 400px;
    height: 350px;
    margin-bottom: 20px;
}
#title, #subtitle, #startGame {
    text-align: center;
    margin: auto;
}
#title {
    font-size: 2.5em;
    font-weight: bold;
}
#subtitle {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 40px;
    text-align: justify;
    max-width: 600px;
}
#startGame {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 50%;
}
.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 1s forwards;
}

.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#gameExplanation .content > * {
    margin: 10px 0;
}

/* In game items */
#map{
    width: 100%;
    height: 100vh;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: white;
    margin: 0;
    padding: 0;
}

#menu {
    display: block;
    position:absolute;
    top: 50px;
    left:50%; 
    transform: translateX(-50%);
    max-width: 600px;
    width: 70%;
    height: 220px;
    background: rgba(255, 255, 255, 0.9);
    margin: 20px auto;
    padding: 10px;
    border: 2px solid #000000e2;
    border-radius: 8px;
    z-index: 1000;
}

#distanceReset {
    position:absolute;
    display: inline-block;
    text-align: center;
    top: 10px;
    right: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #cccccc;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    /*display: flex;
    gap: 10px;*/
}

#reset {
    padding: 5px 10px;
}


legend {
    font-size: 1.2em;
    font-weight: bold;
    padding: 0 10px;
    text-align: center;
}

#routeNumberDiv{
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.routeNumber {
    padding: 8px;
    font-size: 1em;
    margin-top: 5px;
    width: 150px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#difficultyDiv {
    margin-bottom: 10px;
    text-align: center;
}

#difficultyButtons {
    display: flex;
    gap: 4%;
    margin-top: 10px;
    justify-content: center;
}

.difButton{
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #000000;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    text-align: center;
}

.difButton:hover{
    background-color: #e0e0e0;
}

.difButton:active{
    background-color: #007bff;
    color: white;
}

input[type="number"]{
    width: 25%;
}

/* Progress Bar Container */
#progressBarContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    text-align: center;
    z-index: 1000;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000000e2;
    border-radius: 8px;
    padding: 20px;
    border-radius: 8px;
}

#finalBarContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    text-align: center;
    z-index: 1000;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000000e2;
    border-radius: 8px;
    padding: 20px;
    border-radius: 8px;
}

div.bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 20px;
    margin-bottom: 10px;
    border: 2px solid #000000e2;
    border-radius: 8px;
}

div.barFill {
    height: 100%;
    background-color: red;
    width: 0;
    border-radius: 8px 0 0 8px;
    transition: width 1s ease-in-out, background-color 0.1s ease-in-out;
}

/* Progress Text */
div.barText {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Always on the end for not showing before the Game explanation */

#menu,
#distanceReset {
    display: none;
}