<!DOCTYPE html>
<html lang="hi">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,user-scalable=no">

<title>Indian Train Simulator</title>

<style>
*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}

body{
    margin:0;
    overflow:hidden;
    background:#111;
    font-family:Arial,sans-serif;
    color:white;
    touch-action:none;
}

canvas{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
}

/* TOP HUD */

#hud{
    position:fixed;
    top:10px;
    left:10px;
    right:10px;
    display:flex;
    justify-content:space-between;
    pointer-events:none;
}

.panel{
    background:rgba(0,0,0,.78);
    padding:10px 13px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.15);
    box-shadow:0 4px 15px #0008;
}

#title{
    font-size:15px;
    font-weight:bold;
}

.stat{
    font-size:13px;
    margin-top:4px;
}

/* SIGNAL */

#signalBox{
    text-align:center;
    min-width:90px;
}

#signalLight{
    width:25px;
    height:25px;
    border-radius:50%;
    margin:3px auto 4px;
    box-shadow:0 0 15px currentColor;
}

/* STATION */

#station{
    position:fixed;
    top:125px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,.75);
    padding:8px 15px;
    border-radius:20px;
    font-size:14px;
    white-space:nowrap;
}

/* SPEED */

#speedBox{
    position:fixed;
    left:50%;
    bottom:170px;
    transform:translateX(-50%);
    width:130px;
    height:130px;
    border-radius:50%;
    background:rgba(0,0,0,.78);
    border:5px solid #777;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

#speed{
    font-size:40px;
    font-weight:bold;
}

#kmh{
    font-size:12px;
}

/* CONTROLS */

#controls{
    position:fixed;
    bottom:10px;
    left:8px;
    right:8px;
    display:grid;
    grid-template-columns:1fr 1fr 1fr 1fr;
    gap:7px;
}

button{
    min-height:58px;
    border:0;
    border-radius:15px;
    background:rgba(20,20,20,.9);
    color:white;
    font-weight:bold;
    font-size:12px;
    border:1px solid #555;
}

button:active{
    transform:scale(.94);
    background:#444;
}

.throttle{
    background:rgba(0,90,0,.9);
}

.brake{
    background:rgba(110