@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
    box-shadow: 0 0 50px rgba(0, 255, 204, 0.2);
    background-color: #000000;
    border: 1px solid #00FFFF;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

#gameCanvas {
    z-index: 1;
    /* Petit effet de flou global pour lisser */
    filter: drop-shadow(0 0 2px rgba(0, 255, 204, 0.5));
}

#headCanvas {
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    z-index: 10;
}

#main-menu h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc;
}

#main-menu p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ddd;
}

#start-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    background: transparent;
    color: #00ffcc;
    border: 2px solid #00ffcc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

#start-btn:hover {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.8);
}

.app-container {
    display: flex;
    gap: 30px;
    align-items: center;
    /* Translate slightly to the left to balance the leaderboard */
    transform: translateX(-50px);
}

#leaderboard {
    width: 250px;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #00FFFF;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.15);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.developer-credit {
    position: fixed;
    right: 16px;
    bottom: 12px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    z-index: 20;
    user-select: none;
    pointer-events: auto;
}

.developer-credit a {
    color: rgba(0, 255, 204, 0.75);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.developer-credit a:hover {
    color: #00ffcc;
    opacity: 1;
}

#leaderboard h2 {
    text-align: center;
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
}

#leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 255, 204, 0.3);
    padding-bottom: 5px;
}

#leaderboard-list li span.rank {
    width: 30px;
    color: #ff0055;
    font-weight: bold;
}

#leaderboard-list li span.name {
    flex-grow: 1;
    text-transform: uppercase;
    color: #00ffcc;
}

#leaderboard-list li span.score {
    color: #fff;
    font-weight: bold;
}

#submit-score-btn:hover {
    background: #00ffcc !important;
    color: #000 !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.8);
}
