* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1a1a2e;
    font-family: Arial, sans-serif;
}

canvas { display: block; }

#overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: white;
    z-index: 100;
    overflow-y: auto;
    padding: 30px 20px;
}

#overlay.hidden { display: none; }
#overlay h1 { font-size: 48px; margin-bottom: 20px; color: #FFD700; }
#overlay h2 { font-size: 32px; margin-bottom: 30px; }
#overlay p { font-size: 18px; margin-bottom: 15px; color: #aaa; }

#overlay button {
    padding: 15px 40px;
    font-size: 24px;
    background: #4ECDC4;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}

#overlay button:hover { background: #45b7aa; }

#standings {
    margin: 20px 0;
    text-align: left;
    width: 100%;
    max-width: 400px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px;
}

#standings .standing-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin: 4px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    min-width: 280px;
}

#standings .standing-item.gold { background: rgba(255, 215, 0, 0.3); }
#standings .standing-item.silver { background: rgba(192, 192, 192, 0.3); }
#standings .standing-item.bronze { background: rgba(205, 127, 50, 0.3); }
#standings .position { font-size: 20px; font-weight: bold; width: 45px; text-align: center; }
#standings .country-name { font-size: 16px; flex: 1; color: #fff; }
#standings .flag-img { width: 40px; height: 30px; margin-right: 15px; object-fit: cover; border-radius: 3px; }

.config-section { margin: 15px 0; text-align: center; }
.config-section label { display: block; margin-bottom: 8px; font-size: 16px; }
.config-section input[type="range"] { width: 200px; cursor: pointer; }
.config-section select {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    cursor: pointer;
}
.config-value { font-weight: bold; color: #4ECDC4; margin-left: 5px; }

#physicsPanel {
    position: fixed;
    top: 10px;
    right: 50px;
    background: rgba(0,0,0,0.7);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    z-index: 50;
    display: none;
}

#physicsPanel.visible { display: block; }
#physicsPanel h3 { margin: 0 0 10px 0; font-size: 14px; color: #4ECDC4; }

#physicsPanel .slider-row {
    display: flex;
    align-items: center;
    margin: 5px 0;
    gap: 8px;
}

#physicsPanel .slider-row label { width: 70px; font-size: 11px; }
#physicsPanel .slider-row input[type="range"] { width: 80px; cursor: pointer; }
#physicsPanel .slider-row .val { width: 35px; text-align: right; font-size: 11px; color: #4ECDC4; }

#togglePhysics {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #4ECDC4;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 51;
    font-size: 12px;
    display: none;
}

#togglePhysics.visible { display: block; }
