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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 24px 64px;
}

.menu-container {
    width: 100%;
    max-width: 1100px;
    text-align: center;
    padding: 48px 40px;
    background: rgba(45, 45, 45, 0.8);
    border: 3px solid #4a4a4a;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-title {
    font-size: 72px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    margin-bottom: 18px;
    letter-spacing: 8px;
}

.arcade-link {
    display: inline-block;
    margin-bottom: 36px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #bb80ff;
    border: 2px solid rgba(187, 128, 255, 0.4);
    border-radius: 8px;
    text-decoration: none;
    background: rgba(120, 60, 220, 0.12);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.arcade-link:hover {
    background: rgba(120, 60, 220, 0.28);
    border-color: rgba(187, 128, 255, 0.8);
    color: #d4aaff;
}

/* ── Game cards ── */

.games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 48px;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 28px;
    background: rgba(26, 26, 26, 0.6);
    border: 2px solid #4a4a4a;
    border-radius: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
    min-width: 160px;
}

.game-card:hover {
    border-color: var(--accent, #00ff88);
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent, #00ff88) 30%, transparent);
}

.game-card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent, #00ff88);
    letter-spacing: 3px;
}

.game-card-desc {
    font-size: 12px;
    color: #aaa;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.menu-button {
    display: inline-block;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: bold;
    color: #1a1a1a;
    background: var(--accent, #00ff88);
    text-decoration: none;
    border-radius: 6px;
    letter-spacing: 1px;
    transition: filter 0.2s, transform 0.15s;
    box-shadow: 0 0 14px color-mix(in srgb, var(--accent, #00ff88) 40%, transparent);
}
.menu-button:hover  { filter: brightness(1.15); transform: translateY(-2px); }
.menu-button:active { transform: translateY(0); }

/* ── Leaderboards ── */

.leaderboards {
    display: flex;
    gap: 24px;
    justify-content: center;
    border-top: 2px solid #4a4a4a;
    padding-top: 36px;
}

.leaderboard-col {
    flex: 1;
    min-width: 0;
}

.leaderboard-title {
    font-size: 16px;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 6px;
    border-left: 3px solid #4a4a4a;
    transition: background 0.15s, transform 0.15s;
}
.lb-row:hover { background: rgba(26, 26, 26, 0.85); transform: translateX(3px); }

.lb-rank  { font-weight: bold; font-size: 14px; color: #777; min-width: 28px; }
.lb-name  { flex: 1; text-align: left; color: #ddd; font-size: 14px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: bold; font-size: 15px; color: #fff; }

.lb-sub-label {
    font-size: 10px; letter-spacing: 2px; color: #555;
    margin-bottom: 6px; margin-top: 4px;
}

.lb-loading, .lb-empty, .lb-error {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #666;
}
.lb-error { color: #ff6666; }

/* ── Responsive ── */
@media (max-width: 700px) {
    body { padding: 20px 12px 40px; }
    .menu-container { padding: 32px 16px; }
    .game-title { font-size: 48px; }
    .leaderboards { flex-direction: column; }
}
