@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Roboto:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #0d0d0d;
    font-family: 'Roboto', sans-serif;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.nav-logo {
    height: 50px;
    cursor: pointer;
}

.burger-container {
    display: inline-block;
    cursor: pointer;
    position: fixed;
    left: 20px;
    top: 15px;
    z-index: 3000;
}

.burger-menu-1, .burger-menu-2, .burger-menu-3 {
    width: 30px;
    height: 4px;
    background-color: #333;
    margin: 6px 0;
    transition: 0.4s;
    border-radius: 2px;
}

.change .burger-menu-1,
.change .burger-menu-2,
.change .burger-menu-3 {
    background-color: #800020;
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    flex-direction: column;
    background-color: #fdf5e6;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    transition: 0.5s;
    margin: 0;
    padding: 0;
    z-index: 1500;
}

.nav-menu.active {
    left: 0;
}

.nav-menu li {
    margin: 25px 0;
}

.nav-menu li a {
    display: inline-block;
    transition: all 0.3s ease-in-out;
    color: #800020;
    text-decoration: none;
}

.nav-menu li a:hover {
    transform: translateX(20px);
    color: #c5a059;
}

.nav-menu li a::before {
    content: "—";
    margin-right: 10px;
    opacity: 0;
    transition: 0.3s;
}

.nav-menu li a:hover::before {
    opacity: 1;
}

.nav-menu a {
    font-size: 1.8rem;
    color: #800020;
    text-decoration: none;
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu a:hover {
    color: #4d0013;
}

#gameCanvas-nfs {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

#ui-layer-nfs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hud-nfs {
    display: block;
    width: 100%;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    font-family: 'Black Ops One', cursive;
    font-size: 24px;
}

.pos-indicator-nfs {
    margin-top: 10px;
    margin-left: 20px;
    font-size: 40px;
    color: #ffd700;
}

.lap-indicator-nfs {
    margin-top: 5px;
    margin-left: 20px;
    color: #00ffcc;
    font-size: 20px;
}

.hud-nfs > div:last-child > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 50px;
    margin-left: 20px;
}

#speedDisplay {
    font-size: 32px;
    color: #fff;
}

#timeDisplay {
    display: block;
    margin-top: 20px;
    margin-left: 20px;
    font-size: 18px;
    color: #aaa;
}

.pos-indicator-nfs { font-size: 40px; color: #ffd700; line-height: 1; }
.lap-indicator-nfs { font-size: 20px; color: #00ffcc; }
#speedDisplay { font-size: 32px; color: #fff; }
#timeDisplay { font-size: 18px; color: #aaa; }

#menu-nfs, #raceFinish-nfs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    pointer-events: auto;
}

h1 {
    font-family: 'Black Ops One', cursive;
    font-size: 48px;
    color: #ff4d4d;
    margin-bottom: 10px;
    text-align: center;
}

.NFSH1 {
    font-family: 'Black Ops One', cursive;
    font-size: 48px;
    color: #ff4d4d;
    margin-top: 5%;
    text-align: center;
}

.fire-text-nfs {
    background: -webkit-linear-gradient(#ffcc00, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-nfs {
    background: linear-gradient(180deg, #ff4d4d 0%, #cc0000 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 24px;
    font-family: 'Black Ops One', cursive;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
}

.input-nfs {
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #00ffcc;
    background: #222;
    color: white;
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    width: 200px;
}
.fire-text-nfs { color: #ff4400; text-shadow: 0 0 10px #ff4400; }

#leaderboard-nfs {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 8px;
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-width: 160px;
    border-right: 4px solid #00ffcc;
    pointer-events: none;
    z-index: 5;
}

#room-code-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    color: #00ffcc;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 14px;
    gap: 10px;
}
.leaderboard-entry.me { color: #00ffcc; font-weight: bold; }

.hud-nfs {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: white;
    text-shadow: 2px 2px 4px black;
    z-index: 5;
}
.time-large {
    font-size: 24px;
    font-weight: bold;
    color: #00ffcc;
}

#restart-timer {
    font-size: 16px;
    color: #00ffcc;
    margin-top: 15px;
    font-style: italic;
}

/* Style pour le sélecteur de skin */
.skin-selector {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 10px;
}
.skin-option {
    font-size: 30px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: transform 0.2s, background 0.2s;
    border: 2px solid transparent;
}
.skin-option:hover {
    transform: scale(1.2);
    background: rgba(255,255,255,0.1);
}
.skin-option.active {
    border-color: #00ffcc;
    background: rgba(0, 255, 204, 0.2);
}

.hidden { display: none !important; }

#mobile-controls-nfs {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: none;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: auto;
}

.control-btn-nfs {
    width: 75px;
    height: 75px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}